Files
FFmpeg/libavcodec
Andreas Rheinhardt 409c4723ec avcodec/mpegvideo: Make inlining is_mpeg12 more flexible
There are two types of checks for whether the current codec
is MPEG-1/2 in mpv_reconstruct_mb_internal(): Those that are
required for correctness and those that are not; an example
of the latter is "is_mpeg12 || (s->codec_id != AV_CODEC_ID_WMV2)".
The reason for the existence of such checks is that
mpv_reconstruct_mb_internal() has the av_always_inline attribute
and is_mpeg12 is usually inlined, so that in case we are dealing
with MPEG-1/2 the above check can be completely optimized away.

But is_mpeg12 is not always inlined: it is not in case
CONFIG_SMALL is true in which case is_mpeg12 is always zero,
so that the checks required for correctness need to check
out_format explicitly. This is currently done via a macro
in mpv_reconstruct_mb_internal(), so that the fact that
it is CONFIG_SMALL that determines this is encoded at two places.

This commit changes this by making is_mpeg12 a three-state:
DEFINITELY_MPEG12, MAY_BE_MPEG12 and NOT_MPEG12. In the second
case, one has to resort to check out_format, in the other cases
is_mpeg12 can be taken at face-value. This will allow to make
inlining is_mpeg12 more flexible in a future commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-20 07:09:11 +02:00
..
2022-09-17 10:32:16 +02:00
2022-09-27 13:19:52 +02:00
2022-10-18 13:20:37 +11:00
2022-09-23 20:26:28 +02:00
2022-08-31 16:25:31 +02:00
2022-03-18 19:56:50 +01:00
2022-06-24 15:37:23 +08:00
2022-06-24 15:37:23 +08:00
2022-10-17 09:56:47 +02:00
2022-10-05 08:26:19 +02:00
2022-10-05 08:26:19 +02:00
2022-10-18 13:20:37 +11:00
2022-10-18 13:20:37 +11:00
2022-09-07 00:07:45 +02:00
2022-09-07 00:07:45 +02:00
2022-07-30 11:42:06 +02:00
2022-07-30 11:42:06 +02:00
2022-10-20 06:57:30 +02:00
2022-06-25 09:05:58 +08:00
2022-09-29 00:05:32 +02:00
2022-09-29 00:05:32 +02:00
2022-10-18 13:20:37 +11:00
2022-09-30 19:11:36 +02:00
2022-09-16 10:02:19 +02:00
2022-09-30 19:30:29 +02:00
2022-10-08 10:19:30 +02:00
2022-09-22 01:05:59 +02:00
2022-10-18 09:59:58 +08:00
2022-10-02 20:27:36 +02:00
2022-10-14 16:14:24 +02:00
2022-09-30 04:40:44 +02:00
2022-04-10 20:12:23 +02:00
2022-06-25 09:05:58 +08:00
2022-10-17 09:51:47 +02:00
2022-10-18 13:20:37 +11:00
2022-10-13 23:42:25 +02:00
2022-10-18 13:20:37 +11:00
2022-09-17 10:15:01 +02:00