All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Alexandre Courbot <acourbot@chromium.org>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	kernel@collabora.com
Subject: [PATCH v2 3/8] media: uapi: vp8: Add proper kernel-doc documentation
Date: Wed,  3 Mar 2021 17:27:09 -0300	[thread overview]
Message-ID: <20210303202714.212394-4-ezequiel@collabora.com> (raw)
In-Reply-To: <20210303202714.212394-1-ezequiel@collabora.com>

In preparation for making the interface public,
document all the structures.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 include/media/vp8-ctrls.h | 99 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)

diff --git a/include/media/vp8-ctrls.h b/include/media/vp8-ctrls.h
index f20117e825ef..9f6cb40088a6 100644
--- a/include/media/vp8-ctrls.h
+++ b/include/media/vp8-ctrls.h
@@ -23,6 +23,20 @@
 #define V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA  0x04
 #define V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE     0x08
 
+/**
+ * struct v4l2_vp8_segment - VP8 segment-based adjustments parameters
+ *
+ * @quant_update: update values for the segment quantizer.
+ * @lf_update: update values for the loop filter level.
+ * @segment_probs: branch probabilities of the segment_id decoding tree.
+ * @padding: padding field. Should be zeroed by applications.
+ * @flags: see V4L2_VP8_SEGMENT_FLAG_{}.
+ *
+ * This structure contains segment-based adjustments related parameters.
+ * See the 'update_segmentation()' part of the frame header syntax,
+ * and section '9.3. Segment-Based Adjustments' of the VP8 specification
+ * for more details.
+ */
 struct v4l2_vp8_segment {
 	__s8 quant_update[4];
 	__s8 lf_update[4];
@@ -34,6 +48,22 @@ struct v4l2_vp8_segment {
 #define V4L2_VP8_LF_ADJ_ENABLE	0x01
 #define V4L2_VP8_LF_DELTA_UPDATE	0x02
 #define V4L2_VP8_LF_FILTER_TYPE_SIMPLE	0x04
+
+/**
+ * struct v4l2_vp8_loop_filter - VP8 loop filter parameters
+ *
+ * @ref_frm_delta: Reference frame signed delta values.
+ * @mb_mode_delta: MB prediction mode signed delta values.
+ * @sharpness_level: matches sharpness_level syntax element.
+ * @level: matches loop_filter_level syntax element.
+ * @padding: padding field. Should be zeroed by applications.
+ * @flags: see V4L2_VP8_LF_FLAG_{}.
+ *
+ * This structure contains loop filter related parameters.
+ * See the 'mb_lf_adjustments()' part of the frame header syntax,
+ * and section '9.4. Loop Filter Type and Levels' of the VP8 specification
+ * for more details.
+ */
 struct v4l2_vp8_loop_filter {
 	__s8 ref_frm_delta[4];
 	__s8 mb_mode_delta[4];
@@ -43,6 +73,22 @@ struct v4l2_vp8_loop_filter {
 	__u32 flags;
 };
 
+/**
+ * struct v4l2_vp8_quantization - VP8 quantizattion indices
+ *
+ * @y_ac_qi: luma AC coefficient table index.
+ * @y_dc_delta: luma DC delta vaue.
+ * @y2_dc_delta: y2 block DC delta value.
+ * @y2_ac_delta: y2 block AC delta value.
+ * @uv_dc_delta: chroma DC delta value.
+ * @uv_ac_delta: chroma AC delta value.
+ * @padding: padding field. Should be zeroed by applications.
+
+ * This structure contains the quantization indices present
+ * in 'quant_indices()' part of the frame header syntax.
+ * See section '9.6. Dequantization Indices' of the VP8 specification
+ * for more details.
+ */
 struct v4l2_vp8_quantization {
 	__u8 y_ac_qi;
 	__s8 y_dc_delta;
@@ -55,6 +101,21 @@ struct v4l2_vp8_quantization {
 
 #define V4L2_VP8_COEFF_PROB_CNT 11
 #define V4L2_VP8_MV_PROB_CNT 19
+
+/**
+ * struct v4l2_vp8_entropy - VP8 update probabilities
+ *
+ * @coeff_probs: coefficient probability update values.
+ * @y_mode_probs: luma intra-prediction probabilities.
+ * @uv_mode_probs: chroma intra-prediction probabilities.
+ * @mv_probs: mv decoding probability.
+ * @padding: padding field. Should be zeroed by applications.
+ *
+ * This structure contains the update probabilities present in
+ * 'token_prob_update()' and 'mv_prob_update()' part of the frame header.
+ * See section '17.2. Probability Updates' of the VP8 specification
+ * for more details.
+ */
 struct v4l2_vp8_entropy {
 	__u8 coeff_probs[4][8][3][V4L2_VP8_COEFF_PROB_CNT];
 	__u8 y_mode_probs[4];
@@ -63,6 +124,17 @@ struct v4l2_vp8_entropy {
 	__u8 padding[3];
 };
 
+/**
+ * struct v4l2_vp8_entropy_coder_state - VP8 boolean coder state
+ *
+ * @range: coder state value for "Range"
+ * @value: coder state value for "Value"
+ * @bit_count: number of bits left in range "Value".
+ * @padding: padding field. Should be zeroed by applications.
+ *
+ * This structure contains the state for the boolean coder, as
+ * explained in section '7. Boolean Entropy Decoder' of the VP8 specification.
+ */
 struct v4l2_vp8_entropy_coder_state {
 	__u8 range;
 	__u8 value;
@@ -80,6 +152,33 @@ struct v4l2_vp8_entropy_coder_state {
 #define VP8_FRAME_IS_KEY_FRAME(hdr) \
 	(!!((hdr)->flags & V4L2_VP8_FRAME_FLAG_KEY_FRAME))
 
+/**
+ * struct v4l2_vp8_frame - VP8 frame parameters
+ *
+ * @seg: segmentation parameters. See &v4l2_vp8_segment for more details
+ * @lf: loop filter parameters. See &v4l2_vp8_loop_filter for more details
+ * @quant: quantization parameters. See &v4l2_vp8_quantization for more details
+ * @probs: probabilities. See &v4l2_vp9_probabilities for more details
+ * @width: frame width.
+ * @height: frame height.
+ * @horizontal_scale: horizontal scaling factor.
+ * @vertical_scale: vertical scaling factor.
+ * @version: bitstream version.
+ * @prob_skip_false: frame header syntax element.
+ * @prob_intra: frame header syntax element.
+ * @prob_last: frame header syntax element.
+ * @prob_gf: frame header syntax element.
+ * @num_dct_parts: number of DCT coefficients partitions.
+ * @first_part_size: size of the first partition, i.e. the control partition.
+ * @first_part_header_bits: size in bits of the first partition header portion.
+ * @dct_part_sizes: DCT coefficients sizes.
+ * @last_frame_ts: "last" reference buffer timestamp.
+ * The timestamp refers to the timestamp field in struct v4l2_buffer.
+ * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.
+ * @golden_frame_ts: "golden" reference buffer timestamp.
+ * @alt_frame_ts: "alt" reference buffer timestamp.
+ * @flags: see V4L2_VP8_FRAME_FLAG_{}.
+ */
 struct v4l2_ctrl_vp8_frame {
 	struct v4l2_vp8_segment seg;
 	struct v4l2_vp8_loop_filter lf;
-- 
2.30.0


  parent reply	other threads:[~2021-03-04  0:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 20:27 [PATCH v2 0/8] V4L2 stateless VP8 de-staging Ezequiel Garcia
2021-03-03 20:27 ` [PATCH v2 1/8] media: uapi: vp8: Remove "header" from symbol names and macros Ezequiel Garcia
2021-03-04  8:48   ` Alexandre Courbot
2021-03-03 20:27 ` [PATCH v2 2/8] media: uapi: vp8: Rename v4l2_vp8_loopfilter to v4l2_vp8_loop_filter Ezequiel Garcia
2021-03-03 20:27 ` Ezequiel Garcia [this message]
2021-03-03 20:27 ` [PATCH v2 4/8] media: uapi: Move parsed VP8 pixel format out of staging Ezequiel Garcia
2021-03-03 20:27 ` [PATCH v2 5/8] media: uapi: Move the VP8 stateless control type " Ezequiel Garcia
2021-03-03 20:27 ` [PATCH v2 6/8] media: controls: Log VP8 stateless control in .std_log Ezequiel Garcia
2021-03-03 20:27 ` [PATCH v2 7/8] media: vp8: Rename V4L2 VP8 specific macro to V4L2_VP8_ Ezequiel Garcia
2021-03-03 20:27 ` [PATCH v2 8/8] media: uapi: move VP8 stateless controls out of staging Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303202714.212394-4-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=acourbot@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.