diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 17:23:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 17:23:10 +0100 |
commit | a0b39747b7213b5b76c0ce5984c1dac63933737f (patch) | |
tree | a7e0c573b4882bb07baa8c4160022f9e35e1f52b | |
parent | 06e5b331f5bc32c7a09db4de90841225dfcd8930 (diff) | |
parent | 6490a0c0fbe0e55f765ea2aa2e8495181ea1f719 (diff) | |
download | ffmpeg-a0b39747b7213b5b76c0ce5984c1dac63933737f.tar.gz |
Merge commit '6490a0c0fbe0e55f765ea2aa2e8495181ea1f719'
* commit '6490a0c0fbe0e55f765ea2aa2e8495181ea1f719':
h264_mb: constify all uses of H264Context
Conflicts:
libavcodec/h264.h
libavcodec/h264_mb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.h | 2 | ||||
-rw-r--r-- | libavcodec/h264_mb.c | 36 | ||||
-rw-r--r-- | libavcodec/h264_mb_template.c | 4 | ||||
-rw-r--r-- | libavcodec/h264_mc_template.c | 20 |
4 files changed, 31 insertions, 31 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 6c74bf9459..0b44b441e7 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -865,7 +865,7 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h, H264SliceContext *sl); int ff_h264_check_intra_pred_mode(H264Context *h, H264SliceContext *sl, int mode, int is_chroma); -void ff_h264_hl_decode_mb(H264Context *h, H264SliceContext *sl); +void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl); int ff_h264_decode_extradata(H264Context *h, const uint8_t *buf, int size); int ff_h264_decode_init(AVCodecContext *avctx); void ff_h264_decode_init_vlc(void); diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c index 2240b54a12..d33d23792e 100644 --- a/libavcodec/h264_mb.c +++ b/libavcodec/h264_mb.c @@ -36,7 +36,7 @@ #include "svq3.h" #include "thread.h" -static inline int get_lowest_part_list_y(H264Context *h, H264SliceContext *sl, +static inline int get_lowest_part_list_y(H264SliceContext *sl, H264Picture *pic, int n, int height, int y_offset, int list) { @@ -50,7 +50,7 @@ static inline int get_lowest_part_list_y(H264Context *h, H264SliceContext *sl, return FFMAX(0, bottom); } -static inline void get_lowest_part_y(H264Context *h, H264SliceContext *sl, +static inline void get_lowest_part_y(const H264Context *h, H264SliceContext *sl, int16_t refs[2][48], int n, int height, int y_offset, int list0, int list1, int *nrefs) @@ -68,7 +68,7 @@ static inline void get_lowest_part_y(H264Context *h, H264SliceContext *sl, // Fields can wait on each other, though. if (ref->tf.progress->data != h->cur_pic.tf.progress->data || (ref->reference & 3) != h->picture_structure) { - my = get_lowest_part_list_y(h, sl, ref, n, height, y_offset, 0); + my = get_lowest_part_list_y(sl, ref, n, height, y_offset, 0); if (refs[0][ref_n] < 0) nrefs[0] += 1; refs[0][ref_n] = FFMAX(refs[0][ref_n], my); @@ -81,7 +81,7 @@ static inline void get_lowest_part_y(H264Context *h, H264SliceContext *sl, if (ref->tf.progress->data != h->cur_pic.tf.progress->data || (ref->reference & 3) != h->picture_structure) { - my = get_lowest_part_list_y(h, sl, ref, n, height, y_offset, 1); + my = get_lowest_part_list_y(sl, ref, n, height, y_offset, 1); if (refs[1][ref_n] < 0) nrefs[1] += 1; refs[1][ref_n] = FFMAX(refs[1][ref_n], my); @@ -94,7 +94,7 @@ static inline void get_lowest_part_y(H264Context *h, H264SliceContext *sl, * * @param h the H264 context */ -static void await_references(H264Context *h, H264SliceContext *sl) +static void await_references(const H264Context *h, H264SliceContext *sl) { const int mb_xy = sl->mb_xy; const int mb_type = h->cur_pic.mb_type[mb_xy]; @@ -202,14 +202,14 @@ static void await_references(H264Context *h, H264SliceContext *sl) } } -static av_always_inline void mc_dir_part(H264Context *h, H264SliceContext *sl, +static av_always_inline void mc_dir_part(const H264Context *h, H264SliceContext *sl, H264Picture *pic, int n, int square, int 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, + const qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op, int pixel_shift, int chroma_idc) { @@ -318,20 +318,20 @@ static av_always_inline void mc_dir_part(H264Context *h, H264SliceContext *sl, mx & 7, ((unsigned)my << (chroma_idc == 2 /* yuv422 */)) & 7); } -static av_always_inline void mc_part_std(H264Context *h, H264SliceContext *sl, +static av_always_inline void mc_part_std(const H264Context *h, H264SliceContext *sl, int n, int square, int 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, + const qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, - qpel_mc_func *qpix_avg, + const qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, int list0, int list1, int pixel_shift, int chroma_idc) { - qpel_mc_func *qpix_op = qpix_put; + const qpel_mc_func *qpix_op = qpix_put; h264_chroma_mc_func chroma_op = chroma_put; dest_y += (2 * x_offset << pixel_shift) + 2 * y_offset * sl->mb_linesize; @@ -366,13 +366,13 @@ static av_always_inline void mc_part_std(H264Context *h, H264SliceContext *sl, } } -static av_always_inline void mc_part_weighted(H264Context *h, H264SliceContext *sl, +static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceContext *sl, int n, int square, int 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, + const qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, h264_weight_func luma_weight_op, h264_weight_func chroma_weight_op, @@ -480,7 +480,7 @@ static av_always_inline void mc_part_weighted(H264Context *h, H264SliceContext * } } -static av_always_inline void prefetch_motion(H264Context *h, H264SliceContext *sl, +static av_always_inline void prefetch_motion(const H264Context *h, H264SliceContext *sl, int list, int pixel_shift, int chroma_idc) { @@ -505,7 +505,7 @@ static av_always_inline void prefetch_motion(H264Context *h, H264SliceContext *s } } -static av_always_inline void xchg_mb_border(H264Context *h, H264SliceContext *sl, +static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceContext *sl, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, @@ -610,7 +610,7 @@ static av_always_inline void dctcoef_set(int16_t *mb, int high_bit_depth, AV_WN16A(mb + index, value); } -static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, +static av_always_inline void hl_decode_mb_predict_luma(const H264Context *h, H264SliceContext *sl, int mb_type, int is_h264, int simple, @@ -732,7 +732,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, } } -static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, H264SliceContext *sl, +static av_always_inline void hl_decode_mb_idct_luma(const H264Context *h, H264SliceContext *sl, int mb_type, int is_h264, int simple, int transform_bypass, @@ -815,7 +815,7 @@ static av_always_inline void hl_decode_mb_idct_luma(H264Context *h, H264SliceCon #define SIMPLE 0 #include "h264_mb_template.c" -void ff_h264_hl_decode_mb(H264Context *h, H264SliceContext *sl) +void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl) { const int mb_xy = sl->mb_xy; const int mb_type = h->cur_pic.mb_type[mb_xy]; diff --git a/libavcodec/h264_mb_template.c b/libavcodec/h264_mb_template.c index 67c332ed17..52d60be93b 100644 --- a/libavcodec/h264_mb_template.c +++ b/libavcodec/h264_mb_template.c @@ -40,7 +40,7 @@ #define CHROMA_IDC 2 #include "h264_mc_template.c" -static av_noinline void FUNC(hl_decode_mb)(H264Context *h, H264SliceContext *sl) +static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContext *sl) { const int mb_x = sl->mb_x; const int mb_y = sl->mb_y; @@ -269,7 +269,7 @@ static av_noinline void FUNC(hl_decode_mb)(H264Context *h, H264SliceContext *sl) #define CHROMA_IDC 3 #include "h264_mc_template.c" -static av_noinline void FUNC(hl_decode_mb_444)(H264Context *h, H264SliceContext *sl) +static av_noinline void FUNC(hl_decode_mb_444)(const H264Context *h, H264SliceContext *sl) { const int mb_x = sl->mb_x; const int mb_y = sl->mb_y; diff --git a/libavcodec/h264_mc_template.c b/libavcodec/h264_mc_template.c index e9f6ed5002..eaead35bb2 100644 --- a/libavcodec/h264_mc_template.c +++ b/libavcodec/h264_mc_template.c @@ -34,18 +34,18 @@ #undef mc_part #define mc_part MCFUNC(mc_part) -static void mc_part(H264Context *h, H264SliceContext *sl, +static void mc_part(const H264Context *h, H264SliceContext *sl, int n, int square, int 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, + const qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, - qpel_mc_func *qpix_avg, + const qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, - h264_weight_func *weight_op, - h264_biweight_func *weight_avg, + const h264_weight_func *weight_op, + const h264_biweight_func *weight_avg, int list0, int list1) { if ((sl->use_weight == 2 && list0 && list1 && @@ -61,15 +61,15 @@ static void mc_part(H264Context *h, H264SliceContext *sl, chroma_avg, list0, list1, PIXEL_SHIFT, CHROMA_IDC); } -static void MCFUNC(hl_motion)(H264Context *h, H264SliceContext *sl, +static void MCFUNC(hl_motion)(const H264Context *h, H264SliceContext *sl, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, qpel_mc_func(*qpix_put)[16], - h264_chroma_mc_func(*chroma_put), + const 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) + const h264_chroma_mc_func(*chroma_avg), + const h264_weight_func *weight_op, + const h264_biweight_func *weight_avg) { const int mb_xy = sl->mb_xy; const int mb_type = h->cur_pic.mb_type[mb_xy]; |