diff options
author | Jason Garrett-Glaser <jason@x264.com> | 2011-07-06 12:26:04 -0700 |
---|---|---|
committer | Jason Garrett-Glaser <jason@x264.com> | 2011-07-08 16:12:36 -0700 |
commit | 298e52c99caabebba63bb2b7074d8c4b5c2c0f92 (patch) | |
tree | e84d646f9e1f3aa87836ef6c5b0f10c927efbaac /libavcodec/h264.c | |
parent | ef0c5948018216aadae18e5626ed0b1b95668f4f (diff) | |
download | ffmpeg-streaming-298e52c99caabebba63bb2b7074d8c4b5c2c0f92.zip ffmpeg-streaming-298e52c99caabebba63bb2b7074d8c4b5c2c0f92.tar.gz |
H.264: Remove redundant hl_motion_16/8 code
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 52 |
1 files changed, 10 insertions, 42 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index f7c0345..f79f4d1 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -778,24 +778,6 @@ static av_always_inline void hl_motion(H264Context *h, uint8_t *dest_y, uint8_t prefetch_motion(h, 1, pixel_shift, chroma444); } -#define hl_motion_fn(sh, bits) \ -static av_always_inline void hl_motion_ ## bits(H264Context *h, \ - uint8_t *dest_y, \ - uint8_t *dest_cb, uint8_t *dest_cr, \ - qpel_mc_func (*qpix_put)[16], \ - h264_chroma_mc_func (*chroma_put), \ - qpel_mc_func (*qpix_avg)[16], \ - h264_chroma_mc_func (*chroma_avg), \ - h264_weight_func *weight_op, \ - h264_biweight_func *weight_avg, \ - int chroma444) \ -{ \ - hl_motion(h, dest_y, dest_cb, dest_cr, qpix_put, chroma_put, \ - qpix_avg, chroma_avg, weight_op, weight_avg, sh, chroma444); \ -} -hl_motion_fn(0, 8); -hl_motion_fn(1, 16); - static void free_tables(H264Context *h, int free_rbsp){ int i; H264Context *hx; @@ -1876,18 +1858,11 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i if(h->deblocking_filter) xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, 0, simple, pixel_shift); }else if(is_h264){ - if (pixel_shift) { - hl_motion_16(h, dest_y, dest_cb, dest_cr, - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 0); - } else - hl_motion_8(h, dest_y, dest_cb, dest_cr, - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 0); + hl_motion(h, dest_y, dest_cb, dest_cr, + s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, + s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, + h->h264dsp.weight_h264_pixels_tab, + h->h264dsp.biweight_h264_pixels_tab, pixel_shift, 0); } hl_decode_mb_idct_luma(h, mb_type, is_h264, simple, transform_bypass, pixel_shift, block_offset, linesize, dest_y, 0); @@ -2017,18 +1992,11 @@ static av_always_inline void hl_decode_mb_444_internal(H264Context *h, int simpl if(h->deblocking_filter) xchg_mb_border(h, dest[0], dest[1], dest[2], linesize, linesize, 0, 1, simple, pixel_shift); }else{ - if (pixel_shift) { - hl_motion_16(h, dest[0], dest[1], dest[2], - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 1); - } else - hl_motion_8(h, dest[0], dest[1], dest[2], - s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, - s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, - h->h264dsp.weight_h264_pixels_tab, - h->h264dsp.biweight_h264_pixels_tab, 1); + hl_motion(h, dest[0], dest[1], dest[2], + s->me.qpel_put, s->dsp.put_h264_chroma_pixels_tab, + s->me.qpel_avg, s->dsp.avg_h264_chroma_pixels_tab, + h->h264dsp.weight_h264_pixels_tab, + h->h264dsp.biweight_h264_pixels_tab, pixel_shift, 1); } for (p = 0; p < plane_count; p++) |