diff options
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r-- | libavcodec/mpegvideo.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 82889a0edd..195a2b3238 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -590,9 +590,11 @@ void ff_mpv_motion(MpegEncContext *s, op_pixels_func (*pix_op)[4], qpel_mc_func (*qpix_op)[16]); -static inline void ff_update_block_index(MpegEncContext *s){ - const int bytes_per_pixel = 1 + (s->avctx->bits_per_raw_sample > 8); - const int block_size= (8*bytes_per_pixel) >> s->avctx->lowres; +static inline void ff_update_block_index(MpegEncContext *s, int bits_per_raw_sample, + int lowres, int chroma_x_shift) +{ + const int bytes_per_pixel = 1 + (bits_per_raw_sample > 8); + const int block_size = (8 * bytes_per_pixel) >> lowres; s->block_index[0]+=2; s->block_index[1]+=2; @@ -601,8 +603,8 @@ static inline void ff_update_block_index(MpegEncContext *s){ s->block_index[4]++; s->block_index[5]++; s->dest[0]+= 2*block_size; - s->dest[1]+= (2 >> s->chroma_x_shift) * block_size; - s->dest[2]+= (2 >> s->chroma_x_shift) * block_size; + s->dest[1] += (2 >> chroma_x_shift) * block_size; + s->dest[2] += (2 >> chroma_x_shift) * block_size; } #endif /* AVCODEC_MPEGVIDEO_H */ |