/*
- * Copyright (c) 2002 The FFmpeg Project.
+ * Copyright (c) 2002 The FFmpeg Project
*
* This file is part of FFmpeg.
*
#include "mpegvideo.h"
#include "msmpeg4.h"
#include "msmpeg4data.h"
+#include "h263.h"
#include "wmv2.h"
return 0;
}
-static int wmv2_encode_init(AVCodecContext *avctx){
+static av_cold int wmv2_encode_init(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
if(MPV_encode_init(avctx) < 0)
return 0;
}
-#if 0 /* unused, remove? */
-static int wmv2_encode_end(AVCodecContext *avctx){
-
- if(MPV_encode_end(avctx) < 0)
- return -1;
-
- avctx->extradata_size= 0;
- av_freep(&avctx->extradata);
-
- return 0;
-}
-#endif
-
int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number)
{
Wmv2Context * const w= (Wmv2Context*)s;
s->dc_table_index = 1;
s->mv_table_index = 1; /* only if P frame */
-// s->use_skip_mb_code = 1; /* only if P frame */
s->per_mb_rl_table = 0;
s->mspel= 0;
w->per_mb_abt=0;
}
coded_cbp |= val << (5 - i);
}
-#if 0
- if (coded_cbp)
- printf("cbp=%x %x\n", cbp, coded_cbp);
-#endif
if (s->pict_type == FF_I_TYPE) {
put_bits(&s->pb,
AVCodec wmv2_encoder = {
"wmv2",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_WMV2,
sizeof(Wmv2Context),
wmv2_encode_init,
MPV_encode_picture,
MPV_encode_end,
- .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
+ .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
+ .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 8"),
};