[FFmpeg-devel] [PATCH] fate: add various FFv1 tests for 1024 slices

Lynne dev at lynne.ee
Wed Apr 16 13:39:02 EEST 2025


On 16/04/2025 12:22, Andreas Rheinhardt wrote:
> Lynne:
>> This lets us test features that were broken earlier, as well as
>> test the hardware decoder by using the HWACCEL=vulkan option.
> 
> Can't you just adjust some of vsynth FFV1 tests to use this many slices?
> (Can one even use 1024 slices for such a low resolution?)

I'd rather not. vsynth is the AVCodecContext of tests.
It's a good point to clean up, IMO.

>> ---
>>   tests/Makefile                      |  1 +
>>   tests/fate/ffv1.mak                 | 53 +++++++++++++++++++++++++++++
>>   tests/ref/fate/ffv1-s1024-bgra      |  4 +++
>>   tests/ref/fate/ffv1-s1024-bgra-r    |  4 +++
>>   tests/ref/fate/ffv1-s1024-gbrp16    |  4 +++
>>   tests/ref/fate/ffv1-s1024-gray8     |  4 +++
>>   tests/ref/fate/ffv1-s1024-gray8-r   |  4 +++
>>   tests/ref/fate/ffv1-s1024-yuv444p   |  4 +++
>>   tests/ref/fate/ffv1-s1024-yuv444p-r |  4 +++
>>   9 files changed, 82 insertions(+)
>>   create mode 100644 tests/fate/ffv1.mak
>>   create mode 100644 tests/ref/fate/ffv1-s1024-bgra
>>   create mode 100644 tests/ref/fate/ffv1-s1024-bgra-r
>>   create mode 100644 tests/ref/fate/ffv1-s1024-gbrp16
>>   create mode 100644 tests/ref/fate/ffv1-s1024-gray8
>>   create mode 100644 tests/ref/fate/ffv1-s1024-gray8-r
>>   create mode 100644 tests/ref/fate/ffv1-s1024-yuv444p
>>   create mode 100644 tests/ref/fate/ffv1-s1024-yuv444p-r
>>
>> diff --git a/tests/Makefile b/tests/Makefile
>> index f9f5fc07f3..b2386febd7 100644
>> --- a/tests/Makefile
>> +++ b/tests/Makefile
>> @@ -180,6 +180,7 @@ include $(SRC_PATH)/tests/fate/enc_external.mak
>>   # Must be included after lavf-video.mak
>>   include $(SRC_PATH)/tests/fate/ffmpeg.mak
>>   include $(SRC_PATH)/tests/fate/ffprobe.mak
>> +include $(SRC_PATH)/tests/fate/ffv1.mak
>>   include $(SRC_PATH)/tests/fate/fifo-muxer.mak
>>   include $(SRC_PATH)/tests/fate/filter-audio.mak
>>   # Must be included after vcodec.mak
>> diff --git a/tests/fate/ffv1.mak b/tests/fate/ffv1.mak
>> new file mode 100644
>> index 0000000000..16660b5ac2
>> --- /dev/null
>> +++ b/tests/fate/ffv1.mak
>> @@ -0,0 +1,53 @@
>> +FATE_FFV1 += fate-ffv1-s1024-gray8
>> +fate-ffv1-s1024-gray8: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-gray8: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt gray8" tests/data/vsynth1.yuv \
> 
> Seems like you are treating the input file as gray8 (as opposed to
> converting it to gray8). Is this intended? Can't this cause problems
> because the size of the input file is not necessarily a multiple of the
> size expected for a 352x288 gray8 frame?

Shouldn't really cause an issue.
Do you have a better suggestion on how to handle this?

>> +  nut "-c ffv1 -g 1 -slices 1024 -coder ac" \
>> +  framecrc "" ""
>> +
>> +FATE_FFV1 += fate-ffv1-s1024-gray8-r
>> +fate-ffv1-s1024-gray8-r: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-gray8-r: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt gray8" tests/data/vsynth1.yuv \
>> +  nut "-c ffv1 -g 1 -slices 1024 -coder rice" \
>> +  framecrc "" ""
>> +
>> +FATE_FFV1 += fate-ffv1-s1024-yuv444p
>> +fate-ffv1-s1024-yuv444p: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-yuv444p: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt yuv444p" tests/data/vsynth1.yuv \
>> +  nut "-c ffv1 -g 1 -slices 1024 -coder ac" \
>> +  framecrc "" ""
>> +
>> +FATE_FFV1 += fate-ffv1-s1024-yuv444p-r
>> +fate-ffv1-s1024-yuv444p-r: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-yuv444p-r: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt yuv444p" tests/data/vsynth1.yuv \
>> +  nut "-c ffv1 -g 1 -slices 1024 -coder rice" \
>> +  framecrc "" ""
>> +
>> +FATE_FFV1 += fate-ffv1-s1024-bgra
>> +fate-ffv1-s1024-bgra: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-bgra: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt bgra" tests/data/vsynth1.yuv \
>> +  nut "-c ffv1 -g 1 -slices 1024 -coder ac" \
>> +  framecrc "" ""
>> +
>> +FATE_FFV1 += fate-ffv1-s1024-bgra-r
>> +fate-ffv1-s1024-bgra-r: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-bgra-r: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt bgra" tests/data/vsynth1.yuv \
>> +  nut "-c ffv1 -g 1 -slices 1024 -coder rice" \
>> +  framecrc "" ""
>> +
>> +FATE_FFV1 += fate-ffv1-s1024-gbrp16
>> +fate-ffv1-s1024-gbrp16: tests/data/vsynth1.yuv
>> +fate-ffv1-s1024-gbrp16: CMD = enc_dec \
>> +  "rawvideo -s 352x288 -pix_fmt gbrp16" tests/data/vsynth1.yuv \
>> +  nut "-c ffv1 -g 1 -slices 1024 -coder ac" \
>> +  framecrc "" ""
> 
> Won't this test cause issues on BE?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xA2FEA5F03F034464.asc
Type: application/pgp-keys
Size: 624 bytes
Desc: OpenPGP public key
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250416/1e6fbf77/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250416/1e6fbf77/attachment.sig>


More information about the ffmpeg-devel mailing list