mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
Add the necessary bits into the gen2 platforms tables and handlers to allow decoding streams into 10bit pixel formats. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
This commit is contained in:
parent
20c3ef4c7c
commit
65c06d2edd
|
|
@ -31,9 +31,10 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
|
|||
{
|
||||
.cap_id = PROFILE_HEVC,
|
||||
.min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
|
||||
.max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
|
||||
.max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
|
||||
.step_or_mask = BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) |
|
||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE),
|
||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) |
|
||||
BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10),
|
||||
.value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
|
||||
.hfi_id = HFI_PROP_PROFILE,
|
||||
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
|
||||
|
|
@ -262,7 +263,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
|
|||
{
|
||||
.cap_id = BIT_DEPTH,
|
||||
.min = BIT_DEPTH_8,
|
||||
.max = BIT_DEPTH_8,
|
||||
.max = BIT_DEPTH_10,
|
||||
.step_or_mask = 1,
|
||||
.value = BIT_DEPTH_8,
|
||||
.hfi_id = HFI_PROP_LUMA_CHROMA_BIT_DEPTH,
|
||||
|
|
@ -996,6 +997,7 @@ static const u32 sm8550_vdec_output_config_params[] = {
|
|||
HFI_PROP_OPB_ENABLE,
|
||||
HFI_PROP_COLOR_FORMAT,
|
||||
HFI_PROP_LINEAR_STRIDE_SCANLINE,
|
||||
HFI_PROP_UBWC_STRIDE_SCANLINE,
|
||||
};
|
||||
|
||||
static const u32 sm8550_venc_output_config_params[] = {
|
||||
|
|
|
|||
|
|
@ -542,6 +542,15 @@ static void iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst)
|
|||
pixmp_ip->width = width;
|
||||
pixmp_ip->height = height;
|
||||
|
||||
if (subsc_params.bit_depth == BIT_DEPTH_8 &&
|
||||
pixmp_op->pixelformat != V4L2_PIX_FMT_NV12 &&
|
||||
pixmp_op->pixelformat != V4L2_PIX_FMT_QC08C)
|
||||
pixmp_op->pixelformat = V4L2_PIX_FMT_NV12;
|
||||
else if (subsc_params.bit_depth == BIT_DEPTH_10 &&
|
||||
pixmp_op->pixelformat != V4L2_PIX_FMT_P010 &&
|
||||
pixmp_op->pixelformat != V4L2_PIX_FMT_QC10C)
|
||||
pixmp_op->pixelformat = V4L2_PIX_FMT_P010;
|
||||
|
||||
switch (pixmp_op->pixelformat) {
|
||||
case V4L2_PIX_FMT_P010:
|
||||
pixmp_op->width = ALIGN(width, 128);
|
||||
|
|
@ -625,7 +634,12 @@ static void iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst)
|
|||
inst->fw_caps[POC].value = subsc_params.pic_order_cnt;
|
||||
inst->fw_caps[TIER].value = subsc_params.tier;
|
||||
|
||||
if (subsc_params.bit_depth != BIT_DEPTH_8 ||
|
||||
if (subsc_params.bit_depth == BIT_DEPTH_8)
|
||||
inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_8;
|
||||
else
|
||||
inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_10;
|
||||
|
||||
if ((subsc_params.bit_depth != BIT_DEPTH_8 && subsc_params.bit_depth != BIT_DEPTH_10) ||
|
||||
!(subsc_params.coded_frames & HFI_BITMASK_FRAME_MBS_ONLY_FLAG)) {
|
||||
dev_err(core->dev, "unsupported content, bit depth: %x, pic_struct = %x\n",
|
||||
subsc_params.bit_depth, subsc_params.coded_frames);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ enum iris_fmt_type_out {
|
|||
enum iris_fmt_type_cap {
|
||||
IRIS_FMT_NV12,
|
||||
IRIS_FMT_QC08C,
|
||||
IRIS_FMT_TP10,
|
||||
IRIS_FMT_QC10C,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ void iris_vdec_inst_deinit(struct iris_inst *inst)
|
|||
static const u32 iris_vdec_formats_cap[] = {
|
||||
[IRIS_FMT_NV12] = V4L2_PIX_FMT_NV12,
|
||||
[IRIS_FMT_QC08C] = V4L2_PIX_FMT_QC08C,
|
||||
[IRIS_FMT_TP10] = V4L2_PIX_FMT_P010,
|
||||
[IRIS_FMT_QC10C] = V4L2_PIX_FMT_QC10C,
|
||||
};
|
||||
|
||||
static bool check_format(struct iris_inst *inst, u32 pixfmt, u32 type)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user