mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
FROMGIT: media: v4l2-ctrl: Add decoder conceal color control
Add decoder v4l2 control to set conceal color.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit b52051a409
git://linuxtv.org/media_tree.git master)
Bug: 183579772
Link: https://lkml.org/lkml/2021/2/9/252
Change-Id: I49cac2c1b27cdac72f7dbbb602d2387fd006ff98
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
This commit is contained in:
committed by
Todd Kjos
parent
a6edc4212b
commit
a0ac76fc0c
@@ -674,6 +674,39 @@ enum v4l2_mpeg_video_frame_skip_mode -
|
|||||||
is currently displayed (decoded). This value is reset to 0 whenever
|
is currently displayed (decoded). This value is reset to 0 whenever
|
||||||
the decoder is started.
|
the decoder is started.
|
||||||
|
|
||||||
|
``V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (integer64)``
|
||||||
|
This control sets the conceal color in YUV color space. It describes
|
||||||
|
the client preference of the error conceal color in case of an error
|
||||||
|
where the reference frame is missing. The decoder should fill the
|
||||||
|
reference buffer with the preferred color and use it for future
|
||||||
|
decoding. The control is using 16 bits per channel.
|
||||||
|
Applicable to decoders.
|
||||||
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
|
||||||
|
* -
|
||||||
|
- 8bit format
|
||||||
|
- 10bit format
|
||||||
|
- 12bit format
|
||||||
|
* - Y luminance
|
||||||
|
- Bit 0:7
|
||||||
|
- Bit 0:9
|
||||||
|
- Bit 0:11
|
||||||
|
* - Cb chrominance
|
||||||
|
- Bit 16:23
|
||||||
|
- Bit 16:25
|
||||||
|
- Bit 16:27
|
||||||
|
* - Cr chrominance
|
||||||
|
- Bit 32:39
|
||||||
|
- Bit 32:41
|
||||||
|
- Bit 32:43
|
||||||
|
* - Must be zero
|
||||||
|
- Bit 48:63
|
||||||
|
- Bit 48:63
|
||||||
|
- Bit 48:63
|
||||||
|
|
||||||
``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
|
``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)``
|
||||||
If enabled the decoder expects to receive a single slice per buffer,
|
If enabled the decoder expects to receive a single slice per buffer,
|
||||||
otherwise the decoder expects a single frame in per buffer.
|
otherwise the decoder expects a single frame in per buffer.
|
||||||
|
|||||||
@@ -963,6 +963,7 @@ const char *v4l2_ctrl_get_name(u32 id)
|
|||||||
case V4L2_CID_MPEG_VIDEO_VBV_SIZE: return "VBV Buffer Size";
|
case V4L2_CID_MPEG_VIDEO_VBV_SIZE: return "VBV Buffer Size";
|
||||||
case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS";
|
case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS";
|
||||||
case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count";
|
case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count";
|
||||||
|
case V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR: return "Video Decoder Conceal Color";
|
||||||
case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return "Initial Delay for VBV Control";
|
case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return "Initial Delay for VBV Control";
|
||||||
case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: return "Horizontal MV Search Range";
|
case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: return "Horizontal MV Search Range";
|
||||||
case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: return "Vertical MV Search Range";
|
case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: return "Vertical MV Search Range";
|
||||||
@@ -1453,6 +1454,14 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
|
|||||||
*max = 0x7fffffffffffffffLL;
|
*max = 0x7fffffffffffffffLL;
|
||||||
*step = 1;
|
*step = 1;
|
||||||
break;
|
break;
|
||||||
|
case V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR:
|
||||||
|
*type = V4L2_CTRL_TYPE_INTEGER64;
|
||||||
|
*min = 0;
|
||||||
|
/* default for 8 bit black, luma is 16, chroma is 128 */
|
||||||
|
*def = 0x8000800010LL;
|
||||||
|
*max = 0xffffffffffffLL;
|
||||||
|
*step = 1;
|
||||||
|
break;
|
||||||
case V4L2_CID_PIXEL_RATE:
|
case V4L2_CID_PIXEL_RATE:
|
||||||
*type = V4L2_CTRL_TYPE_INTEGER64;
|
*type = V4L2_CTRL_TYPE_INTEGER64;
|
||||||
*flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
*flags |= V4L2_CTRL_FLAG_READ_ONLY;
|
||||||
|
|||||||
@@ -420,6 +420,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
|
|||||||
#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE+232)
|
#define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE+232)
|
||||||
#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE+233)
|
#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE+233)
|
||||||
#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_MPEG_BASE+234)
|
#define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_MPEG_BASE+234)
|
||||||
|
#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_MPEG_BASE+235)
|
||||||
|
|
||||||
/* CIDs for the MPEG-2 Part 2 (H.262) codec */
|
/* CIDs for the MPEG-2 Part 2 (H.262) codec */
|
||||||
#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_MPEG_BASE+270)
|
#define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_MPEG_BASE+270)
|
||||||
|
|||||||
Reference in New Issue
Block a user