[FFmpeg-devel] [PATCH v2 1/2] checkasm/rv40dsp: cover more cases

Christophe Gisquet christophe.gisquet at gmail.com
Thu Dec 5 08:41:33 EET 2024


Hello,

Le mer. 4 déc. 2024 à 10:14, <uk7b-at-foxmail.com at ffmpeg.org> a écrit :
> @@ -27,7 +27,7 @@
>  #define randomize_buffers()                  \
>      do {                                     \
>          for (int i = 0; i < 16*18*2; i++)    \
> -            src[i] = rnd() & 0x3;            \
> +            src[i] = rnd() & 0xff;           \

I don't understand why the original code would be correct. It looks to
be a sample buffer, in which case 8 bits chroma being in [0; 3] sounds
weird.
This is in the original h264chroma_mc code.

(and in this case, a UT may also alternating patterns to also check
overflows, like columns or lines or diagonals alternating between 0
and 255, but this goes beyond just correct code, and probably impact
luma MC more)

-- 
Christophe


More information about the ffmpeg-devel mailing list