[FFmpeg-cvslog] avcodec/mpv_reconstruct_mb_template: Optimize WMV2 code away if possible

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:01:04 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Jun 11 22:28:36 2024 +0200| [0f92fecebb783d8d9e86473a12a0f724a0f78f34] | committer: Andreas Rheinhardt

avcodec/mpv_reconstruct_mb_template: Optimize WMV2 code away if possible

The WMV2 decoder does not support lowres, so one can optimize
the WMV2 specific code away in the lowres version of this function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f92fecebb783d8d9e86473a12a0f724a0f78f34
---

 libavcodec/mpv_reconstruct_mb_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpv_reconstruct_mb_template.c b/libavcodec/mpv_reconstruct_mb_template.c
index 257767e80b..4b16974827 100644
--- a/libavcodec/mpv_reconstruct_mb_template.c
+++ b/libavcodec/mpv_reconstruct_mb_template.c
@@ -187,7 +187,7 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
                 }
             }
 #if !IS_ENCODER
-              else if (is_mpeg12 == DEFINITELY_MPEG12 || (s->codec_id != AV_CODEC_ID_WMV2)) {
+              else if (is_mpeg12 == DEFINITELY_MPEG12 || lowres_flag || (s->codec_id != AV_CODEC_ID_WMV2)) {
                 add_dct(s, block[0], 0, dest_y                          , dct_linesize);
                 add_dct(s, block[1], 1, dest_y              + block_size, dct_linesize);
                 add_dct(s, block[2], 2, dest_y + dct_offset             , dct_linesize);



More information about the ffmpeg-cvslog mailing list