comparison h263dec.c @ 9028:0f95e4f0a3f5 libavcodec

Add and use ff_pixfmt_list_420.
author michael
date Tue, 24 Feb 2009 18:27:52 +0000
parents 3c141db76660
children e10f554d8fb7
comparison
equal deleted inserted replaced
9027:3c141db76660 9028:0f95e4f0a3f5
50 // set defaults 50 // set defaults
51 MPV_decode_defaults(s); 51 MPV_decode_defaults(s);
52 s->quant_precision=5; 52 s->quant_precision=5;
53 s->decode_mb= ff_h263_decode_mb; 53 s->decode_mb= ff_h263_decode_mb;
54 s->low_delay= 1; 54 s->low_delay= 1;
55 avctx->pix_fmt= PIX_FMT_YUV420P; 55 avctx->pix_fmt= avctx->get_format(avctx, avctx->codec->pix_fmts);
56 s->unrestricted_mv= 1; 56 s->unrestricted_mv= 1;
57 57
58 /* select sub codec */ 58 /* select sub codec */
59 switch(avctx->codec->id) { 59 switch(avctx->codec->id) {
60 case CODEC_ID_H263: 60 case CODEC_ID_H263:
723 ff_h263_decode_end, 723 ff_h263_decode_end,
724 ff_h263_decode_frame, 724 ff_h263_decode_frame,
725 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, 725 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
726 .flush= ff_mpeg_flush, 726 .flush= ff_mpeg_flush,
727 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), 727 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
728 .pix_fmts= ff_pixfmt_list_420,
728 }; 729 };
729 730
730 AVCodec h263_decoder = { 731 AVCodec h263_decoder = {
731 "h263", 732 "h263",
732 CODEC_TYPE_VIDEO, 733 CODEC_TYPE_VIDEO,
737 ff_h263_decode_end, 738 ff_h263_decode_end,
738 ff_h263_decode_frame, 739 ff_h263_decode_frame,
739 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, 740 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
740 .flush= ff_mpeg_flush, 741 .flush= ff_mpeg_flush,
741 .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998"), 742 .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998"),
743 .pix_fmts= ff_pixfmt_list_420,
742 }; 744 };
743 745
744 AVCodec msmpeg4v1_decoder = { 746 AVCodec msmpeg4v1_decoder = {
745 "msmpeg4v1", 747 "msmpeg4v1",
746 CODEC_TYPE_VIDEO, 748 CODEC_TYPE_VIDEO,
750 NULL, 752 NULL,
751 ff_h263_decode_end, 753 ff_h263_decode_end,
752 ff_h263_decode_frame, 754 ff_h263_decode_frame,
753 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 755 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
754 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"), 756 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
757 .pix_fmts= ff_pixfmt_list_420,
755 }; 758 };
756 759
757 AVCodec msmpeg4v2_decoder = { 760 AVCodec msmpeg4v2_decoder = {
758 "msmpeg4v2", 761 "msmpeg4v2",
759 CODEC_TYPE_VIDEO, 762 CODEC_TYPE_VIDEO,
763 NULL, 766 NULL,
764 ff_h263_decode_end, 767 ff_h263_decode_end,
765 ff_h263_decode_frame, 768 ff_h263_decode_frame,
766 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 769 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
767 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), 770 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
771 .pix_fmts= ff_pixfmt_list_420,
768 }; 772 };
769 773
770 AVCodec msmpeg4v3_decoder = { 774 AVCodec msmpeg4v3_decoder = {
771 "msmpeg4", 775 "msmpeg4",
772 CODEC_TYPE_VIDEO, 776 CODEC_TYPE_VIDEO,
776 NULL, 780 NULL,
777 ff_h263_decode_end, 781 ff_h263_decode_end,
778 ff_h263_decode_frame, 782 ff_h263_decode_frame,
779 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 783 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
780 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), 784 .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
785 .pix_fmts= ff_pixfmt_list_420,
781 }; 786 };
782 787
783 AVCodec wmv1_decoder = { 788 AVCodec wmv1_decoder = {
784 "wmv1", 789 "wmv1",
785 CODEC_TYPE_VIDEO, 790 CODEC_TYPE_VIDEO,
789 NULL, 794 NULL,
790 ff_h263_decode_end, 795 ff_h263_decode_end,
791 ff_h263_decode_frame, 796 ff_h263_decode_frame,
792 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 797 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
793 .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"), 798 .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
799 .pix_fmts= ff_pixfmt_list_420,
794 }; 800 };
795 801
796 AVCodec h263i_decoder = { 802 AVCodec h263i_decoder = {
797 "h263i", 803 "h263i",
798 CODEC_TYPE_VIDEO, 804 CODEC_TYPE_VIDEO,
802 NULL, 808 NULL,
803 ff_h263_decode_end, 809 ff_h263_decode_end,
804 ff_h263_decode_frame, 810 ff_h263_decode_frame,
805 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 811 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
806 .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), 812 .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"),
813 .pix_fmts= ff_pixfmt_list_420,
807 }; 814 };
808 815
809 AVCodec flv_decoder = { 816 AVCodec flv_decoder = {
810 "flv", 817 "flv",
811 CODEC_TYPE_VIDEO, 818 CODEC_TYPE_VIDEO,
815 NULL, 822 NULL,
816 ff_h263_decode_end, 823 ff_h263_decode_end,
817 ff_h263_decode_frame, 824 ff_h263_decode_frame,
818 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 825 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
819 .long_name= NULL_IF_CONFIG_SMALL("Flash Video"), 826 .long_name= NULL_IF_CONFIG_SMALL("Flash Video"),
827 .pix_fmts= ff_pixfmt_list_420,
820 }; 828 };