Message ID | 20240424140944.30835-2-jdek@itanimul.li |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/2] avfilter/riscv: build afir only if required | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
Le keskiviikkona 24. huhtikuuta 2024, 17.09.44 EEST J. Dekker a écrit : > Signed-off-by: J. Dekker <jdek@itanimul.li> > --- > tests/checkasm/h264dsp.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c > index 0f484e3f43..5cb646ae49 100644 > --- a/tests/checkasm/h264dsp.c > +++ b/tests/checkasm/h264dsp.c > @@ -173,6 +173,7 @@ static void dct8x8(int16_t *coef, int bit_depth) > > static void check_idct(void) > { > + static const int depths[5] = { 8, 9, 10, 12, 14 }; > LOCAL_ALIGNED_16(uint8_t, src, [8 * 8 * 2]); > LOCAL_ALIGNED_16(uint8_t, dst, [8 * 8 * 2]); > LOCAL_ALIGNED_16(uint8_t, dst0, [8 * 8 * 2]); > @@ -181,10 +182,11 @@ static void check_idct(void) > LOCAL_ALIGNED_16(int16_t, subcoef0, [8 * 8 * 2]); > LOCAL_ALIGNED_16(int16_t, subcoef1, [8 * 8 * 2]); > H264DSPContext h; > - int bit_depth, sz, align, dc; > + int bit_depth, sz, align, dc, i; > declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, int16_t *block, > int stride); > > - for (bit_depth = 8; bit_depth <= 10; bit_depth++) { > + for (i = 0; i < 5; i++) { > + bit_depth = depths[i]; > ff_h264dsp_init(&h, bit_depth, 1); > for (sz = 4; sz <= 8; sz += 4) { > randomize_buffers(); Fine with me, but then again, this is not RISC-V-specific, and other people are ostensibly better for reviewing checkasm changes.
On Wed, Apr 24, 2024 at 10:10 AM J. Dekker <jdek@itanimul.li> wrote: > > Signed-off-by: J. Dekker <jdek@itanimul.li> > --- > tests/checkasm/h264dsp.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c > index 0f484e3f43..5cb646ae49 100644 > --- a/tests/checkasm/h264dsp.c > +++ b/tests/checkasm/h264dsp.c > @@ -173,6 +173,7 @@ static void dct8x8(int16_t *coef, int bit_depth) > > static void check_idct(void) > { > + static const int depths[5] = { 8, 9, 10, 12, 14 }; > LOCAL_ALIGNED_16(uint8_t, src, [8 * 8 * 2]); > LOCAL_ALIGNED_16(uint8_t, dst, [8 * 8 * 2]); > LOCAL_ALIGNED_16(uint8_t, dst0, [8 * 8 * 2]); > @@ -181,10 +182,11 @@ static void check_idct(void) > LOCAL_ALIGNED_16(int16_t, subcoef0, [8 * 8 * 2]); > LOCAL_ALIGNED_16(int16_t, subcoef1, [8 * 8 * 2]); > H264DSPContext h; > - int bit_depth, sz, align, dc; > + int bit_depth, sz, align, dc, i; > declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, int16_t *block, int stride); > > - for (bit_depth = 8; bit_depth <= 10; bit_depth++) { > + for (i = 0; i < 5; i++) { > + bit_depth = depths[i]; Perhaps this should use FF_ARRAY_ELEMS(depths) rather than a hard-coded "5"? Devin
Devin Heitmueller <devin.heitmueller@ltnglobal.com> writes: > On Wed, Apr 24, 2024 at 10:10 AM J. Dekker <jdek@itanimul.li> wrote: >> >> Signed-off-by: J. Dekker <jdek@itanimul.li> >> --- >> tests/checkasm/h264dsp.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c >> index 0f484e3f43..5cb646ae49 100644 >> --- a/tests/checkasm/h264dsp.c >> +++ b/tests/checkasm/h264dsp.c >> @@ -173,6 +173,7 @@ static void dct8x8(int16_t *coef, int bit_depth) >> >> static void check_idct(void) >> { >> + static const int depths[5] = { 8, 9, 10, 12, 14 }; >> LOCAL_ALIGNED_16(uint8_t, src, [8 * 8 * 2]); >> LOCAL_ALIGNED_16(uint8_t, dst, [8 * 8 * 2]); >> LOCAL_ALIGNED_16(uint8_t, dst0, [8 * 8 * 2]); >> @@ -181,10 +182,11 @@ static void check_idct(void) >> LOCAL_ALIGNED_16(int16_t, subcoef0, [8 * 8 * 2]); >> LOCAL_ALIGNED_16(int16_t, subcoef1, [8 * 8 * 2]); >> H264DSPContext h; >> - int bit_depth, sz, align, dc; >> + int bit_depth, sz, align, dc, i; >> declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, int16_t *block, int stride); >> >> - for (bit_depth = 8; bit_depth <= 10; bit_depth++) { >> + for (i = 0; i < 5; i++) { >> + bit_depth = depths[i]; > > Perhaps this should use FF_ARRAY_ELEMS(depths) rather than a hard-coded "5"? Thanks for the suggestion, pushed with this change.
diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c index 0f484e3f43..5cb646ae49 100644 --- a/tests/checkasm/h264dsp.c +++ b/tests/checkasm/h264dsp.c @@ -173,6 +173,7 @@ static void dct8x8(int16_t *coef, int bit_depth) static void check_idct(void) { + static const int depths[5] = { 8, 9, 10, 12, 14 }; LOCAL_ALIGNED_16(uint8_t, src, [8 * 8 * 2]); LOCAL_ALIGNED_16(uint8_t, dst, [8 * 8 * 2]); LOCAL_ALIGNED_16(uint8_t, dst0, [8 * 8 * 2]); @@ -181,10 +182,11 @@ static void check_idct(void) LOCAL_ALIGNED_16(int16_t, subcoef0, [8 * 8 * 2]); LOCAL_ALIGNED_16(int16_t, subcoef1, [8 * 8 * 2]); H264DSPContext h; - int bit_depth, sz, align, dc; + int bit_depth, sz, align, dc, i; declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, int16_t *block, int stride); - for (bit_depth = 8; bit_depth <= 10; bit_depth++) { + for (i = 0; i < 5; i++) { + bit_depth = depths[i]; ff_h264dsp_init(&h, bit_depth, 1); for (sz = 4; sz <= 8; sz += 4) { randomize_buffers();
Signed-off-by: J. Dekker <jdek@itanimul.li> --- tests/checkasm/h264dsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)