Quoting Michael Niedermayer (2024-07-18 00:37:25)
> On Tue, Jul 16, 2024 at 07:11:27PM +0200, Anton Khirnov wrote:
> > In all cases except decoding version 1 it's either not used, or contains
> > a copy of a table from quant_tables, which we can just as well use
> > directly.
> > 
> > When decoding version 1, we can just as well decode into
> > quant_tables[0], which would otherwise be unused.
> > ---
> >  libavcodec/ffv1.h    |  1 -
> >  libavcodec/ffv1dec.c | 10 +++++++---
> >  libavcodec/ffv1enc.c |  6 ++----
> >  3 files changed, 9 insertions(+), 8 deletions(-)
> 
> the code is 1 line longer and using the first entry as a special
> case doesnt seem simpler

The simplicity is in the fact it's actually not special at all.
quant_tables[quant_table_idx] is always the location of the quant table
for any bitstream version, so the rest of the code does not need to
care.

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to