On 09/28/2016 08:42 AM, Xiang, Haihao wrote:
CBR and VBR for low power encode depend on the fully loaded HuC firmware.

This looks good to me.

Add: Reviewed-by: Zhao Yakui <yakui.z...@intel.com>

Thanks
   Yakui


Signed-off-by: Xiang, Haihao<haihao.xi...@intel.com>
---
  src/i965_device_info.c | 11 +++++++++++
  1 file changed, 11 insertions(+)

diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index dc16197..4db6c51 100644
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -319,6 +319,8 @@ static struct hw_codec_info chv_hw_codec_info = {
      },
  };

+static void gen9_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info 
*codec_info);
+
  extern struct hw_context *gen9_enc_hw_context_init(VADriverContextP, struct 
object_config *);
  extern void gen9_post_processing_context_init(VADriverContextP, void *, 
struct intel_batchbuffer *);
  extern void gen9_max_resolution(struct i965_driver_data *, struct 
object_config *, int *, int *);
@@ -329,6 +331,7 @@ static struct hw_codec_info skl_hw_codec_info = {
      .render_init = gen9_render_init,
      .post_processing_context_init = gen9_post_processing_context_init,
      .max_resolution = gen9_max_resolution,
+    .preinit_hw_codec = gen9_hw_codec_preinit,

      .max_width = 4096,  /* default. See max_resolution */
      .max_height = 4096, /* default. See max_resolution */
@@ -869,3 +872,11 @@ static void gen7_hw_codec_preinit(VADriverContextP ctx, 
struct hw_codec_info *co
      }
      return;
  }
+
+static void gen9_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info 
*codec_info)
+{
+    struct i965_driver_data *i965 = i965_driver_data(ctx);
+
+    if (i965->intel.has_huc&&  codec_info->has_lp_h264_encoding)
one space can be added.
+        codec_info->lp_h264_brc_mode |= (VA_RC_CBR | VA_RC_VBR);
+}

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

Reply via email to