aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2006-10-01 21:25:17 +0000
committerLoren Merritt <lorenm@u.washington.edu>2006-10-01 21:25:17 +0000
commit2833fc46462abd841e3d69242be9919c98ad3696 (patch)
tree4e9513d1913ff238c35e066877c8795b40d561c8 /libavcodec/h264.c
parente0769997cb753d8a3c9039b1de1542987cfc0692 (diff)
downloadffmpeg-2833fc46462abd841e3d69242be9919c98ad3696.tar.gz
approximate qpel functions: sacrifice some quality for some decoding speed. enabled on B-frames with -lavdopts fast.
Originally committed as revision 6412 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index d63196d52d..e2388a7633 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3782,8 +3782,8 @@ static void hl_decode_mb(H264Context *h){
xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0);
}else if(s->codec_id == CODEC_ID_H264){
hl_motion(h, dest_y, dest_cb, dest_cr,
- s->dsp.put_h264_qpel_pixels_tab, s->dsp.put_h264_chroma_pixels_tab,
- s->dsp.avg_h264_qpel_pixels_tab, s->dsp.avg_h264_chroma_pixels_tab,
+ s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab,
+ s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab,
s->dsp.weight_h264_pixels_tab, s->dsp.biweight_h264_pixels_tab);
}
@@ -4885,6 +4885,14 @@ static int decode_slice_header(H264Context *h){
);
}
+ if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !s->current_picture.reference){
+ s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
+ s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
+ }else{
+ s->me.qpel_put= s->dsp.put_h264_qpel_pixels_tab;
+ s->me.qpel_avg= s->dsp.avg_h264_qpel_pixels_tab;
+ }
+
return 0;
}