video: driver: redefine private v4l2 macros in common file
Define vidc macros corresponding to private v4l2 macros defined in v4l2_vidc_extensions.h file in msm_vidc_internal.h and use the same wherever applicable for successful compilation of upstream driver. Change-Id: I2c7b3741d29996beb35b08b9c6dbd88876bb6ca6 Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Šī revīzija ir iekļauta:
@@ -113,8 +113,8 @@ static inline bool is_meta_rx_inp_enabled(struct msm_vidc_inst *inst, u32 cap)
|
||||
{
|
||||
bool enabled = false;
|
||||
|
||||
if (inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_RX_INPUT)
|
||||
if (inst->capabilities->cap[cap].value & MSM_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & MSM_VIDC_META_RX_INPUT)
|
||||
enabled = true;
|
||||
|
||||
return enabled;
|
||||
@@ -124,8 +124,8 @@ static inline bool is_meta_rx_out_enabled(struct msm_vidc_inst *inst, u32 cap)
|
||||
{
|
||||
bool enabled = false;
|
||||
|
||||
if (inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_RX_OUTPUT)
|
||||
if (inst->capabilities->cap[cap].value & MSM_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & MSM_VIDC_META_RX_OUTPUT)
|
||||
enabled = true;
|
||||
|
||||
return enabled;
|
||||
@@ -135,8 +135,8 @@ static inline bool is_meta_tx_inp_enabled(struct msm_vidc_inst *inst, u32 cap)
|
||||
{
|
||||
bool enabled = false;
|
||||
|
||||
if (inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_TX_INPUT)
|
||||
if (inst->capabilities->cap[cap].value & MSM_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & MSM_VIDC_META_TX_INPUT)
|
||||
enabled = true;
|
||||
|
||||
return enabled;
|
||||
@@ -146,8 +146,8 @@ static inline bool is_meta_tx_out_enabled(struct msm_vidc_inst *inst, u32 cap)
|
||||
{
|
||||
bool enabled = false;
|
||||
|
||||
if (inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & V4L2_MPEG_VIDC_META_TX_OUTPUT)
|
||||
if (inst->capabilities->cap[cap].value & MSM_VIDC_META_ENABLE &&
|
||||
inst->capabilities->cap[cap].value & MSM_VIDC_META_TX_OUTPUT)
|
||||
enabled = true;
|
||||
|
||||
return enabled;
|
||||
|
@@ -26,6 +26,28 @@
|
||||
#define V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE (3)
|
||||
#endif
|
||||
|
||||
enum msm_vidc_blur_types {
|
||||
MSM_VIDC_BLUR_NONE = 0x0,
|
||||
MSM_VIDC_BLUR_EXTERNAL = 0x1,
|
||||
MSM_VIDC_BLUR_ADAPTIVE = 0x2,
|
||||
};
|
||||
|
||||
/* various Metadata - encoder & decoder */
|
||||
enum msm_vidc_metadata_bits {
|
||||
MSM_VIDC_META_DISABLE = 0x0,
|
||||
MSM_VIDC_META_ENABLE = 0x1,
|
||||
MSM_VIDC_META_TX_INPUT = 0x2,
|
||||
MSM_VIDC_META_TX_OUTPUT = 0x4,
|
||||
MSM_VIDC_META_RX_INPUT = 0x8,
|
||||
MSM_VIDC_META_RX_OUTPUT = 0x10,
|
||||
MSM_VIDC_META_MAX = 0x20,
|
||||
};
|
||||
|
||||
#define MSM_VIDC_METADATA_SIZE (4 * 4096) /* 16 KB */
|
||||
#define ENCODE_INPUT_METADATA_SIZE (512 * 4096) /* 2 MB */
|
||||
#define DECODE_INPUT_METADATA_SIZE MSM_VIDC_METADATA_SIZE
|
||||
#define MSM_VIDC_METADATA_DOLBY_RPU_SIZE (41 * 1024) /* 41 KB */
|
||||
|
||||
#define MAX_NAME_LENGTH 128
|
||||
#define VENUS_VERSION_LENGTH 128
|
||||
#define MAX_MATRIX_COEFFS 9
|
||||
|
@@ -1349,8 +1349,8 @@ static int msm_vdec_read_input_subcr_params(struct msm_vidc_inst *inst)
|
||||
if (inst->capabilities->cap[CODED_FRAMES].value ==
|
||||
CODED_FRAMES_INTERLACE) {
|
||||
msm_vidc_update_cap_value(inst, META_OUTBUF_FENCE,
|
||||
V4L2_MPEG_VIDC_META_RX_INPUT |
|
||||
V4L2_MPEG_VIDC_META_DISABLE, __func__);
|
||||
MSM_VIDC_META_RX_INPUT |
|
||||
MSM_VIDC_META_DISABLE, __func__);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -468,7 +468,7 @@ int msm_vidc_update_cap_value(struct msm_vidc_inst *inst, u32 cap_id,
|
||||
* cumulative control value if client set same metadata
|
||||
* control multiple times.
|
||||
*/
|
||||
if (adjusted_val & V4L2_MPEG_VIDC_META_ENABLE) {
|
||||
if (adjusted_val & MSM_VIDC_META_ENABLE) {
|
||||
/* enable metadata */
|
||||
inst->capabilities->cap[cap_id].value |= adjusted_val;
|
||||
} else {
|
||||
@@ -2350,7 +2350,7 @@ int msm_vidc_adjust_blur_type(void *instance, struct v4l2_ctrl *ctrl)
|
||||
adjusted_value = ctrl ? ctrl->val :
|
||||
capability->cap[BLUR_TYPES].value;
|
||||
|
||||
if (adjusted_value == VIDC_BLUR_NONE)
|
||||
if (adjusted_value == MSM_VIDC_BLUR_NONE)
|
||||
return 0;
|
||||
|
||||
if (msm_vidc_get_parent_value(inst, BLUR_TYPES, BITRATE_MODE,
|
||||
@@ -2363,17 +2363,17 @@ int msm_vidc_adjust_blur_type(void *instance, struct v4l2_ctrl *ctrl)
|
||||
&roi_enable, __func__))
|
||||
return -EINVAL;
|
||||
|
||||
if (adjusted_value == VIDC_BLUR_EXTERNAL) {
|
||||
if (adjusted_value == MSM_VIDC_BLUR_EXTERNAL) {
|
||||
if (is_scaling_enabled(inst) || min_quality) {
|
||||
adjusted_value = VIDC_BLUR_NONE;
|
||||
adjusted_value = MSM_VIDC_BLUR_NONE;
|
||||
}
|
||||
} else if (adjusted_value == VIDC_BLUR_ADAPTIVE) {
|
||||
} else if (adjusted_value == MSM_VIDC_BLUR_ADAPTIVE) {
|
||||
if (is_scaling_enabled(inst) || min_quality ||
|
||||
(rc_type != HFI_RC_VBR_CFR &&
|
||||
rc_type != HFI_RC_CBR_CFR &&
|
||||
rc_type != HFI_RC_CBR_VFR) ||
|
||||
is_10bit_colorformat(pix_fmts) || roi_enable) {
|
||||
adjusted_value = VIDC_BLUR_NONE;
|
||||
adjusted_value = MSM_VIDC_BLUR_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2450,7 +2450,7 @@ int msm_vidc_adjust_blur_resolution(void *instance, struct v4l2_ctrl *ctrl)
|
||||
&blur_type, __func__))
|
||||
return -EINVAL;
|
||||
|
||||
if (blur_type != VIDC_BLUR_EXTERNAL)
|
||||
if (blur_type != MSM_VIDC_BLUR_EXTERNAL)
|
||||
return 0;
|
||||
|
||||
msm_vidc_update_cap_value(inst, BLUR_RESOLUTION,
|
||||
@@ -2774,7 +2774,7 @@ int msm_vidc_adjust_dec_lowlatency_mode(void *instance, struct v4l2_ctrl *ctrl)
|
||||
struct msm_vidc_inst_capability *capability;
|
||||
s32 adjusted_value;
|
||||
struct msm_vidc_inst *inst = (struct msm_vidc_inst *) instance;
|
||||
s32 outbuf_fence = V4L2_MPEG_VIDC_META_DISABLE;
|
||||
s32 outbuf_fence = MSM_VIDC_META_DISABLE;
|
||||
|
||||
if (!inst || !inst->capabilities) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
@@ -2790,8 +2790,8 @@ int msm_vidc_adjust_dec_lowlatency_mode(void *instance, struct v4l2_ctrl *ctrl)
|
||||
return -EINVAL;
|
||||
|
||||
/* enable lowlatency if outbuf fence is enabled */
|
||||
if (outbuf_fence & V4L2_MPEG_VIDC_META_ENABLE &&
|
||||
outbuf_fence & V4L2_MPEG_VIDC_META_RX_INPUT)
|
||||
if (outbuf_fence & MSM_VIDC_META_ENABLE &&
|
||||
outbuf_fence & MSM_VIDC_META_RX_INPUT)
|
||||
adjusted_value = 1;
|
||||
|
||||
msm_vidc_update_cap_value(inst, LOWLATENCY_MODE,
|
||||
@@ -2895,8 +2895,8 @@ int msm_vidc_adjust_dec_outbuf_fence(void *instance, struct v4l2_ctrl *ctrl)
|
||||
|
||||
if (picture_order == 0) {
|
||||
/* disable outbuf fence */
|
||||
adjusted_value = V4L2_MPEG_VIDC_META_DISABLE |
|
||||
V4L2_MPEG_VIDC_META_RX_INPUT;
|
||||
adjusted_value = MSM_VIDC_META_DISABLE |
|
||||
MSM_VIDC_META_RX_INPUT;
|
||||
}
|
||||
|
||||
msm_vidc_update_cap_value(inst, META_OUTBUF_FENCE,
|
||||
@@ -3947,7 +3947,7 @@ int msm_vidc_set_blur_resolution(void *instance,
|
||||
BLUR_TYPES, &blur_type, __func__))
|
||||
return -EINVAL;
|
||||
|
||||
if (blur_type != VIDC_BLUR_EXTERNAL)
|
||||
if (blur_type != MSM_VIDC_BLUR_EXTERNAL)
|
||||
return 0;
|
||||
|
||||
hfi_value = inst->capabilities->cap[cap_id].value;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user