summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-04-11 10:05:25 +0200
committerAnton Khirnov <anton@khirnov.net>2016-04-24 10:06:24 +0200
commit755f79f84cbeb5d749fb120e55e0098a2d7663a0 (patch)
treec0e67af7e96d5ca72fdc8261cd1e14212d0bbc24
parenta2fd547839d3ef8f342b6f2c096d0887675d3b1a (diff)
downloadffmpeg-755f79f84cbeb5d749fb120e55e0098a2d7663a0.tar.gz
h264_refs: make the H264Context const where possible
-rw-r--r--libavcodec/h264.h2
-rw-r--r--libavcodec/h264_refs.c15
2 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index ac6074bcf1..580c821c23 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -686,7 +686,7 @@ int ff_h264_get_slice_type(const H264SliceContext *sl);
*/
int ff_h264_alloc_tables(H264Context *h);
-int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl);
+int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl);
void ff_h264_fill_mbaff_ref_list(H264Context *h, H264SliceContext *sl);
void ff_h264_remove_all_refs(H264Context *h);
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 0a0cc8d709..395c240387 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -74,7 +74,7 @@ static int split_field_copy(H264Ref *dest, H264Picture *src, int parity, int id_
}
static int build_def_list(H264Ref *def, int def_len,
- H264Picture **in, int len, int is_long, int sel)
+ H264Picture * const *in, int len, int is_long, int sel)
{
int i[2] = { 0 };
int index = 0;
@@ -97,7 +97,8 @@ static int build_def_list(H264Ref *def, int def_len,
return index;
}
-static int add_sorted(H264Picture **sorted, H264Picture **src, int len, int limit, int dir)
+static int add_sorted(H264Picture **sorted, H264Picture * const *src,
+ int len, int limit, int dir)
{
int i, best_poc;
int out_i = 0;
@@ -119,7 +120,7 @@ static int add_sorted(H264Picture **sorted, H264Picture **src, int len, int limi
return out_i;
}
-static void h264_initialise_ref_list(H264Context *h, H264SliceContext *sl)
+static void h264_initialise_ref_list(const H264Context *h, H264SliceContext *sl)
{
int i, len;
@@ -172,7 +173,7 @@ static void h264_initialise_ref_list(H264Context *h, H264SliceContext *sl)
/**
* print short term list
*/
-static void print_short_term(H264Context *h)
+static void print_short_term(const H264Context *h)
{
uint32_t i;
if (h->avctx->debug & FF_DEBUG_MMCO) {
@@ -188,7 +189,7 @@ static void print_short_term(H264Context *h)
/**
* print long term list
*/
-static void print_long_term(H264Context *h)
+static void print_long_term(const H264Context *h)
{
uint32_t i;
if (h->avctx->debug & FF_DEBUG_MMCO) {
@@ -213,7 +214,7 @@ static void print_long_term(H264Context *h)
* @return frame number (short term) or long term index of picture
* described by pic_num
*/
-static int pic_num_extract(H264Context *h, int pic_num, int *structure)
+static int pic_num_extract(const H264Context *h, int pic_num, int *structure)
{
*structure = h->picture_structure;
if (FIELD_PICTURE(h)) {
@@ -226,7 +227,7 @@ static int pic_num_extract(H264Context *h, int pic_num, int *structure)
return pic_num;
}
-int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl)
+int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl)
{
int list, index, pic_structure;