1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

h264.h: constify all uses of H264Context

All the variables modified by this code are either per-MB arrays or have
been moved to the per-slice context
This commit is contained in:
Anton Khirnov 2015-01-27 15:53:33 +01:00
parent d27b8248a6
commit 460176aa19

View File

@ -915,7 +915,7 @@ static av_always_inline uint16_t pack8to16(int a, int b)
/**
* Get the chroma qp.
*/
static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale)
static av_always_inline int get_chroma_qp(const H264Context *h, int t, int qscale)
{
return h->pps.chroma_qp_table[t][qscale];
}
@ -923,7 +923,7 @@ static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale)
/**
* Get the predicted intra4x4 prediction mode.
*/
static av_always_inline int pred_intra_mode(H264Context *h,
static av_always_inline int pred_intra_mode(const H264Context *h,
H264SliceContext *sl, int n)
{
const int index8 = scan8[n];
@ -939,7 +939,7 @@ static av_always_inline int pred_intra_mode(H264Context *h,
return min;
}
static av_always_inline void write_back_intra_pred_mode(H264Context *h,
static av_always_inline void write_back_intra_pred_mode(const H264Context *h,
H264SliceContext *sl)
{
int8_t *i4x4 = sl->intra4x4_pred_mode + h->mb2br_xy[sl->mb_xy];
@ -951,7 +951,7 @@ static av_always_inline void write_back_intra_pred_mode(H264Context *h,
i4x4[6] = i4x4_cache[7 + 8 * 1];
}
static av_always_inline void write_back_non_zero_count(H264Context *h,
static av_always_inline void write_back_non_zero_count(const H264Context *h,
H264SliceContext *sl)
{
const int mb_xy = sl->mb_xy;
@ -975,7 +975,7 @@ static av_always_inline void write_back_non_zero_count(H264Context *h,
}
}
static av_always_inline void write_back_motion_list(H264Context *h,
static av_always_inline void write_back_motion_list(const H264Context *h,
H264SliceContext *sl,
int b_stride,
int b_xy, int b8_xy,
@ -1011,7 +1011,7 @@ static av_always_inline void write_back_motion_list(H264Context *h,
}
}
static av_always_inline void write_back_motion(H264Context *h,
static av_always_inline void write_back_motion(const H264Context *h,
H264SliceContext *sl,
int mb_type)
{
@ -1038,7 +1038,7 @@ static av_always_inline void write_back_motion(H264Context *h,
}
}
static av_always_inline int get_dct8x8_allowed(H264Context *h, H264SliceContext *sl)
static av_always_inline int get_dct8x8_allowed(const H264Context *h, H264SliceContext *sl)
{
if (h->sps.direct_8x8_inference_flag)
return !(AV_RN64A(sl->sub_mb_type) &