[FFmpeg-cvslog] h264.h: constify all uses of H264Context
Anton Khirnov
git at videolan.org
Sat Mar 21 17:21:44 CET 2015
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Jan 27 15:53:33 2015 +0100| [460176aa19acb8d8bdb52af1ec97891e0f65843c] | committer: Anton Khirnov
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
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=460176aa19acb8d8bdb52af1ec97891e0f65843c
---
libavcodec/h264.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index adb3788..42bab1b 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -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) &
More information about the ffmpeg-cvslog
mailing list