[FFmpeg-devel] [PATCH 2/6] tools/enc_recon_frame_test: plane 0 height fix

Anton Khirnov anton at khirnov.net
Fri Mar 24 10:50:37 EET 2023


Quoting Michael Niedermayer (2023-03-24 01:25:36)
> Signed-off-by: Michael Niedermayer <michael at 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.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list