summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/h263dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/h263dec.c')
-rw-r--r--src/libffmpeg/libavcodec/h263dec.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/libffmpeg/libavcodec/h263dec.c b/src/libffmpeg/libavcodec/h263dec.c
index b53192d74..66370c179 100644
--- a/src/libffmpeg/libavcodec/h263dec.c
+++ b/src/libffmpeg/libavcodec/h263dec.c
@@ -3,18 +3,20 @@
* Copyright (c) 2001 Fabrice Bellard.
* Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
*
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -516,19 +518,19 @@ retry:
avctx->has_b_frames= !s->low_delay;
if(s->xvid_build==0 && s->divx_version==0 && s->lavc_build==0){
- if(s->avctx->stream_codec_tag == ff_get_fourcc("XVID") ||
- s->avctx->codec_tag == ff_get_fourcc("XVID") || s->avctx->codec_tag == ff_get_fourcc("XVIX") ||
- s->avctx->codec_tag == ff_get_fourcc("RMP4"))
+ if(s->stream_codec_tag == ff_get_fourcc("XVID") ||
+ s->codec_tag == ff_get_fourcc("XVID") || s->codec_tag == ff_get_fourcc("XVIX") ||
+ s->codec_tag == ff_get_fourcc("RMP4"))
s->xvid_build= -1;
#if 0
- if(s->avctx->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==1
+ if(s->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==1
&& s->padding_bug_score > 0 && s->low_delay) // XVID with modified fourcc
s->xvid_build= -1;
#endif
}
if(s->xvid_build==0 && s->divx_version==0 && s->lavc_build==0){
- if(s->avctx->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==0)
+ if(s->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==0)
s->divx_version= 400; //divx 4
}
@@ -538,10 +540,10 @@ retry:
}
if(s->workaround_bugs&FF_BUG_AUTODETECT){
- if(s->avctx->codec_tag == ff_get_fourcc("XVIX"))
+ if(s->codec_tag == ff_get_fourcc("XVIX"))
s->workaround_bugs|= FF_BUG_XVID_ILACE;
- if(s->avctx->codec_tag == ff_get_fourcc("UMP4")){
+ if(s->codec_tag == ff_get_fourcc("UMP4")){
s->workaround_bugs|= FF_BUG_UMP4;
}
@@ -693,6 +695,17 @@ retry:
s->next_p_frame_damaged=0;
}
+ if((s->avctx->flags2 & CODEC_FLAG2_FAST) && s->pict_type==B_TYPE){
+ s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
+ s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
+ }else if((!s->no_rounding) || s->pict_type==B_TYPE){
+ s->me.qpel_put= s->dsp.put_qpel_pixels_tab;
+ s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab;
+ }else{
+ s->me.qpel_put= s->dsp.put_no_rnd_qpel_pixels_tab;
+ s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab;
+ }
+
if(MPV_frame_start(s, avctx) < 0)
return -1;
@@ -785,7 +798,7 @@ assert(s->current_picture.pict_type == s->pict_type);
avctx->frame_number = s->picture_number - 1;
#ifdef PRINT_FRAME_TIME
-av_log(avctx, AV_LOG_DEBUG, "%Ld\n", rdtsc()-time);
+av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time);
#endif
return get_consumed_bytes(s, buf_size);