hardware/intel/common/vaapi
Revisión | 15f79e079034699739fb09af9347870ce232c3f8 (tree) |
---|---|
Tiempo | 2017-07-13 13:17:12 |
Autor | peng.chen <peng.c.chen@inte...> |
Commiter | Xiang, Haihao |
Parse ROI Misc parameters for CQP mode
Signed-off-by: peng.chen <peng.c.chen@intel.com>
@@ -687,13 +687,12 @@ intel_encoder_check_brc_parameter(VADriverContextP ctx, | ||
687 | 687 | int hl_bitrate_updated = 0; // Indicate whether the bitrate for the highest level is changed in misc parameters |
688 | 688 | unsigned int seq_bits_per_second = 0; |
689 | 689 | |
690 | - if (!(encoder_context->rate_control_mode & (VA_RC_CBR | VA_RC_VBR))) | |
691 | - return VA_STATUS_SUCCESS; | |
692 | - | |
693 | - ret = intel_encoder_check_brc_sequence_parameter(ctx, encode_state, encoder_context, &seq_bits_per_second); | |
690 | + if (encoder_context->rate_control_mode & (VA_RC_CBR | VA_RC_VBR)) { | |
691 | + ret = intel_encoder_check_brc_sequence_parameter(ctx, encode_state, encoder_context, &seq_bits_per_second); | |
694 | 692 | |
695 | - if (ret) | |
696 | - return ret; | |
693 | + if (ret) | |
694 | + return ret; | |
695 | + } | |
697 | 696 | |
698 | 697 | for (i = 0; i < ARRAY_ELEMS(encode_state->misc_param); i++) { |
699 | 698 | for (j = 0; j < ARRAY_ELEMS(encode_state->misc_param[0]); j++) { |
@@ -702,6 +701,11 @@ intel_encoder_check_brc_parameter(VADriverContextP ctx, | ||
702 | 701 | |
703 | 702 | misc_param = (VAEncMiscParameterBuffer *)encode_state->misc_param[i][j]->buffer; |
704 | 703 | |
704 | + if (!(encoder_context->rate_control_mode & (VA_RC_CBR | VA_RC_VBR))) { | |
705 | + if (misc_param->type != VAEncMiscParameterTypeROI) | |
706 | + continue; | |
707 | + } | |
708 | + | |
705 | 709 | switch (misc_param->type) { |
706 | 710 | case VAEncMiscParameterTypeFrameRate: |
707 | 711 | intel_encoder_check_framerate_parameter(ctx, |