comparison msmpeg4.c @ 10822:9ccc13d1144d libavcodec

Move AVCodecs from h263dec.c to msmpeg4.c and disentangle init decode init.
author michael
date Fri, 08 Jan 2010 19:40:10 +0000
parents 030e30b050e4
children 2663fdcdb769
comparison
equal deleted inserted replaced
10821:030e30b050e4 10822:9ccc13d1144d
1270 1270
1271 return 0; 1271 return 0;
1272 } 1272 }
1273 1273
1274 /* init all vlc decoding tables */ 1274 /* init all vlc decoding tables */
1275 av_cold int ff_msmpeg4_decode_init(MpegEncContext *s) 1275 av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
1276 { 1276 {
1277 MpegEncContext *s = avctx->priv_data;
1277 static int done = 0; 1278 static int done = 0;
1278 int i; 1279 int i;
1279 MVTable *mv; 1280 MVTable *mv;
1281
1282 ff_h263_decode_init(avctx);
1280 1283
1281 common_init(s); 1284 common_init(s);
1282 1285
1283 if (!done) { 1286 if (!done) {
1284 done = 1; 1287 done = 1;
1915 my -= 64; 1918 my -= 64;
1916 *mx_ptr = mx; 1919 *mx_ptr = mx;
1917 *my_ptr = my; 1920 *my_ptr = my;
1918 return 0; 1921 return 0;
1919 } 1922 }
1923
1924 AVCodec msmpeg4v1_decoder = {
1925 "msmpeg4v1",
1926 CODEC_TYPE_VIDEO,
1927 CODEC_ID_MSMPEG4V1,
1928 sizeof(MpegEncContext),
1929 ff_msmpeg4_decode_init,
1930 NULL,
1931 ff_h263_decode_end,
1932 ff_h263_decode_frame,
1933 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1934 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
1935 .pix_fmts= ff_pixfmt_list_420,
1936 };
1937
1938 AVCodec msmpeg4v2_decoder = {
1939 "msmpeg4v2",
1940 CODEC_TYPE_VIDEO,
1941 CODEC_ID_MSMPEG4V2,
1942 sizeof(MpegEncContext),
1943 ff_msmpeg4_decode_init,
1944 NULL,
1945 ff_h263_decode_end,
1946 ff_h263_decode_frame,
1947 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1948 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
1949 .pix_fmts= ff_pixfmt_list_420,
1950 };
1951
1952 AVCodec msmpeg4v3_decoder = {
1953 "msmpeg4",
1954 CODEC_TYPE_VIDEO,
1955 CODEC_ID_MSMPEG4V3,
1956 sizeof(MpegEncContext),
1957 ff_msmpeg4_decode_init,
1958 NULL,
1959 ff_h263_decode_end,
1960 ff_h263_decode_frame,
1961 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1962 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
1963 .pix_fmts= ff_pixfmt_list_420,
1964 };
1965
1966 AVCodec wmv1_decoder = {
1967 "wmv1",
1968 CODEC_TYPE_VIDEO,
1969 CODEC_ID_WMV1,
1970 sizeof(MpegEncContext),
1971 ff_msmpeg4_decode_init,
1972 NULL,
1973 ff_h263_decode_end,
1974 ff_h263_decode_frame,
1975 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1976 .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
1977 .pix_fmts= ff_pixfmt_list_420,
1978 };