mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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>
This commit is contained in:
parent
b3591ccdf1
commit
4130789f4f
@ -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);
|
||||
}
|
||||
|
@ -335,11 +335,6 @@ typedef struct VP8Context {
|
||||
|
||||
int vp7;
|
||||
|
||||
/**
|
||||
* Fade bit present in bitstream (VP7)
|
||||
*/
|
||||
int fade_present;
|
||||
|
||||
/**
|
||||
* Interframe DC prediction (VP7)
|
||||
* [0] VP8_FRAME_PREVIOUS
|
||||
|
Loading…
Reference in New Issue
Block a user