Loading drivers/media/platform/msm/vidc/hfi_packetization.c +20 −0 Original line number Original line Diff line number Diff line Loading @@ -2311,6 +2311,26 @@ static int create_3x_pkt_cmd_session_set_property( pkt->size += sizeof(u32) * 2; pkt->size += sizeof(u32) * 2; break; break; } } case HAL_CONFIG_VENC_BLUR_RESOLUTION: { struct hfi_frame_size *hfi; struct hal_frame_size *prop = (struct hal_frame_size *) pdata; u32 buffer_type; pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE; hfi = (struct hfi_frame_size *) &pkt->rg_property_data[1]; buffer_type = get_hfi_buffer(prop->buffer_type); if (buffer_type) hfi->buffer_type = buffer_type; else return -EINVAL; hfi->height = prop->height; hfi->width = prop->width; pkt->size += sizeof(u32) + sizeof(struct hfi_frame_size); break; } default: default: rc = create_pkt_cmd_session_set_property(pkt, rc = create_pkt_cmd_session_set_property(pkt, session, ptype, pdata); session, ptype, pdata); Loading drivers/media/platform/msm/vidc/msm_venc.c +31 −0 Original line number Original line Diff line number Diff line Loading @@ -1204,6 +1204,23 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = { .minimum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, .minimum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, .maximum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE, .maximum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE, .default_value = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, .default_value = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, }, { .id = V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH, .name = "Set Blur width", .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, .maximum = 2048, .default_value = 0, .step = 1, }, { .id = V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT, .name = "Set Blur height", .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, .maximum = 2048, .default_value = 0, .step = 1, .step = 1, }, }, }; }; Loading Loading @@ -3197,6 +3214,7 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, struct hal_initial_quantization quant; struct hal_initial_quantization quant; struct hal_aspect_ratio sar; struct hal_aspect_ratio sar; struct hal_bitrate bitrate; struct hal_bitrate bitrate; struct hal_frame_size blur_res; if (!inst || !inst->core || !inst->core->device || !ctrl) { if (!inst || !inst->core || !inst->core->device || !ctrl) { dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); Loading Loading @@ -3325,6 +3343,19 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, } } break; break; } } case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH: property_id = HAL_CONFIG_VENC_BLUR_RESOLUTION; blur_res.width = control[i].value; blur_res.buffer_type = HAL_BUFFER_INPUT; property_id = HAL_CONFIG_VENC_BLUR_RESOLUTION; pdata = &blur_res; break; case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT: blur_res.height = control[i].value; blur_res.buffer_type = HAL_BUFFER_INPUT; property_id = HAL_CONFIG_VENC_BLUR_RESOLUTION; pdata = &blur_res; break; default: default: dprintk(VIDC_ERR, "Invalid id set: %d\n", dprintk(VIDC_ERR, "Invalid id set: %d\n", control[i].id); control[i].id); Loading drivers/media/platform/msm/vidc/vidc_hfi_api.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -235,6 +235,7 @@ enum hal_property { HAL_PARAM_VENC_H264_PIC_ORDER_CNT, HAL_PARAM_VENC_H264_PIC_ORDER_CNT, HAL_PARAM_VENC_LOW_LATENCY, HAL_PARAM_VENC_LOW_LATENCY, HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED, HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED, HAL_CONFIG_VENC_BLUR_RESOLUTION, }; }; enum hal_domain { enum hal_domain { Loading drivers/media/platform/msm/vidc/vidc_hfi_helper.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -417,6 +417,8 @@ struct hfi_buffer_info { #define HFI_PROPERTY_CONFIG_VPE_COMMON_START \ #define HFI_PROPERTY_CONFIG_VPE_COMMON_START \ (HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000) (HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000) #define HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE \ (HFI_PROPERTY_CONFIG_COMMON_START + 0x010) #define HFI_PROPERTY_CONFIG_VPE_DEINTERLACE \ #define HFI_PROPERTY_CONFIG_VPE_DEINTERLACE \ (HFI_PROPERTY_CONFIG_VPE_COMMON_START + 0x001) (HFI_PROPERTY_CONFIG_VPE_COMMON_START + 0x001) #define HFI_PROPERTY_CONFIG_VPE_OPERATIONS \ #define HFI_PROPERTY_CONFIG_VPE_OPERATIONS \ Loading include/uapi/linux/v4l2-controls.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -1150,6 +1150,12 @@ enum v4l2_mpeg_vidc_video_lowlatency_mode { #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG4_MIN_QP \ #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG4_MIN_QP \ (V4L2_CID_MPEG_MSM_VIDC_BASE + 90) (V4L2_CID_MPEG_MSM_VIDC_BASE + 90) #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH \ (V4L2_CID_MPEG_MSM_VIDC_BASE + 91) #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT \ (V4L2_CID_MPEG_MSM_VIDC_BASE + 92) /* Camera class control IDs */ /* Camera class control IDs */ #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) Loading Loading
drivers/media/platform/msm/vidc/hfi_packetization.c +20 −0 Original line number Original line Diff line number Diff line Loading @@ -2311,6 +2311,26 @@ static int create_3x_pkt_cmd_session_set_property( pkt->size += sizeof(u32) * 2; pkt->size += sizeof(u32) * 2; break; break; } } case HAL_CONFIG_VENC_BLUR_RESOLUTION: { struct hfi_frame_size *hfi; struct hal_frame_size *prop = (struct hal_frame_size *) pdata; u32 buffer_type; pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE; hfi = (struct hfi_frame_size *) &pkt->rg_property_data[1]; buffer_type = get_hfi_buffer(prop->buffer_type); if (buffer_type) hfi->buffer_type = buffer_type; else return -EINVAL; hfi->height = prop->height; hfi->width = prop->width; pkt->size += sizeof(u32) + sizeof(struct hfi_frame_size); break; } default: default: rc = create_pkt_cmd_session_set_property(pkt, rc = create_pkt_cmd_session_set_property(pkt, session, ptype, pdata); session, ptype, pdata); Loading
drivers/media/platform/msm/vidc/msm_venc.c +31 −0 Original line number Original line Diff line number Diff line Loading @@ -1204,6 +1204,23 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = { .minimum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, .minimum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, .maximum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE, .maximum = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_ENABLE, .default_value = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, .default_value = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_DISABLE, }, { .id = V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH, .name = "Set Blur width", .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, .maximum = 2048, .default_value = 0, .step = 1, }, { .id = V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT, .name = "Set Blur height", .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, .maximum = 2048, .default_value = 0, .step = 1, .step = 1, }, }, }; }; Loading Loading @@ -3197,6 +3214,7 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, struct hal_initial_quantization quant; struct hal_initial_quantization quant; struct hal_aspect_ratio sar; struct hal_aspect_ratio sar; struct hal_bitrate bitrate; struct hal_bitrate bitrate; struct hal_frame_size blur_res; if (!inst || !inst->core || !inst->core->device || !ctrl) { if (!inst || !inst->core || !inst->core->device || !ctrl) { dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); dprintk(VIDC_ERR, "%s invalid parameters\n", __func__); Loading Loading @@ -3325,6 +3343,19 @@ static int try_set_ext_ctrl(struct msm_vidc_inst *inst, } } break; break; } } case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH: property_id = HAL_CONFIG_VENC_BLUR_RESOLUTION; blur_res.width = control[i].value; blur_res.buffer_type = HAL_BUFFER_INPUT; property_id = HAL_CONFIG_VENC_BLUR_RESOLUTION; pdata = &blur_res; break; case V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT: blur_res.height = control[i].value; blur_res.buffer_type = HAL_BUFFER_INPUT; property_id = HAL_CONFIG_VENC_BLUR_RESOLUTION; pdata = &blur_res; break; default: default: dprintk(VIDC_ERR, "Invalid id set: %d\n", dprintk(VIDC_ERR, "Invalid id set: %d\n", control[i].id); control[i].id); Loading
drivers/media/platform/msm/vidc/vidc_hfi_api.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -235,6 +235,7 @@ enum hal_property { HAL_PARAM_VENC_H264_PIC_ORDER_CNT, HAL_PARAM_VENC_H264_PIC_ORDER_CNT, HAL_PARAM_VENC_LOW_LATENCY, HAL_PARAM_VENC_LOW_LATENCY, HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED, HAL_PARAM_VENC_CONSTRAINED_INTRA_PRED, HAL_CONFIG_VENC_BLUR_RESOLUTION, }; }; enum hal_domain { enum hal_domain { Loading
drivers/media/platform/msm/vidc/vidc_hfi_helper.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -417,6 +417,8 @@ struct hfi_buffer_info { #define HFI_PROPERTY_CONFIG_VPE_COMMON_START \ #define HFI_PROPERTY_CONFIG_VPE_COMMON_START \ (HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000) (HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000) #define HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE \ (HFI_PROPERTY_CONFIG_COMMON_START + 0x010) #define HFI_PROPERTY_CONFIG_VPE_DEINTERLACE \ #define HFI_PROPERTY_CONFIG_VPE_DEINTERLACE \ (HFI_PROPERTY_CONFIG_VPE_COMMON_START + 0x001) (HFI_PROPERTY_CONFIG_VPE_COMMON_START + 0x001) #define HFI_PROPERTY_CONFIG_VPE_OPERATIONS \ #define HFI_PROPERTY_CONFIG_VPE_OPERATIONS \ Loading
include/uapi/linux/v4l2-controls.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -1150,6 +1150,12 @@ enum v4l2_mpeg_vidc_video_lowlatency_mode { #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG4_MIN_QP \ #define V4L2_CID_MPEG_VIDC_VIDEO_MPEG4_MIN_QP \ (V4L2_CID_MPEG_MSM_VIDC_BASE + 90) (V4L2_CID_MPEG_MSM_VIDC_BASE + 90) #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_WIDTH \ (V4L2_CID_MPEG_MSM_VIDC_BASE + 91) #define V4L2_CID_MPEG_VIDC_VIDEO_BLUR_HEIGHT \ (V4L2_CID_MPEG_MSM_VIDC_BASE + 92) /* Camera class control IDs */ /* Camera class control IDs */ #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) Loading