Merge "video: driver: fix encoder output buffer size requirement"

这个提交包含在:
qctecmdr
2022-08-23 21:07:43 -07:00
提交者 Gerrit - the friendly Code Review server
当前提交 e77d578972
修改 3 个文件,包含 18 行新增9 行删除

查看文件

@@ -73,7 +73,8 @@ enum msm_vidc_metadata_bits {
#define MAX_VP9D_INST_COUNT 6
/* TODO: move below macros to waipio.c */
#define MAX_ENH_LAYER_HB 3
#define MAX_HEVC_ENH_LAYER_SLIDING_WINDOW 5
#define MAX_HEVC_VBR_ENH_LAYER_SLIDING_WINDOW 5
#define MAX_HEVC_NON_VBR_ENH_LAYER_SLIDING_WINDOW 3
#define MAX_AVC_ENH_LAYER_SLIDING_WINDOW 3
#define MAX_AVC_ENH_LAYER_HYBRID_HP 5
#define INVALID_DEFAULT_MARK_OR_USE_LTR -1

查看文件

@@ -1826,7 +1826,7 @@ static int msm_vidc_adjust_static_layer_count_and_type(struct msm_vidc_inst *ins
inst->hfi_layer_type = HFI_HIER_P_HYBRID_LTR;
}
/* sanitize layer count based on layer type and codec */
/* sanitize layer count based on layer type and codec, and rc type */
if (inst->hfi_layer_type == HFI_HIER_B) {
if (layer_count > MAX_ENH_LAYER_HB)
layer_count = MAX_ENH_LAYER_HB;
@@ -1837,9 +1837,14 @@ static int msm_vidc_adjust_static_layer_count_and_type(struct msm_vidc_inst *ins
if (inst->codec == MSM_VIDC_H264) {
if (layer_count > MAX_AVC_ENH_LAYER_SLIDING_WINDOW)
layer_count = MAX_AVC_ENH_LAYER_SLIDING_WINDOW;
} else {
if (layer_count > MAX_HEVC_ENH_LAYER_SLIDING_WINDOW)
layer_count = MAX_HEVC_ENH_LAYER_SLIDING_WINDOW;
} else if (inst->codec == MSM_VIDC_HEVC) {
if (inst->hfi_rc_type == HFI_RC_VBR_CFR) {
if (layer_count > MAX_HEVC_VBR_ENH_LAYER_SLIDING_WINDOW)
layer_count = MAX_HEVC_VBR_ENH_LAYER_SLIDING_WINDOW;
} else {
if (layer_count > MAX_HEVC_NON_VBR_ENH_LAYER_SLIDING_WINDOW)
layer_count = MAX_HEVC_NON_VBR_ENH_LAYER_SLIDING_WINDOW;
}
}
}