summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-23 07:19:36 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 16:28:55 +0100
commit4a9b460a096f7225856550c2eb3a41402b7b812d (patch)
treea110a464f42d1def9ce3cce188bcd8d698a1c0ce /libavcodec/mpegvideo.c
parent7d4f200dfa1df80809eec75b0d96bc97475bd01d (diff)
avcodec/mpegvideo: Check for no_rounding at compile-time if possible
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>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 01b184bbd7..f2618f5b7b 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;