diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-07-09 08:45:16 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-08-01 10:09:26 +0200 |
commit | 7b2bfba55db821dcb730624f34e9b62db35000ce (patch) | |
tree | 0a33b2075167050d3d236f22de72519ec62929d9 /libavcodec/ffv1.c | |
parent | 28769f6bc19ba10415405e63a06fe09f18d781b4 (diff) | |
download | ffmpeg-7b2bfba55db821dcb730624f34e9b62db35000ce.tar.gz |
lavc/ffv1: move RangeCoder to per-slice context
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r-- | libavcodec/ffv1.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 7bc4f1b135..490baac233 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -53,7 +53,7 @@ av_cold int ff_ffv1_common_init(AVCodecContext *avctx) } av_cold int ff_ffv1_init_slice_state(const FFV1Context *f, - FFV1Context *fs, FFV1SliceContext *sc) + FFV1SliceContext *sc) { int j, i; @@ -82,8 +82,8 @@ av_cold int ff_ffv1_init_slice_state(const FFV1Context *f, if (f->ac == AC_RANGE_CUSTOM_TAB) { //FIXME only redo if state_transition changed for (j = 1; j < 256; j++) { - fs->c. one_state[ j] = f->state_transition[j]; - fs->c.zero_state[256 - j] = 256 - fs->c.one_state[j]; + sc->c. one_state[ j] = f->state_transition[j]; + sc->c.zero_state[256 - j] = 256 - sc->c.one_state[j]; } } @@ -94,8 +94,7 @@ av_cold int ff_ffv1_init_slices_state(FFV1Context *f) { int i, ret; for (i = 0; i < f->max_slice_count; i++) { - FFV1Context *fs = f->slice_context[i]; - if ((ret = ff_ffv1_init_slice_state(f, fs, &f->slices[i])) < 0) + if ((ret = ff_ffv1_init_slice_state(f, &f->slices[i])) < 0) return AVERROR(ENOMEM); } return 0; |