diff options
author | Aneesh Dogra <lionaneesh@gmail.com> | 2012-03-30 23:44:06 +0530 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-31 08:14:54 -0700 |
commit | c265b77b115885fd5f1b7a3eeae49dcc95718edc (patch) | |
tree | de7abc2bd27421dc9a70417f778d0437de365c2b | |
parent | 10b1c060f9d2b6028ce4d3fc544a60ee6d7acc06 (diff) | |
download | ffmpeg-c265b77b115885fd5f1b7a3eeae49dcc95718edc.tar.gz |
cavs: Remove unused code.
The square is always passed as 1 whenever the function is called and
thus the if block never gets executed.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
-rw-r--r-- | libavcodec/cavs.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c index 96ff2e87a8..42922e08dd 100644 --- a/libavcodec/cavs.c +++ b/libavcodec/cavs.c @@ -324,11 +324,12 @@ void ff_cavs_modify_mb_i(AVSContext *h, int *pred_mode_uv) { * ****************************************************************************/ -static inline void mc_dir_part(AVSContext *h,Picture *pic,int square, - int chroma_height,int delta,int list,uint8_t *dest_y, - uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset, - int src_y_offset,qpel_mc_func *qpix_op, - h264_chroma_mc_func chroma_op,cavs_vector *mv){ +static inline void mc_dir_part(AVSContext *h,Picture *pic, + int chroma_height,int delta,int list,uint8_t *dest_y, + uint8_t *dest_cb,uint8_t *dest_cr,int src_x_offset, + int src_y_offset,qpel_mc_func *qpix_op, + h264_chroma_mc_func chroma_op,cavs_vector *mv) +{ MpegEncContext * const s = &h->s; const int mx= mv->x + src_x_offset*8; const int my= mv->y + src_y_offset*8; @@ -360,9 +361,6 @@ static inline void mc_dir_part(AVSContext *h,Picture *pic,int square, } qpix_op[luma_xy](dest_y, src_y, h->l_stride); //FIXME try variable height perhaps? - if(!square){ - qpix_op[luma_xy](dest_y + delta, src_y + delta, h->l_stride); - } if(emu){ s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb, h->c_stride, @@ -379,11 +377,12 @@ static inline void mc_dir_part(AVSContext *h,Picture *pic,int square, chroma_op(dest_cr, src_cr, h->c_stride, chroma_height, mx&7, my&7); } -static inline void mc_part_std(AVSContext *h,int square,int chroma_height,int delta, - uint8_t *dest_y,uint8_t *dest_cb,uint8_t *dest_cr, - int x_offset, int y_offset,qpel_mc_func *qpix_put, - h264_chroma_mc_func chroma_put,qpel_mc_func *qpix_avg, - h264_chroma_mc_func chroma_avg, cavs_vector *mv){ +static inline void mc_part_std(AVSContext *h,int chroma_height,int delta, + uint8_t *dest_y,uint8_t *dest_cb,uint8_t *dest_cr, + int x_offset, int y_offset,qpel_mc_func *qpix_put, + h264_chroma_mc_func chroma_put,qpel_mc_func *qpix_avg, + h264_chroma_mc_func chroma_avg, cavs_vector *mv) +{ qpel_mc_func *qpix_op= qpix_put; h264_chroma_mc_func chroma_op= chroma_put; @@ -395,7 +394,7 @@ static inline void mc_part_std(AVSContext *h,int square,int chroma_height,int de if(mv->ref >= 0){ Picture *ref= &h->DPB[mv->ref]; - mc_dir_part(h, ref, square, chroma_height, delta, 0, + mc_dir_part(h, ref, chroma_height, delta, 0, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_op, chroma_op, mv); @@ -405,7 +404,7 @@ static inline void mc_part_std(AVSContext *h,int square,int chroma_height,int de if((mv+MV_BWD_OFFS)->ref >= 0){ Picture *ref= &h->DPB[0]; - mc_dir_part(h, ref, square, chroma_height, delta, 1, + mc_dir_part(h, ref, chroma_height, delta, 1, dest_y, dest_cb, dest_cr, x_offset, y_offset, qpix_op, chroma_op, mv+MV_BWD_OFFS); } @@ -413,28 +412,28 @@ static inline void mc_part_std(AVSContext *h,int square,int chroma_height,int de void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type) { if(ff_cavs_partition_flags[mb_type] == 0){ // 16x16 - mc_part_std(h, 1, 8, 0, h->cy, h->cu, h->cv, 0, 0, + mc_part_std(h, 8, 0, h->cy, h->cu, h->cv, 0, 0, h->cdsp.put_cavs_qpel_pixels_tab[0], h->s.dsp.put_h264_chroma_pixels_tab[0], h->cdsp.avg_cavs_qpel_pixels_tab[0], h->s.dsp.avg_h264_chroma_pixels_tab[0],&h->mv[MV_FWD_X0]); }else{ - mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 0, 0, + mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 0, 0, h->cdsp.put_cavs_qpel_pixels_tab[1], h->s.dsp.put_h264_chroma_pixels_tab[1], h->cdsp.avg_cavs_qpel_pixels_tab[1], h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X0]); - mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 4, 0, + mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 4, 0, h->cdsp.put_cavs_qpel_pixels_tab[1], h->s.dsp.put_h264_chroma_pixels_tab[1], h->cdsp.avg_cavs_qpel_pixels_tab[1], h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X1]); - mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 0, 4, + mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 0, 4, h->cdsp.put_cavs_qpel_pixels_tab[1], h->s.dsp.put_h264_chroma_pixels_tab[1], h->cdsp.avg_cavs_qpel_pixels_tab[1], h->s.dsp.avg_h264_chroma_pixels_tab[1],&h->mv[MV_FWD_X2]); - mc_part_std(h, 1, 4, 0, h->cy, h->cu, h->cv, 4, 4, + mc_part_std(h, 4, 0, h->cy, h->cu, h->cv, 4, 4, h->cdsp.put_cavs_qpel_pixels_tab[1], h->s.dsp.put_h264_chroma_pixels_tab[1], h->cdsp.avg_cavs_qpel_pixels_tab[1], |