Mercurial > libavcodec.hg
comparison wmv2.c @ 1070:6da5ae9ee199 libavcodec
more #ifdef CONFIG_ENCODERS patch by (Wolfgang Hesseler <qv at multimediaware dot com>) with modifications by me (s/WOLFGANG/CONFIG_ENCODERS/ and some other fixes)
author | michaelni |
---|---|
date | Sun, 16 Feb 2003 23:05:38 +0000 |
parents | b32afefe7d33 |
children | f59c3f66363b |
comparison
equal
deleted
inserted
replaced
1069:8528d0b9e508 | 1070:6da5ae9ee199 |
---|---|
77 s->slice_height = s->mb_height / code; | 77 s->slice_height = s->mb_height / code; |
78 | 78 |
79 return 0; | 79 return 0; |
80 } | 80 } |
81 | 81 |
82 #ifdef CONFIG_ENCODERS | |
82 static int wmv2_encode_init(AVCodecContext *avctx){ | 83 static int wmv2_encode_init(AVCodecContext *avctx){ |
83 Wmv2Context * const w= avctx->priv_data; | 84 Wmv2Context * const w= avctx->priv_data; |
84 | 85 |
85 if(MPV_encode_init(avctx) < 0) | 86 if(MPV_encode_init(avctx) < 0) |
86 return -1; | 87 return -1; |
253 | 254 |
254 for (i = 0; i < 6; i++) { | 255 for (i = 0; i < 6; i++) { |
255 msmpeg4_encode_block(s, block[i], i); | 256 msmpeg4_encode_block(s, block[i], i); |
256 } | 257 } |
257 } | 258 } |
259 #endif //CONFIG_ENCODERS | |
258 | 260 |
259 static void parse_mb_skip(Wmv2Context * w){ | 261 static void parse_mb_skip(Wmv2Context * w){ |
260 int mb_x, mb_y; | 262 int mb_x, mb_y; |
261 MpegEncContext * const s= &w->s; | 263 MpegEncContext * const s= &w->s; |
262 | 264 |
826 ff_h263_decode_end, | 828 ff_h263_decode_end, |
827 ff_h263_decode_frame, | 829 ff_h263_decode_frame, |
828 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, | 830 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, |
829 }; | 831 }; |
830 | 832 |
833 #ifdef CONFIG_ENCODERS | |
831 AVCodec wmv2_encoder = { | 834 AVCodec wmv2_encoder = { |
832 "wmv2", | 835 "wmv2", |
833 CODEC_TYPE_VIDEO, | 836 CODEC_TYPE_VIDEO, |
834 CODEC_ID_WMV2, | 837 CODEC_ID_WMV2, |
835 sizeof(Wmv2Context), | 838 sizeof(Wmv2Context), |
836 wmv2_encode_init, | 839 wmv2_encode_init, |
837 MPV_encode_picture, | 840 MPV_encode_picture, |
838 MPV_encode_end, | 841 MPV_encode_end, |
839 }; | 842 }; |
840 | 843 #endif |