Message ID | 20230324002540.3227-2-michael@niedermayer.cc |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/6] avcodec/tests/snowenc: unbreak DWT tests | expand |
Context | Check | Description |
---|---|---|
andriy/configure_x86 | warning | Failed to apply patch |
Quoting Michael Niedermayer (2023-03-24 01:25:36) > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > tools/enc_recon_frame_test.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/enc_recon_frame_test.c b/tools/enc_recon_frame_test.c > index 8f09ded47e..1ea2293ee7 100644 > --- a/tools/enc_recon_frame_test.c > +++ b/tools/enc_recon_frame_test.c > @@ -83,7 +83,7 @@ static int frame_hash(FrameChecksum **pc, size_t *nb_c, int64_t ts, > int linesize = av_image_get_linesize(frame->format, frame->width, p); > uint32_t checksum = 0; > > - for (int j = 0; j < frame->height >> shift_v; j++) { > + for (int j = 0; j < frame->height >> (shift_v *!!p); j++) { IIUC this won't work for alpha. Might as well make it completely generic. I'll send an updated version of the tool, thank you for reminding me.
On Fri, Mar 24, 2023 at 09:50:37AM +0100, Anton Khirnov wrote: > Quoting Michael Niedermayer (2023-03-24 01:25:36) > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > tools/enc_recon_frame_test.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/enc_recon_frame_test.c b/tools/enc_recon_frame_test.c > > index 8f09ded47e..1ea2293ee7 100644 > > --- a/tools/enc_recon_frame_test.c > > +++ b/tools/enc_recon_frame_test.c > > @@ -83,7 +83,7 @@ static int frame_hash(FrameChecksum **pc, size_t *nb_c, int64_t ts, > > int linesize = av_image_get_linesize(frame->format, frame->width, p); > > uint32_t checksum = 0; > > > > - for (int j = 0; j < frame->height >> shift_v; j++) { > > + for (int j = 0; j < frame->height >> (shift_v *!!p); j++) { > > IIUC this won't work for alpha. Might as well make it completely > generic. yes, i didnt really think much about this, it was more a issue i ran into and wanted to report. After all the tool isnt in git master yet > > I'll send an updated version of the tool, thank you for reminding me. [...] thx
diff --git a/tools/enc_recon_frame_test.c b/tools/enc_recon_frame_test.c index 8f09ded47e..1ea2293ee7 100644 --- a/tools/enc_recon_frame_test.c +++ b/tools/enc_recon_frame_test.c @@ -83,7 +83,7 @@ static int frame_hash(FrameChecksum **pc, size_t *nb_c, int64_t ts, int linesize = av_image_get_linesize(frame->format, frame->width, p); uint32_t checksum = 0; - for (int j = 0; j < frame->height >> shift_v; j++) { + for (int j = 0; j < frame->height >> (shift_v *!!p); j++) { checksum = av_adler32_update(checksum, data, linesize); data += frame->linesize[p]; }
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- tools/enc_recon_frame_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)