aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-21 10:12:15 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-19 01:18:07 +0100
commit485121b92ce7a7447428c53ba875c58c79dc9e6a (patch)
tree4d11ecdd424f91f0df9f5d3664682bb20194ecdd
parent17605d1a4afa5761271b27b2aea756a772ca0efc (diff)
downloadffmpeg-485121b92ce7a7447428c53ba875c58c79dc9e6a.tar.gz
avcodec/ffv1, ffv1dec: Add const where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/ffv1.c4
-rw-r--r--libavcodec/ffv1.h4
-rw-r--r--libavcodec/ffv1dec.c5
3 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index a27eca5ae3..d8a0c39254 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -63,7 +63,7 @@ av_cold int ff_ffv1_common_init(AVCodecContext *avctx)
return 0;
}
-av_cold int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
+av_cold int ff_ffv1_init_slice_state(const FFV1Context *f, FFV1Context *fs)
{
int j, i;
@@ -170,7 +170,7 @@ int ff_ffv1_allocate_initial_states(FFV1Context *f)
return 0;
}
-void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
+void ff_ffv1_clear_slice_state(const FFV1Context *f, FFV1Context *fs)
{
int i, j;
diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h
index 473780c876..8ffe5ab433 100644
--- a/libavcodec/ffv1.h
+++ b/libavcodec/ffv1.h
@@ -139,11 +139,11 @@ typedef struct FFV1Context {
} FFV1Context;
int ff_ffv1_common_init(AVCodecContext *avctx);
-int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs);
+int ff_ffv1_init_slice_state(const FFV1Context *f, FFV1Context *fs);
int ff_ffv1_init_slices_state(FFV1Context *f);
int ff_ffv1_init_slice_contexts(FFV1Context *f);
int ff_ffv1_allocate_initial_states(FFV1Context *f);
-void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs);
+void ff_ffv1_clear_slice_state(const FFV1Context *f, FFV1Context *fs);
int ff_ffv1_close(AVCodecContext *avctx);
static av_always_inline int fold(int diff, int bits)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 74c907a156..c6af4e9bc0 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -161,7 +161,7 @@ static int decode_plane(FFV1Context *s, uint8_t *src,
return 0;
}
-static int decode_slice_header(FFV1Context *f, FFV1Context *fs)
+static int decode_slice_header(const FFV1Context *f, FFV1Context *fs)
{
RangeCoder *c = &fs->c;
uint8_t state[CONTEXT_SIZE];
@@ -974,7 +974,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
return buf_size;
}
-static void copy_fields(FFV1Context *fsdst, FFV1Context *fssrc, FFV1Context *fsrc)
+static void copy_fields(FFV1Context *fsdst, const FFV1Context *fssrc,
+ const FFV1Context *fsrc)
{
fsdst->version = fsrc->version;
fsdst->micro_version = fsrc->micro_version;