[PATCH 11/15] staging/media: rename MPEG to CODEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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(-)

diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
index e5f200e64993..3ff83550a193 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -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,
 		}
 	}, {
 	},
diff --git a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
index 6386a3989bfe..3feaef6115de 100644
--- a/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c
@@ -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;
 
diff --git a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
index a5cdf150cd16..a29bb9ea07d5 100644
--- a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
+++ b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c
@@ -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;
 
diff --git a/drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c b/drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c
index f610fa5b4335..bc9272c58379 100644
--- a/drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c
+++ b/drivers/staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c
@@ -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;
 
diff --git a/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c b/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c
index a4a792f00b11..3f66139a3d6a 100644
--- a/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c
+++ b/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c
@@ -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;
 
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index d3eb81ee8dc2..254f6b6f4428 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -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,
 	},
 };
 
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index 7bd9291c8d5f..7e9ee46ec2b6 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -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,
 	},
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_dec.c b/drivers/staging/media/sunxi/cedrus/cedrus_dec.c
index a9090daf626a..a951819b85d4 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_dec.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_dec.c
@@ -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:
-- 
2.30.1





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux