X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fwmv2dec.c;h=740636c19e4f94dca9e59c5fcb3ea17b7f97095a;hb=aca214783af9b48600b74a547dafdbbdb702d979;hp=077928357e8862ca52b278b4dd22989c658d0580;hpb=e6bc38fd49c94726b45d5d5cc2b756ad8ec49ee0;p=ffmpeg diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index 077928357e8..740636c19e4 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -19,7 +19,6 @@ */ #include "avcodec.h" -#include "dsputil.h" #include "mpegvideo.h" #include "h263.h" #include "mathops.h" @@ -32,7 +31,7 @@ static void parse_mb_skip(Wmv2Context * w){ int mb_x, mb_y; MpegEncContext * const s= &w->s; - uint32_t * const mb_type = s->current_picture_ptr->f.mb_type; + uint32_t * const mb_type = s->current_picture_ptr->mb_type; w->skip_type= get_bits(&s->gb, 2); switch(w->skip_type){ @@ -255,11 +254,11 @@ static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){ wrap = s->b8_stride; xy = s->block_index[0]; - mot_val = s->current_picture.f.motion_val[0][xy]; + mot_val = s->current_picture.motion_val[0][xy]; - A = s->current_picture.f.motion_val[0][xy - 1]; - B = s->current_picture.f.motion_val[0][xy - wrap]; - C = s->current_picture.f.motion_val[0][xy + 2 - wrap]; + A = s->current_picture.motion_val[0][xy - 1]; + B = s->current_picture.motion_val[0][xy - wrap]; + C = s->current_picture.motion_val[0][xy + 2 - wrap]; if(s->mb_x && !s->first_slice_line && !s->mspel && w->top_left_mv_flag) diff= FFMAX(FFABS(A[0] - B[0]), FFABS(A[1] - B[1])); @@ -291,7 +290,7 @@ static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){ return mot_val; } -static inline int wmv2_decode_inter_block(Wmv2Context *w, DCTELEM *block, int n, int cbp){ +static inline int wmv2_decode_inter_block(Wmv2Context *w, int16_t *block, int n, int cbp){ MpegEncContext * const s= &w->s; static const int sub_cbp_table[3]= {2,3,1}; int sub_cbp; @@ -331,7 +330,7 @@ static inline int wmv2_decode_inter_block(Wmv2Context *w, DCTELEM *block, int n, } -int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) +int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]) { Wmv2Context * const w= (Wmv2Context*)s; int cbp, code, i; @@ -340,7 +339,7 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) if(w->j_type) return 0; if (s->pict_type == AV_PICTURE_TYPE_P) { - if (IS_SKIP(s->current_picture.f.mb_type[s->mb_y * s->mb_stride + s->mb_x])) { + if (IS_SKIP(s->current_picture.mb_type[s->mb_y * s->mb_stride + s->mb_x])) { /* skip mb */ s->mb_intra = 0; for(i=0;i<6;i++) @@ -467,6 +466,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) AVCodec ff_wmv2_decoder = { .name = "wmv2", + .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_WMV2, .priv_data_size = sizeof(Wmv2Context), @@ -474,6 +474,5 @@ AVCodec ff_wmv2_decoder = { .close = wmv2_decode_end, .decode = ff_h263_decode_frame, .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), .pix_fmts = ff_pixfmt_list_420, };