Mercurial > libavcodec.hg
comparison svq1.c @ 3777:20545fbb6f7c libavcodec
add some #ifdef CONFIG_ENCODERS/DECODERS
author | mru |
---|---|
date | Wed, 27 Sep 2006 19:54:07 +0000 |
parents | 1843a85123b7 |
children | c8c591fe26f8 |
comparison
equal
deleted
inserted
replaced
3776:1843a85123b7 | 3777:20545fbb6f7c |
---|---|
615 | 615 |
616 return value; | 616 return value; |
617 } | 617 } |
618 #endif | 618 #endif |
619 | 619 |
620 #ifdef CONFIG_DECODERS | |
620 static void svq1_parse_string (GetBitContext *bitbuf, uint8_t *out) { | 621 static void svq1_parse_string (GetBitContext *bitbuf, uint8_t *out) { |
621 uint8_t seed; | 622 uint8_t seed; |
622 int i; | 623 int i; |
623 | 624 |
624 out[0] = get_bits (bitbuf, 8); | 625 out[0] = get_bits (bitbuf, 8); |
877 MpegEncContext *s = avctx->priv_data; | 878 MpegEncContext *s = avctx->priv_data; |
878 | 879 |
879 MPV_common_end(s); | 880 MPV_common_end(s); |
880 return 0; | 881 return 0; |
881 } | 882 } |
882 | 883 #endif /* CONFIG_DECODERS */ |
884 | |
885 #ifdef CONFIG_ENCODERS | |
883 static void svq1_write_header(SVQ1Context *s, int frame_type) | 886 static void svq1_write_header(SVQ1Context *s, int frame_type) |
884 { | 887 { |
885 int i; | 888 int i; |
886 | 889 |
887 /* frame code */ | 890 /* frame code */ |
1079 } | 1082 } |
1080 | 1083 |
1081 return best_score; | 1084 return best_score; |
1082 } | 1085 } |
1083 | 1086 |
1084 #ifdef CONFIG_ENCODERS | |
1085 | 1087 |
1086 static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane, unsigned char *ref_plane, unsigned char *decoded_plane, | 1088 static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane, unsigned char *ref_plane, unsigned char *decoded_plane, |
1087 int width, int height, int src_stride, int stride) | 1089 int width, int height, int src_stride, int stride) |
1088 { | 1090 { |
1089 int x, y; | 1091 int x, y; |
1393 return 0; | 1395 return 0; |
1394 } | 1396 } |
1395 | 1397 |
1396 #endif //CONFIG_ENCODERS | 1398 #endif //CONFIG_ENCODERS |
1397 | 1399 |
1400 #ifdef CONFIG_DECODERS | |
1398 AVCodec svq1_decoder = { | 1401 AVCodec svq1_decoder = { |
1399 "svq1", | 1402 "svq1", |
1400 CODEC_TYPE_VIDEO, | 1403 CODEC_TYPE_VIDEO, |
1401 CODEC_ID_SVQ1, | 1404 CODEC_ID_SVQ1, |
1402 sizeof(MpegEncContext), | 1405 sizeof(MpegEncContext), |
1406 svq1_decode_frame, | 1409 svq1_decode_frame, |
1407 CODEC_CAP_DR1, | 1410 CODEC_CAP_DR1, |
1408 .flush= ff_mpeg_flush, | 1411 .flush= ff_mpeg_flush, |
1409 .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV410P, -1}, | 1412 .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV410P, -1}, |
1410 }; | 1413 }; |
1414 #endif | |
1411 | 1415 |
1412 #ifdef CONFIG_ENCODERS | 1416 #ifdef CONFIG_ENCODERS |
1413 | 1417 |
1414 AVCodec svq1_encoder = { | 1418 AVCodec svq1_encoder = { |
1415 "svq1", | 1419 "svq1", |