Re: [PATCH v2 1/8] media: uapi: vp8: Remove "header" from symbol names and macros
On Thu, Mar 4, 2021 at 5:27 AM Ezequiel Garcia wrote: > > It doesn't seem to add any clarity to have a "header" suffix in controls, > struct names and flags. > > Since this just makes names too long without any benefit, just drop it. > > Signed-off-by: Ezequiel Garcia > --- > .../media/v4l/ext-ctrls-codec.rst | 80 +++ > .../media/v4l/pixfmt-compressed.rst | 2 +- > drivers/media/v4l2-core/v4l2-ctrls.c | 36 +++ > drivers/staging/media/hantro/hantro_drv.c | 2 +- > .../staging/media/hantro/hantro_g1_vp8_dec.c | 48 - > drivers/staging/media/hantro/hantro_hw.h | 2 +- > drivers/staging/media/hantro/hantro_vp8.c | 10 +- > .../media/hantro/rk3399_vpu_hw_vp8_dec.c | 48 - > drivers/staging/media/sunxi/cedrus/cedrus.c | 2 +- > drivers/staging/media/sunxi/cedrus/cedrus.h | 2 +- > .../staging/media/sunxi/cedrus/cedrus_dec.c | 2 +- > .../staging/media/sunxi/cedrus/cedrus_vp8.c | 98 +-- > include/media/v4l2-ctrls.h| 4 +- > include/media/vp8-ctrls.h | 48 - > 14 files changed, 192 insertions(+), 192 deletions(-) > > diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > index 00944e97d638..006301e88554 100644 > --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > @@ -1749,7 +1749,7 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - > > .. _v4l2-mpeg-vp8: > > -``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)`` > +``V4L2_CID_MPEG_VIDEO_VP8_FRAME (struct)`` > Specifies the frame parameters for the associated VP8 parsed frame data. > This includes the necessary parameters for > configuring a stateless hardware decoding pipeline for VP8. > @@ -1760,28 +1760,28 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - > This compound control is not yet part of the public kernel API and > it is expected to change. > > -.. c:type:: v4l2_ctrl_vp8_frame_header > +.. c:type:: v4l2_ctrl_vp8_frame > > .. cssclass:: longtable > > .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}| > > -.. flat-table:: struct v4l2_ctrl_vp8_frame_header > +.. flat-table:: struct v4l2_ctrl_vp8_frame > :header-rows: 0 > :stub-columns: 0 > :widths: 1 1 2 > > -* - struct :c:type:`v4l2_vp8_segment_header` > - - ``segment_header`` > +* - struct :c:type:`v4l2_vp8_segment` > + - ``seg`` >- Structure with segment-based adjustments metadata. > -* - struct :c:type:`v4l2_vp8_loopfilter_header` > - - ``loopfilter_header`` > +* - struct :c:type:`v4l2_vp8_loopfilter` > + - ``lf`` >- Structure with loop filter level adjustments metadata. > -* - struct :c:type:`v4l2_vp8_quantization_header` > - - ``quant_header`` > +* - struct :c:type:`v4l2_vp8_quantization` > + - ``quant`` >- Structure with VP8 dequantization indices metadata. > -* - struct :c:type:`v4l2_vp8_entropy_header` > - - ``entropy_header`` > +* - struct :c:type:`v4l2_vp8_entropy` > + - ``entropy`` >- Structure with VP8 entropy coder probabilities metadata. > * - struct :c:type:`v4l2_vp8_entropy_coder_state` >- ``coder_state`` > @@ -1850,11 +1850,11 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - > :c:type:`v4l2_buffer` to a __u64. > * - __u64 >- ``flags`` > - - See :ref:`Frame Header Flags ` > + - See :ref:`Frame Flags ` > > -.. _vp8_frame_header_flags: > +.. _vp8_frame_flags: > > -``Frame Header Flags`` > +``Frame Flags`` > > .. cssclass:: longtable > > @@ -1863,22 +1863,22 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - > :stub-columns: 0 > :widths: 1 1 2 > > -* - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME`` > +* - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME`` >- 0x01 >- Indicates if the frame is a key frame. > -* - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL`` > +* - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL`` >- 0x02 >- Experimental bitstream. > -* - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME`` > +* - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME`` >- 0x04 >- Show frame flag, indicates if the frame is for display. > -* - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF`` > +* - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF`` >- 0x08 >- Enable/disable skipping of macroblocks with no non-zero coefficients. > -* - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN`` > +* - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN`` >- 0x10 >- Sign of motion vectors when the golden frame is referenced. > -* - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT`` > +* - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT`` >- 0x20 >- Sign of motion vectors when the alt frame is referenced. > > @@ -1906,13
[PATCH v2 1/8] media: uapi: vp8: Remove "header" from symbol names and macros
It doesn't seem to add any clarity to have a "header" suffix in controls, struct names and flags. Since this just makes names too long without any benefit, just drop it. Signed-off-by: Ezequiel Garcia --- .../media/v4l/ext-ctrls-codec.rst | 80 +++ .../media/v4l/pixfmt-compressed.rst | 2 +- drivers/media/v4l2-core/v4l2-ctrls.c | 36 +++ drivers/staging/media/hantro/hantro_drv.c | 2 +- .../staging/media/hantro/hantro_g1_vp8_dec.c | 48 - drivers/staging/media/hantro/hantro_hw.h | 2 +- drivers/staging/media/hantro/hantro_vp8.c | 10 +- .../media/hantro/rk3399_vpu_hw_vp8_dec.c | 48 - drivers/staging/media/sunxi/cedrus/cedrus.c | 2 +- drivers/staging/media/sunxi/cedrus/cedrus.h | 2 +- .../staging/media/sunxi/cedrus/cedrus_dec.c | 2 +- .../staging/media/sunxi/cedrus/cedrus_vp8.c | 98 +-- include/media/v4l2-ctrls.h| 4 +- include/media/vp8-ctrls.h | 48 - 14 files changed, 192 insertions(+), 192 deletions(-) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 00944e97d638..006301e88554 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -1749,7 +1749,7 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - .. _v4l2-mpeg-vp8: -``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)`` +``V4L2_CID_MPEG_VIDEO_VP8_FRAME (struct)`` Specifies the frame parameters for the associated VP8 parsed frame data. This includes the necessary parameters for configuring a stateless hardware decoding pipeline for VP8. @@ -1760,28 +1760,28 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - This compound control is not yet part of the public kernel API and it is expected to change. -.. c:type:: v4l2_ctrl_vp8_frame_header +.. c:type:: v4l2_ctrl_vp8_frame .. cssclass:: longtable .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}| -.. flat-table:: struct v4l2_ctrl_vp8_frame_header +.. flat-table:: struct v4l2_ctrl_vp8_frame :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 -* - struct :c:type:`v4l2_vp8_segment_header` - - ``segment_header`` +* - struct :c:type:`v4l2_vp8_segment` + - ``seg`` - Structure with segment-based adjustments metadata. -* - struct :c:type:`v4l2_vp8_loopfilter_header` - - ``loopfilter_header`` +* - struct :c:type:`v4l2_vp8_loopfilter` + - ``lf`` - Structure with loop filter level adjustments metadata. -* - struct :c:type:`v4l2_vp8_quantization_header` - - ``quant_header`` +* - struct :c:type:`v4l2_vp8_quantization` + - ``quant`` - Structure with VP8 dequantization indices metadata. -* - struct :c:type:`v4l2_vp8_entropy_header` - - ``entropy_header`` +* - struct :c:type:`v4l2_vp8_entropy` + - ``entropy`` - Structure with VP8 entropy coder probabilities metadata. * - struct :c:type:`v4l2_vp8_entropy_coder_state` - ``coder_state`` @@ -1850,11 +1850,11 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - :c:type:`v4l2_buffer` to a __u64. * - __u64 - ``flags`` - - See :ref:`Frame Header Flags ` + - See :ref:`Frame Flags ` -.. _vp8_frame_header_flags: +.. _vp8_frame_flags: -``Frame Header Flags`` +``Frame Flags`` .. cssclass:: longtable @@ -1863,22 +1863,22 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - :stub-columns: 0 :widths: 1 1 2 -* - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME`` +* - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME`` - 0x01 - Indicates if the frame is a key frame. -* - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL`` +* - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL`` - 0x02 - Experimental bitstream. -* - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME`` +* - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME`` - 0x04 - Show frame flag, indicates if the frame is for display. -* - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF`` +* - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF`` - 0x08 - Enable/disable skipping of macroblocks with no non-zero coefficients. -* - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN`` +* - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN`` - 0x10 - Sign of motion vectors when the golden frame is referenced. -* - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT`` +* - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT`` - 0x20 - Sign of motion vectors when the alt frame is referenced. @@ -1906,13 +1906,13 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - - ``padding`` - Applications and drivers must set this to zero. -.. c:type:: v4l2_vp8_segment_header +.. c:type:: v4l2_vp8_segment .. cssclass:: longtable .. tabularcolumns::