aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/libswscale.v
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-14 03:21:28 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-20 07:09:11 +0200
commit409c4723ec04fe8c616f4607c7e45bb57478bc82 (patch)
tree07a59f54e321790ff635958098a240dfe27aa71b /libswscale/libswscale.v
parentcab876f5f477d54b0f6faccf036e3cbb536b1a60 (diff)
downloadffmpeg-409c4723ec04fe8c616f4607c7e45bb57478bc82.tar.gz
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>
Diffstat (limited to 'libswscale/libswscale.v')
0 files changed, 0 insertions, 0 deletions