Commit 7aaf092f authored by James Almer's avatar James Almer

avcodec/cbs_vp9: store profile in the private context

Derived from profile_low_bit and profile_high_bit.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent ec440339
...@@ -190,6 +190,8 @@ typedef struct VP9ReferenceFrameState { ...@@ -190,6 +190,8 @@ typedef struct VP9ReferenceFrameState {
} VP9ReferenceFrameState; } VP9ReferenceFrameState;
typedef struct CodedBitstreamVP9Context { typedef struct CodedBitstreamVP9Context {
int profile;
// Frame dimensions in 8x8 mode info blocks. // Frame dimensions in 8x8 mode info blocks.
uint16_t mi_cols; uint16_t mi_cols;
uint16_t mi_rows; uint16_t mi_rows;
......
...@@ -278,15 +278,14 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, ...@@ -278,15 +278,14 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
VP9RawFrameHeader *current) VP9RawFrameHeader *current)
{ {
CodedBitstreamVP9Context *vp9 = ctx->priv_data; CodedBitstreamVP9Context *vp9 = ctx->priv_data;
int profile, i; int err, i;
int err;
f(2, frame_marker); f(2, frame_marker);
f(1, profile_low_bit); f(1, profile_low_bit);
f(1, profile_high_bit); f(1, profile_high_bit);
profile = (current->profile_high_bit << 1) + current->profile_low_bit; vp9->profile = (current->profile_high_bit << 1) + current->profile_low_bit;
if (profile == 3) if (vp9->profile == 3)
fixed(1, reserved_zero, 0); fixed(1, reserved_zero, 0);
f(1, show_existing_frame); f(1, show_existing_frame);
...@@ -304,7 +303,7 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, ...@@ -304,7 +303,7 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
if (current->frame_type == VP9_KEY_FRAME) { if (current->frame_type == VP9_KEY_FRAME) {
CHECK(FUNC(frame_sync_code)(ctx, rw, current)); CHECK(FUNC(frame_sync_code)(ctx, rw, current));
CHECK(FUNC(color_config)(ctx, rw, current, profile)); CHECK(FUNC(color_config)(ctx, rw, current, vp9->profile));
CHECK(FUNC(frame_size)(ctx, rw, current)); CHECK(FUNC(frame_size)(ctx, rw, current));
CHECK(FUNC(render_size)(ctx, rw, current)); CHECK(FUNC(render_size)(ctx, rw, current));
...@@ -324,8 +323,8 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw, ...@@ -324,8 +323,8 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
if (current->intra_only == 1) { if (current->intra_only == 1) {
CHECK(FUNC(frame_sync_code)(ctx, rw, current)); CHECK(FUNC(frame_sync_code)(ctx, rw, current));
if (profile > 0) { if (vp9->profile > 0) {
CHECK(FUNC(color_config)(ctx, rw, current, profile)); CHECK(FUNC(color_config)(ctx, rw, current, vp9->profile));
} else { } else {
infer(color_space, 1); infer(color_space, 1);
infer(subsampling_x, 1); infer(subsampling_x, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment