[FFmpeg-cvslog] lavc: remove msmpeg4v1 encoder.
Ivan Kalvachev
ikalvachev at gmail.com
Wed May 25 15:10:08 CEST 2011
On 5/25/11, Anton Khirnov <git at videolan.org> wrote:
> ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri May 13
> 08:03:36 2011 +0200| [57aa765971878ff678abbe3bf1bfd9407b9e5a00] | committer:
> Anton Khirnov
>
> lavc: remove msmpeg4v1 encoder.
>
> The encoder has never produced files that could be decoded
> with any software and there should be no reason to create
> such files anyway.
>
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57aa765971878ff678abbe3bf1bfd9407b9e5a00
> ---
>
> libavcodec/Makefile | 2 --
> libavcodec/allcodecs.c | 2 +-
> libavcodec/mpegvideo_enc.c | 21 ---------------------
> libavcodec/msmpeg4.c | 8 --------
> libavcodec/msmpeg4.h | 3 +--
> 5 files changed, 2 insertions(+), 34 deletions(-)
>
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 6cb59a3..81981d7 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -262,8 +262,6 @@ OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o
> mpegvideo_enc.o \
> mpegvideo.o error_resilience.o
> OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o
> OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o
> -OBJS-$(CONFIG_MSMPEG4V1_ENCODER) += msmpeg4.o msmpeg4data.o h263dec.o
> \
> - h263.o ituh263dec.o
> mpeg4videodec.o
> OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o
> \
> h263.o ituh263dec.o
> mpeg4videodec.o
> OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4data.o h263dec.o
> \
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index 3466ad9..f063369 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -147,7 +147,7 @@ void avcodec_register_all(void)
> REGISTER_DECODER (MPEGVIDEO, mpegvideo);
> REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau);
> REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau);
> - REGISTER_ENCDEC (MSMPEG4V1, msmpeg4v1);
> + REGISTER_DECODER (MSMPEG4V1, msmpeg4v1);
> REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2);
> REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3);
> REGISTER_DECODER (MSRLE, msrle);
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index 44ecba2..8df05c4 100644
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -637,15 +637,6 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
> s->low_delay= s->max_b_frames ? 0 : 1;
> avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1);
> break;
> - case CODEC_ID_MSMPEG4V1:
> - s->out_format = FMT_H263;
> - s->h263_msmpeg4 = 1;
> - s->h263_pred = 1;
> - s->unrestricted_mv = 1;
> - s->msmpeg4_version= 1;
> - avctx->delay=0;
> - s->low_delay=1;
> - break;
> case CODEC_ID_MSMPEG4V2:
> s->out_format = FMT_H263;
> s->h263_msmpeg4 = 1;
> @@ -3805,18 +3796,6 @@ AVCodec ff_h263p_encoder = {
> .long_name= NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version
> 2"),
> };
>
> -AVCodec ff_msmpeg4v1_encoder = {
> - "msmpeg4v1",
> - AVMEDIA_TYPE_VIDEO,
> - CODEC_ID_MSMPEG4V1,
> - sizeof(MpegEncContext),
> - MPV_encode_init,
> - MPV_encode_picture,
> - MPV_encode_end,
> - .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
> - .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant
> version 1"),
> -};
> -
> AVCodec ff_msmpeg4v2_encoder = {
> "msmpeg4v2",
> AVMEDIA_TYPE_VIDEO,
> diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
> index 6c9c209..84ba1fa 100644
> --- a/libavcodec/msmpeg4.c
> +++ b/libavcodec/msmpeg4.c
> @@ -846,13 +846,6 @@ static void msmpeg4_encode_dc(MpegEncContext * s, int
> level, int n, int *dir_ptr
> int pred, extquant;
> int extrabits = 0;
>
> - if(s->msmpeg4_version==1){
> - int32_t *dc_val;
> - pred = msmpeg4v1_pred_dc(s, n, &dc_val);
> -
> - /* update predictor */
> - *dc_val= level;
> - }else{
> int16_t *dc_val;
> pred = msmpeg4_pred_dc(s, n, &dc_val, dir_ptr);
>
> @@ -862,7 +855,6 @@ static void msmpeg4_encode_dc(MpegEncContext * s, int
> level, int n, int *dir_ptr
> } else {
> *dc_val = level * s->c_dc_scale;
> }
> - }
>
> /* do the prediction */
> level -= pred;
> diff --git a/libavcodec/msmpeg4.h b/libavcodec/msmpeg4.h
> index 0570bf9..8a0a066 100644
> --- a/libavcodec/msmpeg4.h
> +++ b/libavcodec/msmpeg4.h
> @@ -54,8 +54,7 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM
> block[6][64]);
> CONFIG_MSMPEG4V3_DECODER || \
> CONFIG_WMV2_DECODER || \
> CONFIG_VC1_DECODER)
> -#define CONFIG_MSMPEG4_ENCODER (CONFIG_MSMPEG4V1_ENCODER || \
> - CONFIG_MSMPEG4V2_ENCODER || \
> +#define CONFIG_MSMPEG4_ENCODER (CONFIG_MSMPEG4V2_ENCODER || \
> CONFIG_MSMPEG4V3_ENCODER || \
> CONFIG_WMV2_ENCODER)
I don't like the policy of not fixing bugs but removing the
functionality where the bug is.
It looks that this have really been merged.
More information about the ffmpeg-cvslog
mailing list