diff mbox series

[FFmpeg-devel,30/30] avcodec/mpegvideo: Check for no_rounding at compile-time if possible

Message ID AM7PR03MB666078A6E2D1AF1D0579F4128F7E9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 4a9b460a096f7225856550c2eb3a41402b7b812d
Headers show
Series [FFmpeg-devel,01/14] avcodec/mjpegenc: Use custom close function directly | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

Andreas Rheinhardt Dec. 23, 2021, 9:13 a.m. UTC
It is partially possible if it is inlined whether
we deal with MPEG-1/2, because no_rounding is never set
for MPEG-1/2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 7626f97be5..8b16b4ec0b 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2052,7 +2052,7 @@  void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
                     }
                 }else{
                     op_qpix = s->me.qpel_put;
-                    if ((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
+                    if ((is_mpeg12 || !s->no_rounding) || s->pict_type == AV_PICTURE_TYPE_B) {
                         op_pix = s->hdsp.put_pixels_tab;
                     }else{
                         op_pix = s->hdsp.put_no_rnd_pixels_tab;