aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-09 17:17:15 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-11 20:56:03 +0200
commit4130789f4f20e67ef44f8c721955c5e3bcbc1b09 (patch)
treebf63982bcb4cce037f14316eb042acf66e4f1e46 /libavcodec/vp8.c
parentb3591ccdf1f364ecea1f0d4b5777d1818e2ec13e (diff)
downloadffmpeg-4130789f4f20e67ef44f8c721955c5e3bcbc1b09.tar.gz
avcodec/vp8: Move fade_present from context to stack
It is only an auxiliary value used for parsing the VP7 frame header. Reviewed-by: Peter Ross <pross@xvid.org> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index f83a0d66bb..07ea3c6dd1 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -580,6 +580,7 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
int height = s->avctx->height;
int alpha = 0;
int beta = 0;
+ int fade_present = 1;
if (buf_size < 4) {
return AVERROR_INVALIDDATA;
@@ -681,7 +682,6 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
s->update_last = 1;
s->update_probabilities = 1;
- s->fade_present = 1;
if (s->profile > 0) {
s->update_probabilities = vp89_rac_get(c);
@@ -689,13 +689,13 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
s->prob[1] = s->prob[0];
if (!s->keyframe)
- s->fade_present = vp89_rac_get(c);
+ fade_present = vp89_rac_get(c);
}
if (vpx_rac_is_end(c))
return AVERROR_INVALIDDATA;
/* E. Fading information for previous frame */
- if (s->fade_present && vp89_rac_get(c)) {
+ if (fade_present && vp89_rac_get(c)) {
alpha = (int8_t) vp89_rac_get_uint(c, 8);
beta = (int8_t) vp89_rac_get_uint(c, 8);
}