Mercurial > libavcodec.hg
comparison lcl.c @ 3777:20545fbb6f7c libavcodec
add some #ifdef CONFIG_ENCODERS/DECODERS
author | mru |
---|---|
date | Wed, 27 Sep 2006 19:54:07 +0000 |
parents | 0b546eab515d |
children | c8c591fe26f8 |
comparison
equal
deleted
inserted
replaced
3776:1843a85123b7 | 3777:20545fbb6f7c |
---|---|
188 return (destptr - destptr_bak); | 188 return (destptr - destptr_bak); |
189 } | 189 } |
190 | 190 |
191 | 191 |
192 | 192 |
193 | 193 #ifdef CONFIG_DECODERS |
194 /* | 194 /* |
195 * | 195 * |
196 * Decode a frame | 196 * Decode a frame |
197 * | 197 * |
198 */ | 198 */ |
542 *(AVFrame*)data = c->pic; | 542 *(AVFrame*)data = c->pic; |
543 | 543 |
544 /* always report that the buffer was completely consumed */ | 544 /* always report that the buffer was completely consumed */ |
545 return buf_size; | 545 return buf_size; |
546 } | 546 } |
547 | 547 #endif |
548 | 548 |
549 | 549 #ifdef CONFIG_ENCODERS |
550 /* | 550 /* |
551 * | 551 * |
552 * Encode a frame | 552 * Encode a frame |
553 * | 553 * |
554 */ | 554 */ |
603 flush_put_bits(&c->pb); | 603 flush_put_bits(&c->pb); |
604 | 604 |
605 return c->zstream.total_out; | 605 return c->zstream.total_out; |
606 #endif | 606 #endif |
607 } | 607 } |
608 | 608 #endif /* CONFIG_ENCODERS */ |
609 | 609 |
610 | 610 #ifdef CONFIG_DECODERS |
611 /* | 611 /* |
612 * | 612 * |
613 * Init lcl decoder | 613 * Init lcl decoder |
614 * | 614 * |
615 */ | 615 */ |
767 | 767 |
768 avctx->pix_fmt = PIX_FMT_BGR24; | 768 avctx->pix_fmt = PIX_FMT_BGR24; |
769 | 769 |
770 return 0; | 770 return 0; |
771 } | 771 } |
772 | 772 #endif /* CONFIG_DECODERS */ |
773 | 773 |
774 | 774 #ifdef CONFIG_ENCODERS |
775 /* | 775 /* |
776 * | 776 * |
777 * Init lcl encoder | 777 * Init lcl encoder |
778 * | 778 * |
779 */ | 779 */ |
837 } | 837 } |
838 | 838 |
839 return 0; | 839 return 0; |
840 #endif | 840 #endif |
841 } | 841 } |
842 | 842 #endif /* CONFIG_ENCODERS */ |
843 | 843 |
844 | 844 |
845 | 845 |
846 | 846 #ifdef CONFIG_DECODERS |
847 /* | 847 /* |
848 * | 848 * |
849 * Uninit lcl decoder | 849 * Uninit lcl decoder |
850 * | 850 * |
851 */ | 851 */ |
859 inflateEnd(&(c->zstream)); | 859 inflateEnd(&(c->zstream)); |
860 #endif | 860 #endif |
861 | 861 |
862 return 0; | 862 return 0; |
863 } | 863 } |
864 | 864 #endif |
865 | 865 |
866 | 866 #ifdef CONFIG_ENCODERS |
867 /* | 867 /* |
868 * | 868 * |
869 * Uninit lcl encoder | 869 * Uninit lcl encoder |
870 * | 870 * |
871 */ | 871 */ |
879 deflateEnd(&(c->zstream)); | 879 deflateEnd(&(c->zstream)); |
880 #endif | 880 #endif |
881 | 881 |
882 return 0; | 882 return 0; |
883 } | 883 } |
884 | 884 #endif |
885 | |
886 #ifdef CONFIG_MSZH_DECODER | |
885 AVCodec mszh_decoder = { | 887 AVCodec mszh_decoder = { |
886 "mszh", | 888 "mszh", |
887 CODEC_TYPE_VIDEO, | 889 CODEC_TYPE_VIDEO, |
888 CODEC_ID_MSZH, | 890 CODEC_ID_MSZH, |
889 sizeof(LclContext), | 891 sizeof(LclContext), |
891 NULL, | 893 NULL, |
892 decode_end, | 894 decode_end, |
893 decode_frame, | 895 decode_frame, |
894 CODEC_CAP_DR1, | 896 CODEC_CAP_DR1, |
895 }; | 897 }; |
896 | 898 #endif |
897 | 899 |
900 #ifdef CONFIG_ZLIB_DECODER | |
898 AVCodec zlib_decoder = { | 901 AVCodec zlib_decoder = { |
899 "zlib", | 902 "zlib", |
900 CODEC_TYPE_VIDEO, | 903 CODEC_TYPE_VIDEO, |
901 CODEC_ID_ZLIB, | 904 CODEC_ID_ZLIB, |
902 sizeof(LclContext), | 905 sizeof(LclContext), |
904 NULL, | 907 NULL, |
905 decode_end, | 908 decode_end, |
906 decode_frame, | 909 decode_frame, |
907 CODEC_CAP_DR1, | 910 CODEC_CAP_DR1, |
908 }; | 911 }; |
912 #endif | |
909 | 913 |
910 #ifdef CONFIG_ENCODERS | 914 #ifdef CONFIG_ENCODERS |
911 | 915 |
912 AVCodec zlib_encoder = { | 916 AVCodec zlib_encoder = { |
913 "zlib", | 917 "zlib", |