[Libva] [Libva-intel-driver][PATCH 01/18] intel_mfc_brc_prepare() only works for H.264 or H.264 MVC

Xiang, Haihao haihao.xiang at intel.com
Tue Sep 6 15:41:46 UTC 2016


Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
 src/gen6_mfc_common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c
index 9f041d8..abeefa8 100644
--- a/src/gen6_mfc_common.c
+++ b/src/gen6_mfc_common.c
@@ -422,9 +422,12 @@ void intel_mfc_brc_prepare(struct encode_state *encode_state,
     unsigned int rate_control_mode = encoder_context->rate_control_mode;
     struct gen6_mfc_context *mfc_context = encoder_context->mfc_context;
 
+    if (encoder_context->codec != CODEC_H264 &&
+        encoder_context->codec != CODEC_H264_MVC)
+        return;
+
     if (rate_control_mode == VA_RC_CBR) {
         bool brc_updated;
-        assert(encoder_context->codec != CODEC_MPEG2);
 
         brc_updated = intel_mfc_brc_updated_check(encode_state, encoder_context);
 
-- 
1.9.1



More information about the Libva mailing list