Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.5 KB

58.md

File metadata and controls

29 lines (22 loc) · 1.5 KB

FFV1-SLICE-SliceContent

Name

Slice CRC must contain a valid hash.

Definition

This test checks if the FFV1 CRC is valid.

Reproducibility

Get FFmpeg source code, configure it, then:

mv libavcodec/ffv1enc_template.c ffv1enc_template.c
sed -e 's/put_symbol_inline(c, p->state\[context], diff, 1, NULL, NULL);/;\/\/put_symbol_inline(c, p->state\[context], diff, 1, NULL, NULL);/g' ffv1enc_template.c > libavcodec/ffv1enc_template.c
mv libavcodec/ffv1enc_template.c ffv1enc_template_temp.c
sed -e 's/put_bits(&s->pb, 1, 1);/;\/\/put_bits(&s->pb, 1, 1);/g' ffv1enc_template_temp.c > libavcodec/ffv1enc_template.c
mv libavcodec/ffv1enc_template.c ffv1enc_template_temp.c
sed -e 's/put_bits(&s->pb, 1 + ff_log2_run\[run_index], run_count);/;\/\/put_bits(&s->pb, 1 + ff_log2_run\[run_index], run_count);/g' ffv1enc_template_temp.c > libavcodec/ffv1enc_template.c
mv libavcodec/ffv1enc_template.c ffv1enc_template_temp.c
sed -e 's/put_vlc_symbol(&s->pb, &p->vlc_state\[context], diff, bits);/;\/\/put_vlc_symbol(&s->pb, &p->vlc_state\[context], diff, bits);/g' ffv1enc_template_temp.c > libavcodec/ffv1enc_template.c
rm ffv1enc_template_temp.c;
make
mv ffv1enc_template.c libavcodec/ffv1enc_template.c
./ffmpeg -f lavfi -i "color=c=black:size=2x2" -vframes 1 -pix_fmt gray8 -write_crc32 0 -c:v ffv1 -level 3 -slices 1 -coder 0 FFV1-SLICE-SliceContent_v3_GR.mkv
./ffmpeg -f lavfi -i "color=c=black:size=2x2" -vframes 1 -pix_fmt gray8 -write_crc32 0 -c:v ffv1 -level 3 -slices 1 -coder 1 FFV1-SLICE-SliceContent_v3_RC.mkv