@@ -289,17 +289,17 @@ static const struct hantro_ctrl controls[] = {
}, {
.codec = HANTRO_MPEG2_DECODER,
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS,
+ .id = V4L2_CID_CODEC_VIDEO_MPEG2_SLICE_PARAMS,
},
}, {
.codec = HANTRO_MPEG2_DECODER,
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION,
+ .id = V4L2_CID_CODEC_VIDEO_MPEG2_QUANTIZATION,
},
}, {
.codec = HANTRO_VP8_DECODER,
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER,
+ .id = V4L2_CID_CODEC_VIDEO_VP8_FRAME_HEADER,
},
}, {
.codec = HANTRO_H264_DECODER,
@@ -341,12 +341,12 @@ static const struct hantro_ctrl controls[] = {
}, {
.codec = HANTRO_H264_DECODER,
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_H264_PROFILE,
- .min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE,
- .max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,
+ .id = V4L2_CID_CODEC_VIDEO_H264_PROFILE,
+ .min = V4L2_CODEC_VIDEO_H264_PROFILE_BASELINE,
+ .max = V4L2_CODEC_VIDEO_H264_PROFILE_HIGH,
.menu_skip_mask =
- BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED),
- .def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN,
+ BIT(V4L2_CODEC_VIDEO_H264_PROFILE_EXTENDED),
+ .def = V4L2_CODEC_VIDEO_H264_PROFILE_MAIN,
}
}, {
},
@@ -88,7 +88,7 @@ hantro_g1_mpeg2_dec_set_quantization(struct hantro_dev *vpu,
struct v4l2_ctrl_mpeg2_quantization *quantization;
quantization = hantro_get_ctrl(ctx,
- V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION);
+ V4L2_CID_CODEC_VIDEO_MPEG2_QUANTIZATION);
hantro_mpeg2_dec_copy_qtable(ctx->mpeg2_dec.qtable.cpu,
quantization);
vdpu_write_relaxed(vpu, ctx->mpeg2_dec.qtable.dma,
@@ -171,7 +171,7 @@ void hantro_g1_mpeg2_dec_run(struct hantro_ctx *ctx)
hantro_start_prepare_run(ctx);
slice_params = hantro_get_ctrl(ctx,
- V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS);
+ V4L2_CID_CODEC_VIDEO_MPEG2_SLICE_PARAMS);
sequence = &slice_params->sequence;
picture = &slice_params->picture;
@@ -437,7 +437,7 @@ void hantro_g1_vp8_dec_run(struct hantro_ctx *ctx)
hantro_start_prepare_run(ctx);
- hdr = hantro_get_ctrl(ctx, V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER);
+ hdr = hantro_get_ctrl(ctx, V4L2_CID_CODEC_VIDEO_VP8_FRAME_HEADER);
if (WARN_ON(!hdr))
return;
@@ -90,7 +90,7 @@ rk3399_vpu_mpeg2_dec_set_quantization(struct hantro_dev *vpu,
struct v4l2_ctrl_mpeg2_quantization *quantization;
quantization = hantro_get_ctrl(ctx,
- V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION);
+ V4L2_CID_CODEC_VIDEO_MPEG2_QUANTIZATION);
hantro_mpeg2_dec_copy_qtable(ctx->mpeg2_dec.qtable.cpu, quantization);
vdpu_write_relaxed(vpu, ctx->mpeg2_dec.qtable.dma,
VDPU_REG_QTABLE_BASE);
@@ -172,7 +172,7 @@ void rk3399_vpu_mpeg2_dec_run(struct hantro_ctx *ctx)
hantro_start_prepare_run(ctx);
slice_params = hantro_get_ctrl(ctx,
- V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS);
+ V4L2_CID_CODEC_VIDEO_MPEG2_SLICE_PARAMS);
sequence = &slice_params->sequence;
picture = &slice_params->picture;
@@ -515,7 +515,7 @@ void rk3399_vpu_vp8_dec_run(struct hantro_ctx *ctx)
hantro_start_prepare_run(ctx);
- hdr = hantro_get_ctrl(ctx, V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER);
+ hdr = hantro_get_ctrl(ctx, V4L2_CID_CODEC_VIDEO_VP8_FRAME_HEADER);
if (WARN_ON(!hdr))
return;
@@ -83,17 +83,17 @@ static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = {
.cfg.max = V4L2_STATELESS_H264_START_CODE_ANNEX_B,
},
{
- .cfg.id = V4L2_CID_MPEG_VIDEO_H264_PROFILE,
- .cfg.min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE,
- .cfg.max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,
+ .cfg.id = V4L2_CID_CODEC_VIDEO_H264_PROFILE,
+ .cfg.min = V4L2_CODEC_VIDEO_H264_PROFILE_BASELINE,
+ .cfg.max = V4L2_CODEC_VIDEO_H264_PROFILE_HIGH,
.cfg.menu_skip_mask =
- BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED),
- .cfg.def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN,
+ BIT(V4L2_CODEC_VIDEO_H264_PROFILE_EXTENDED),
+ .cfg.def = V4L2_CODEC_VIDEO_H264_PROFILE_MAIN,
},
{
- .cfg.id = V4L2_CID_MPEG_VIDEO_H264_LEVEL,
- .cfg.min = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
- .cfg.max = V4L2_MPEG_VIDEO_H264_LEVEL_5_1,
+ .cfg.id = V4L2_CID_CODEC_VIDEO_H264_LEVEL,
+ .cfg.min = V4L2_CODEC_VIDEO_H264_LEVEL_1_0,
+ .cfg.max = V4L2_CODEC_VIDEO_H264_LEVEL_5_1,
},
};
@@ -31,13 +31,13 @@
static const struct cedrus_control cedrus_controls[] = {
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS,
+ .id = V4L2_CID_CODEC_VIDEO_MPEG2_SLICE_PARAMS,
},
.codec = CEDRUS_CODEC_MPEG2,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION,
+ .id = V4L2_CID_CODEC_VIDEO_MPEG2_QUANTIZATION,
},
.codec = CEDRUS_CODEC_MPEG2,
},
@@ -102,52 +102,52 @@ static const struct cedrus_control cedrus_controls[] = {
*/
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_H264_PROFILE,
- .min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE,
- .def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN,
- .max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,
+ .id = V4L2_CID_CODEC_VIDEO_H264_PROFILE,
+ .min = V4L2_CODEC_VIDEO_H264_PROFILE_BASELINE,
+ .def = V4L2_CODEC_VIDEO_H264_PROFILE_MAIN,
+ .max = V4L2_CODEC_VIDEO_H264_PROFILE_HIGH,
.menu_skip_mask =
- BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED),
+ BIT(V4L2_CODEC_VIDEO_H264_PROFILE_EXTENDED),
},
.codec = CEDRUS_CODEC_H264,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_HEVC_SPS,
+ .id = V4L2_CID_CODEC_VIDEO_HEVC_SPS,
},
.codec = CEDRUS_CODEC_H265,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_HEVC_PPS,
+ .id = V4L2_CID_CODEC_VIDEO_HEVC_PPS,
},
.codec = CEDRUS_CODEC_H265,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS,
+ .id = V4L2_CID_CODEC_VIDEO_HEVC_SLICE_PARAMS,
},
.codec = CEDRUS_CODEC_H265,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE,
- .max = V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,
- .def = V4L2_MPEG_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,
+ .id = V4L2_CID_CODEC_VIDEO_HEVC_DECODE_MODE,
+ .max = V4L2_CODEC_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,
+ .def = V4L2_CODEC_VIDEO_HEVC_DECODE_MODE_SLICE_BASED,
},
.codec = CEDRUS_CODEC_H265,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_HEVC_START_CODE,
- .max = V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE,
- .def = V4L2_MPEG_VIDEO_HEVC_START_CODE_NONE,
+ .id = V4L2_CID_CODEC_VIDEO_HEVC_START_CODE,
+ .max = V4L2_CODEC_VIDEO_HEVC_START_CODE_NONE,
+ .def = V4L2_CODEC_VIDEO_HEVC_START_CODE_NONE,
},
.codec = CEDRUS_CODEC_H265,
},
{
.cfg = {
- .id = V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER,
+ .id = V4L2_CID_CODEC_VIDEO_VP8_FRAME_HEADER,
},
.codec = CEDRUS_CODEC_VP8,
},
@@ -41,9 +41,9 @@ void cedrus_device_run(void *priv)
switch (ctx->src_fmt.pixelformat) {
case V4L2_PIX_FMT_MPEG2_SLICE:
run.mpeg2.slice_params = cedrus_find_control_data(ctx,
- V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS);
+ V4L2_CID_CODEC_VIDEO_MPEG2_SLICE_PARAMS);
run.mpeg2.quantization = cedrus_find_control_data(ctx,
- V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION);
+ V4L2_CID_CODEC_VIDEO_MPEG2_QUANTIZATION);
break;
case V4L2_PIX_FMT_H264_SLICE:
@@ -63,16 +63,16 @@ void cedrus_device_run(void *priv)
case V4L2_PIX_FMT_HEVC_SLICE:
run.h265.sps = cedrus_find_control_data(ctx,
- V4L2_CID_MPEG_VIDEO_HEVC_SPS);
+ V4L2_CID_CODEC_VIDEO_HEVC_SPS);
run.h265.pps = cedrus_find_control_data(ctx,
- V4L2_CID_MPEG_VIDEO_HEVC_PPS);
+ V4L2_CID_CODEC_VIDEO_HEVC_PPS);
run.h265.slice_params = cedrus_find_control_data(ctx,
- V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS);
+ V4L2_CID_CODEC_VIDEO_HEVC_SLICE_PARAMS);
break;
case V4L2_PIX_FMT_VP8_FRAME:
run.vp8.frame_params = cedrus_find_control_data(ctx,
- V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER);
+ V4L2_CID_CODEC_VIDEO_VP8_FRAME_HEADER);
break;
default:
Historically all codec-related data structures and defines used the MPEG prefix. This is confusing. Rename MPEG to CODEC to make it clear that the MPEG prefix isn't MPEG specific. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> --- drivers/staging/media/hantro/hantro_drv.c | 16 ++++----- .../media/hantro/hantro_g1_mpeg2_dec.c | 4 +-- .../staging/media/hantro/hantro_g1_vp8_dec.c | 2 +- .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c | 4 +-- .../media/hantro/rk3399_vpu_hw_vp8_dec.c | 2 +- drivers/staging/media/rkvdec/rkvdec.c | 16 ++++----- drivers/staging/media/sunxi/cedrus/cedrus.c | 34 +++++++++---------- .../staging/media/sunxi/cedrus/cedrus_dec.c | 12 +++---- 8 files changed, 45 insertions(+), 45 deletions(-)