| OLD | NEW |
| 1 /* | 1 /* |
| 2 * H.263 decoder | 2 * H.263 decoder |
| 3 * Copyright (c) 2001 Fabrice Bellard | 3 * Copyright (c) 2001 Fabrice Bellard |
| 4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> | 4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| 11 * version 2.1 of the License, or (at your option) any later version. | 11 * version 2.1 of the License, or (at your option) any later version. |
| 12 * | 12 * |
| 13 * FFmpeg is distributed in the hope that it will be useful, | 13 * FFmpeg is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 * Lesser General Public License for more details. | 16 * Lesser General Public License for more details. |
| 17 * | 17 * |
| 18 * You should have received a copy of the GNU Lesser General Public | 18 * You should have received a copy of the GNU Lesser General Public |
| 19 * License along with FFmpeg; if not, write to the Free Software | 19 * License along with FFmpeg; if not, write to the Free Software |
| 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * @file | 24 * @file |
| 25 * H.263 decoder. | 25 * H.263 decoder. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "libavutil/cpu.h" |
| 28 #include "internal.h" | 29 #include "internal.h" |
| 29 #include "avcodec.h" | 30 #include "avcodec.h" |
| 30 #include "dsputil.h" | 31 #include "dsputil.h" |
| 31 #include "mpegvideo.h" | 32 #include "mpegvideo.h" |
| 32 #include "h263.h" | 33 #include "h263.h" |
| 33 #include "h263_parser.h" | 34 #include "h263_parser.h" |
| 34 #include "mpeg4video_parser.h" | 35 #include "mpeg4video_parser.h" |
| 35 #include "msmpeg4.h" | 36 #include "msmpeg4.h" |
| 36 #include "vdpau_internal.h" | 37 #include "vdpau_internal.h" |
| 37 #include "thread.h" | 38 #include "thread.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 | 550 |
| 550 #if 0 // dump bits per frame / qp / complexity | 551 #if 0 // dump bits per frame / qp / complexity |
| 551 { | 552 { |
| 552 static FILE *f=NULL; | 553 static FILE *f=NULL; |
| 553 if(!f) f=fopen("rate_qp_cplx.txt", "w"); | 554 if(!f) f=fopen("rate_qp_cplx.txt", "w"); |
| 554 fprintf(f, "%d %d %f\n", buf_size, s->qscale, buf_size*(double)s->qscale); | 555 fprintf(f, "%d %d %f\n", buf_size, s->qscale, buf_size*(double)s->qscale); |
| 555 } | 556 } |
| 556 #endif | 557 #endif |
| 557 | 558 |
| 558 #if HAVE_MMX | 559 #if HAVE_MMX |
| 559 if(s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo ==
FF_IDCT_AUTO && (mm_flags & FF_MM_MMX)){ | 560 if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo ==
FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) { |
| 560 avctx->idct_algo= FF_IDCT_XVIDMMX; | 561 avctx->idct_algo= FF_IDCT_XVIDMMX; |
| 561 avctx->coded_width= 0; // force reinit | 562 avctx->coded_width= 0; // force reinit |
| 562 // dsputil_init(&s->dsp, avctx); | 563 // dsputil_init(&s->dsp, avctx); |
| 563 s->picture_number=0; | 564 s->picture_number=0; |
| 564 } | 565 } |
| 565 #endif | 566 #endif |
| 566 | 567 |
| 567 /* After H263 & mpeg4 header decode we have the height, width,*/ | 568 /* After H263 & mpeg4 header decode we have the height, width,*/ |
| 568 /* and other parameters. So then we could init the picture */ | 569 /* and other parameters. So then we could init the picture */ |
| 569 /* FIXME: By the way H263 decoder is evolving it should have */ | 570 /* FIXME: By the way H263 decoder is evolving it should have */ |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 ff_h263_decode_init, | 741 ff_h263_decode_init, |
| 741 NULL, | 742 NULL, |
| 742 ff_h263_decode_end, | 743 ff_h263_decode_end, |
| 743 ff_h263_decode_frame, | 744 ff_h263_decode_frame, |
| 744 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_
DELAY, | 745 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_
DELAY, |
| 745 .flush= ff_mpeg_flush, | 746 .flush= ff_mpeg_flush, |
| 746 .max_lowres= 3, | 747 .max_lowres= 3, |
| 747 .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 /
H.263 version 2"), | 748 .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 /
H.263 version 2"), |
| 748 .pix_fmts= ff_hwaccel_pixfmt_list_420, | 749 .pix_fmts= ff_hwaccel_pixfmt_list_420, |
| 749 }; | 750 }; |
| OLD | NEW |