1From 423031475f19346601a913dd24ae5ace3d0d9739 Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Tue, 7 Sep 2021 01:44:53 -0700
4Subject: [PATCH] libavcodec: Use #if to prevent some unintended dependencies
5
6---
7 libavcodec/mpegvideo_motion.c | 10 ++++++----
8 1 file changed, 6 insertions(+), 4 deletions(-)
9
10diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
11index 8922f5b1a5..40c364a5cc 100644
12--- a/libavcodec/mpegvideo_motion.c
13+++ b/libavcodec/mpegvideo_motion.c
14@@ -207,10 +207,11 @@ void mpeg_motion_internal(MpegEncContext *s,
15 pix_op[s->chroma_x_shift][uvdxy]
16 (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
17 }
18- if (!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
19- s->out_format == FMT_H261) {
20+#if CONFIG_H261_ENCODER || CONFIG_H261_DECODER
21+ if (!is_mpeg12 && s->out_format == FMT_H261) {
22 ff_h261_loop_filter(s);
23 }
24+#endif
25 }
26 /* apply one mpeg motion vector to the three components */
27 static void mpeg_motion(MpegEncContext *s,
28@@ -702,11 +703,12 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s,
29 0, 0, 0,
30 ref_picture, pix_op, qpix_op,
31 s->mv[dir][0][0], s->mv[dir][0][1], 16);
32- } else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) &&
33- s->mspel && s->codec_id == AV_CODEC_ID_WMV2) {
34+#if CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER
35+ } else if (!is_mpeg12 && s->mspel && s->codec_id == AV_CODEC_ID_WMV2) {
36 ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
37 ref_picture, pix_op,
38 s->mv[dir][0][0], s->mv[dir][0][1], 16);
39+#endif
40 } else {
41 mpeg_motion(s, dest_y, dest_cb, dest_cr, 0,
42 ref_picture, pix_op,
43--
442.37.3
45