Add decoder v4l2 control to set conceal color.
Unified · Split
| @@ -674,6 +674,39 @@ enum v4l2_mpeg_video_frame_skip_mode - · 673 unmodified lines | ||
| 674 | 674 | is currently displayed (decoded). This value is reset to 0 whenever |
| 675 | 675 | the decoder is started. |
| 676 | 676 | |
| 677 | +``V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (integer64)`` | |
| 678 | + This control sets the conceal color in YUV color space. It describes | |
| 679 | + the client preference of the error conceal color in case of an error | |
| 680 | + where the reference frame is missing. The decoder should fill the | |
| 681 | + reference buffer with the preferred color and use it for future | |
| 682 | + decoding. The control is using 16 bits per channel. | |
| 683 | + Applicable to decoders. | |
| 684 | + | |
| 685 | +.. flat-table:: | |
| 686 | + :header-rows: 0 | |
| 687 | + :stub-columns: 0 | |
| 688 | + | |
| 689 | + * - | |
| 690 | + - 8bit format | |
| 691 | + - 10bit format | |
| 692 | + - 12bit format | |
| 693 | + * - Y luminance | |
| 694 | + - Bit 0:7 | |
| 695 | + - Bit 0:9 | |
| 696 | + - Bit 0:11 | |
| 697 | + * - Cb chrominance | |
| 698 | + - Bit 16:23 | |
| 699 | + - Bit 16:25 | |
| 700 | + - Bit 16:27 | |
| 701 | + * - Cr chrominance | |
| 702 | + - Bit 32:39 | |
| 703 | + - Bit 32:41 | |
| 704 | + - Bit 32:43 | |
| 705 | + * - Must be zero | |
| 706 | + - Bit 48:63 | |
| 707 | + - Bit 48:63 | |
| 708 | + - Bit 48:63 | |
| 709 | + | |
| 677 | 710 | ``V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (boolean)`` |
| 678 | 711 | If enabled the decoder expects to receive a single slice per buffer, |
| 679 | 712 | otherwise the decoder expects a single frame in per buffer. |
| @@ -955,6 +955,7 @@ const char *v4l2_ctrl_get_name(u32 id) · 954 unmodified lines | ||
| 955 | 955 | case V4L2_CID_MPEG_VIDEO_VBV_SIZE: return "VBV Buffer Size"; |
| 956 | 956 | case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS"; |
| 957 | 957 | case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count"; |
| 958 | + case V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR: return "Video Decoder Conceal Color"; | |
| 958 | 959 | case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return "Initial Delay for VBV Control"; |
| 959 | 960 | case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: return "Horizontal MV Search Range"; |
| 960 | 961 | case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: return "Vertical MV Search Range"; |
| @@ -1458,6 +1459,14 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, · 497 unmodified lines | ||
| 1458 | 1459 | *max = 0x7fffffffffffffffLL; |
| 1459 | 1460 | *step = 1; |
| 1460 | 1461 | break; |
| 1462 | + case V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR: | |
| 1463 | + *type = V4L2_CTRL_TYPE_INTEGER64; | |
| 1464 | + *min = 0; | |
| 1465 | + /* default for 8 bit black, luma is 16, chroma is 128 */ | |
| 1466 | + *def = 0x8000800010LL; | |
| 1467 | + *max = 0xffffffffffffLL; | |
| 1468 | + *step = 1; | |
| 1469 | + break; | |
| 1461 | 1470 | case V4L2_CID_PIXEL_RATE: |
| 1462 | 1471 | *type = V4L2_CTRL_TYPE_INTEGER64; |
| 1463 | 1472 | *flags |= V4L2_CTRL_FLAG_READ_ONLY; |
| @@ -432,6 +432,7 @@ enum v4l2_mpeg_video_multi_slice_mode { · 431 unmodified lines | ||
| 432 | 432 | #define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_CODEC_BASE+232) |
| 433 | 433 | #define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_CODEC_BASE+233) |
| 434 | 434 | #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (V4L2_CID_CODEC_BASE+234) |
| 435 | +#define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR (V4L2_CID_CODEC_BASE+235) | |
| 435 | 436 | |
| 436 | 437 | /* CIDs for the MPEG-2 Part 2 (H.262) codec */ |
| 437 | 438 | #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_CODEC_BASE+270) |