mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-07 18:11:02 +08:00
[vp9d]: fix bug: intra_only reset frame context
tips: reset frame context modes a) intraonly && resetctx==2, reset all context. b) intraonly && resetctx==3, rest currently used. c) keyframe || intraonly, set framectxid = 0. Change-Id: I0d2c38277f720d33a98f7f5148c96f560e423365 Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
@@ -1059,7 +1059,8 @@ static RK_S32 decode_parser_header(Vp9CodecContext *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (s->keyframe || s->errorres || s->intraonly) {
|
||||
if (s->keyframe || s->errorres ||
|
||||
(s->intraonly && s->resetctx == 3)) {
|
||||
s->prob_ctx[0].p = s->prob_ctx[1].p = s->prob_ctx[2].p =
|
||||
s->prob_ctx[3].p = vp9_default_probs;
|
||||
memcpy(s->prob_ctx[0].coef, vp9_default_coef_probs,
|
||||
@@ -1070,7 +1071,13 @@ static RK_S32 decode_parser_header(Vp9CodecContext *ctx,
|
||||
sizeof(vp9_default_coef_probs));
|
||||
memcpy(s->prob_ctx[3].coef, vp9_default_coef_probs,
|
||||
sizeof(vp9_default_coef_probs));
|
||||
} else if (s->intraonly && s->resetctx == 2) {
|
||||
s->prob_ctx[c].p = vp9_default_probs;
|
||||
memcpy(s->prob_ctx[c].coef, vp9_default_coef_probs,
|
||||
sizeof(vp9_default_coef_probs));
|
||||
}
|
||||
if (s->keyframe || s->errorres || s->intraonly)
|
||||
s->framectxid = c = 0;
|
||||
|
||||
// next 16 bits is size of the rest of the header (arith-coded)
|
||||
size2 = mpp_get_bits(&s->gb, 16);
|
||||
|
Reference in New Issue
Block a user