[FFmpeg-devel] [PATCH 1/2] avcodec/vc1_loopfilter: Factor duplicate code in vc1_b_h_intfi_loop_filter()

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue May 24 21:50:51 EEST 2022


Michael Niedermayer:
> Fixes: CID1435168
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavcodec/vc1_loopfilter.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/libavcodec/vc1_loopfilter.c b/libavcodec/vc1_loopfilter.c
> index 0f990cccef..ee694ede28 100644
> --- a/libavcodec/vc1_loopfilter.c
> +++ b/libavcodec/vc1_loopfilter.c
> @@ -1125,10 +1125,7 @@ static av_always_inline void vc1_b_h_intfi_loop_filter(VC1Context *v, uint8_t *d
>          dst = dest + (block_num & 2) * 4 * s->linesize + (block_num & 1) * 8;
>  
>      if (!(flags & RIGHT_EDGE) || !(block_num & 5)) {
> -        if (block_num > 3)
> -            v->vc1dsp.vc1_h_loop_filter8(dst + 8, linesize, pq);
> -        else
> -            v->vc1dsp.vc1_h_loop_filter8(dst + 8, linesize, pq);
> +        v->vc1dsp.vc1_h_loop_filter8(dst + 8, linesize, pq);
>      }
>  
>      tt = ttblk[0] >> (block_num * 4) & 0xf;

Are you certain that the current code is actually correct or whether
something else was intended?

- Andreas


More information about the ffmpeg-devel mailing list