[FFmpeg-devel] [PATCH 12/57] avcodec/mpegutils: Don't use MB_TYPE_L[01] for mpegvideo

Michael Niedermayer michael at niedermayer.cc
Thu Jun 13 11:23:25 EEST 2024


On Wed, Jun 12, 2024 at 03:48:08PM +0200, Andreas Rheinhardt wrote:
> MB_TYPE_L[01] is based upon H.264 terminology (it stands for
> list); yet the mpegvideo based decoders don't have lists
> of reference frames, they have at most one forward and one
> backward reference. So use terminology based upon this.
> 
> This also has a second advantage: MB_TYPE_L[01] is actually
> an OR of two flags (which are set independently for H.264,
> but aren't for mpegvideo). Switching to different flags
> makes the flags fit into an int16_t, which will be useful
> in future commits.
> 
> The only downside to this is a very small amount of code
> in error_resilience.c and mpegutils.c (the only code shared
> between the H.264 decoder and mpegvideo).

Cant you just call the flags differently but leave them nummerically
the same, if you dont like L0L1 terminology ?

Having each codec be different does not seem to me to be a good thing
It adds burden to every bit of common code. It may be thats error_resilience
ATM, but there are other things people may want to add, like an universal
encoder for all the block based transform + MC formats

thx

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

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20240613/91a7b840/attachment.sig>


More information about the ffmpeg-devel mailing list