mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-08 15:50:18 +00:00
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>
This commit is contained in:
parent
4200ed2e91
commit
ca96456c0e
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user