[FFmpeg-devel] [PATCH 13/39] lavc/ffv1: drop redundant PlaneContext.quant_table

Michael Niedermayer michael at niedermayer.cc
Thu Jul 18 20:03:39 EEST 2024


On Thu, Jul 18, 2024 at 05:14:12PM +0200, Anton Khirnov wrote:
[...]
> diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c
> index 97a28b085a..d68bbda5be 100644
> --- a/libavcodec/ffv1dec_template.c
> +++ b/libavcodec/ffv1dec_template.c
> @@ -30,6 +30,7 @@ RENAME(decode_line)(FFV1Context *f,
>  {
>      PlaneContext *const p = &s->plane[plane_index];
>      RangeCoder *const c   = &s->c;
> +    const int16_t (*quant_table)[256] = f->quant_tables[p->quant_table_index];
>      int x;
>      int run_count = 0;
>      int run_mode  = 0;
> @@ -59,7 +60,7 @@ RENAME(decode_line)(FFV1Context *f,
>                  return AVERROR_INVALIDDATA;
>          }
> 
> -        context = RENAME(get_context)(f->quant_tables[p->quant_table_index],
> +        context = RENAME(get_context)(quant_table,
>                                        sample[1] + x, sample[0] + x, sample[1] + x);
>          if (context < 0) {
>              context = -context;

that change is fine.

the removial of the quant_table copy should be benchmarked

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240718/3db3b57a/attachment.sig>


More information about the ffmpeg-devel mailing list