You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02: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:
@@ -22,8 +22,6 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config_components.h"
|
|
||||||
|
|
||||||
#include "libavutil/thread.h"
|
#include "libavutil/thread.h"
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
@@ -38,7 +36,6 @@
|
|||||||
#include "h263dec.h"
|
#include "h263dec.h"
|
||||||
#include "mpeg4videodec.h"
|
#include "mpeg4videodec.h"
|
||||||
#include "msmpeg4data.h"
|
#include "msmpeg4data.h"
|
||||||
#include "wmv2dec.h"
|
|
||||||
|
|
||||||
#define DC_VLC_BITS 9
|
#define DC_VLC_BITS 9
|
||||||
#define V2_INTRA_CBPC_VLC_BITS 3
|
#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;
|
s->decode_mb= msmpeg4v34_decode_mb;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (CONFIG_WMV2_DECODER)
|
break;
|
||||||
s->decode_mb= ff_wmv2_decode_mb;
|
|
||||||
case 6:
|
case 6:
|
||||||
//FIXME + TODO VC1 decode mb
|
//FIXME + TODO VC1 decode mb
|
||||||
break;
|
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
|
/* The following is only allowed because this encoder
|
||||||
* does not use slice threading. */
|
* 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)
|
if ((ret = ff_msmpeg4_decode_init(avctx)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
s->decode_mb = wmv2_decode_mb;
|
||||||
|
|
||||||
ff_wmv2_common_init(s);
|
ff_wmv2_common_init(s);
|
||||||
|
|
||||||
return ff_intrax8_common_init(avctx, &w->x8,
|
return ff_intrax8_common_init(avctx, &w->x8,
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "mpegvideo.h"
|
#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_picture_header(MpegEncContext * s);
|
||||||
int ff_wmv2_decode_secondary_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],
|
void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64],
|
||||||
|
Reference in New Issue
Block a user