Signed-off-by: Xiang, Haihao <haihao.xi...@intel.com>
---
 src/gen6_mfc_common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c
index 4f4377f..add73a6 100644
--- a/src/gen6_mfc_common.c
+++ b/src/gen6_mfc_common.c
@@ -95,8 +95,9 @@ static void intel_mfc_brc_init(struct encode_state 
*encode_state,
 {
     struct gen6_mfc_context *mfc_context = encoder_context->mfc_context;
     double bitrate, framerate;
-    double qp1_size = 0.1 * 8 * 3 * encoder_context->frame_width_in_pixel * 
encoder_context->frame_height_in_pixel / 2;
-    double qp51_size = 0.001 * 8 * 3 * encoder_context->frame_width_in_pixel * 
encoder_context->frame_height_in_pixel / 2;
+    double frame_per_bits = 8 * 3 * encoder_context->frame_width_in_pixel * 
encoder_context->frame_height_in_pixel / 2;
+    double qp1_size = 0.1 * frame_per_bits;
+    double qp51_size = 0.001 * frame_per_bits;
     double bpf, factor;
     int inum = encoder_context->brc.num_iframes_in_gop,
         pnum = encoder_context->brc.num_pframes_in_gop,
@@ -104,6 +105,9 @@ static void intel_mfc_brc_init(struct encode_state 
*encode_state,
     int intra_period = encoder_context->brc.gop_size;
     int i;
 
+    if (encoder_context->layer.num_layers > 1)
+        qp1_size = 0.15 * frame_per_bits;
+
     mfc_context->brc.mode = encoder_context->rate_control_mode;
 
     mfc_context->hrd.buffer_size = encoder_context->brc.hrd_buffer_size;
-- 
1.9.1

_______________________________________________
Libva mailing list
Libva@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to