aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-26 01:26:32 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-29 13:37:41 +0200
commitca96456c0e77fa93b295363344fc943ae0fa61ec (patch)
tree1312002e165cf8d21848cbb1e688e41c598af27e /libavcodec
parent4200ed2e91d248ef62f7fb701a7679d0e0afa654 (diff)
downloadffmpeg-ca96456c0e77fa93b295363344fc943ae0fa61ec.tar.gz
avcodec/msmpeg4dec: Move setting decode_mb for WMV2 to wmv2dec.c
It avoids checks and allows to make ff_wmv2_decode_mb() static; furthermore, it allows to avoid a config_components.h inclusion. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/msmpeg4dec.c6
-rw-r--r--libavcodec/wmv2dec.c4
-rw-r--r--libavcodec/wmv2dec.h1
3 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c
index 8e12e1aab2..bc554ed2eb 100644
--- a/libavcodec/msmpeg4dec.c
+++ b/libavcodec/msmpeg4dec.c
@@ -22,8 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "config_components.h"
-
#include "libavutil/thread.h"
#include "avcodec.h"
@@ -38,7 +36,6 @@
#include "h263dec.h"
#include "mpeg4videodec.h"
#include "msmpeg4data.h"
-#include "wmv2dec.h"
#define DC_VLC_BITS 9
#define V2_INTRA_CBPC_VLC_BITS 3
@@ -391,8 +388,7 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
s->decode_mb= msmpeg4v34_decode_mb;
break;
case 5:
- if (CONFIG_WMV2_DECODER)
- s->decode_mb= ff_wmv2_decode_mb;
+ break;
case 6:
//FIXME + TODO VC1 decode mb
break;
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index a70913134c..2daf6c70e8 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -445,7 +445,7 @@ static inline int wmv2_decode_inter_block(WMV2DecContext *w, int16_t *block,
}
}
-int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64])
+static int wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64])
{
/* The following is only allowed because this encoder
* does not use slice threading. */
@@ -573,6 +573,8 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
if ((ret = ff_msmpeg4_decode_init(avctx)) < 0)
return ret;
+ s->decode_mb = wmv2_decode_mb;
+
ff_wmv2_common_init(s);
return ff_intrax8_common_init(avctx, &w->x8,
diff --git a/libavcodec/wmv2dec.h b/libavcodec/wmv2dec.h
index cc410afe17..bc8745bf6f 100644
--- a/libavcodec/wmv2dec.h
+++ b/libavcodec/wmv2dec.h
@@ -23,7 +23,6 @@
#include "mpegvideo.h"
-int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]);
int ff_wmv2_decode_picture_header(MpegEncContext * s);
int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s);
void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64],