summaryrefslogtreecommitdiff
path: root/src/gen8_mfc.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-10-24 12:49:41 +0800
committerSean V Kelley <seanvk@posteo.de>2016-10-24 15:46:13 -0700
commit218cca1856bfae6090a842342522a9018d6a328a (patch)
tree6e747f7b8ba343bba1a7c2303d641c6e861395b5 /src/gen8_mfc.c
parent36003e66b46bdb740813c021fe61dcd5538f1e11 (diff)
downloadlibva-intel-driver-218cca1856bfae6090a842342522a9018d6a328a.tar.gz
svct: Save the frame numbers for each frame type in a GOP per layer
Use the right frame numbers in a GOP to estimate a QP for next frame Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'src/gen8_mfc.c')
-rw-r--r--src/gen8_mfc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gen8_mfc.c b/src/gen8_mfc.c
index 6576950e..716b8e94 100644
--- a/src/gen8_mfc.c
+++ b/src/gen8_mfc.c
@@ -3344,8 +3344,8 @@ static void gen8_mfc_vp8_brc_init(struct encode_state *encode_state,
(double)(inum + BRC_PWEIGHT * pnum ));
mfc_context->brc.target_frame_size[0][SLICE_TYPE_P] = BRC_PWEIGHT * mfc_context->brc.target_frame_size[0][SLICE_TYPE_I];
- mfc_context->brc.gop_nums[SLICE_TYPE_I] = inum;
- mfc_context->brc.gop_nums[SLICE_TYPE_P] = pnum;
+ mfc_context->brc.gop_nums[0][SLICE_TYPE_I] = inum;
+ mfc_context->brc.gop_nums[0][SLICE_TYPE_P] = pnum;
mfc_context->brc.bits_per_frame[0] = bitrate/frame_rate;
@@ -3398,7 +3398,7 @@ static int gen8_mfc_vp8_brc_postpack(struct encode_state *encode_state,
if (mfc_context->hrd.buffer_capacity < 5)
frame_size_alpha = 0;
else
- frame_size_alpha = (double)mfc_context->brc.gop_nums[slicetype];
+ frame_size_alpha = (double)mfc_context->brc.gop_nums[0][slicetype];
if (frame_size_alpha > 30) frame_size_alpha = 30;
frame_size_next = target_frame_size + (double)(target_frame_size - frame_bits) /
(double)(frame_size_alpha + 1.);