lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Sep 2019 21:30:49 +0300
From:   Ville Syrjälä <ville.syrjala@...ux.intel.com>
To:     "sandy.huang" <hjc@...k-chips.com>
Cc:     dri-devel@...ts.freedesktop.org,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/36] drm/fourcc: Add 2 plane YCbCr 10bit format support

On Mon, Sep 23, 2019 at 06:05:22AM -0700, sandy.huang wrote:
> 
> 在 2019/9/23 上午5:53, Ville Syrjälä 写道:
> > On Mon, Sep 23, 2019 at 08:38:50PM +0800, Sandy Huang wrote:
> >> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> >> index 3feeaa3..5fe89e9 100644
> >> --- a/include/uapi/drm/drm_fourcc.h
> >> +++ b/include/uapi/drm/drm_fourcc.h
> >> @@ -266,6 +266,21 @@ extern "C" {
> >>   #define DRM_FORMAT_P016		fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
> >>   
> >>   /*
> >> + * 2 plane YCbCr 10bit
> >> + * index 0 = Y plane, [9:0] Y
> >> + * index 1 = Cr:Cb plane, [19:0] Cr:Cb little endian
> >> + * or
> >> + * index 1 = Cb:Cr plane, [19:0] Cb:Cr little endian
> > What does "little endian" even mean for these?
> 
> It's Inherited from the following define, the difference is 8bit and 10bit.
> /*
>   * 2 plane YCbCr
>   * index 0 = Y plane, [7:0] Y
>   * index 1 = Cr:Cb plane, [15:0] Cr:Cb little endian
>   * or
>   * index 1 = Cb:Cr plane, [15:0] Cb:Cr little endian
>   */
> #define DRM_FORMAT_NV12        fourcc_code('N', 'V', '1', '2') /* 2x2 
> subsampled Cr:Cb plane */
> #define DRM_FORMAT_NV21        fourcc_code('N', 'V', '2', '1') /* 2x2 
> subsampled Cb:Cr plane */
> #define DRM_FORMAT_NV16        fourcc_code('N', 'V', '1', '6') /* 2x1 
> subsampled Cr:Cb plane */
> #define DRM_FORMAT_NV61        fourcc_code('N', 'V', '6', '1') /* 2x1 
> subsampled Cb:Cr plane */
> #define DRM_FORMAT_NV24        fourcc_code('N', 'V', '2', '4') /* 
> non-subsampled Cr:Cb plane */
> #define DRM_FORMAT_NV42        fourcc_code('N', 'V', '4',

Something not aligned to bytes can't have its endianness defined the
same way as these. Just doesn't make sense.

>
> 
> 
> >
> >> + */
> >> +
> >> +#define DRM_FORMAT_NV12_10	fourcc_code('N', 'A', '1', '2') /* 2x2 subsampled Cr:Cb plane */
> >> +#define DRM_FORMAT_NV21_10	fourcc_code('N', 'A', '2', '1') /* 2x2 subsampled Cb:Cr plane */
> >> +#define DRM_FORMAT_NV16_10	fourcc_code('N', 'A', '1', '6') /* 2x1 subsampled Cr:Cb plane */
> >> +#define DRM_FORMAT_NV61_10	fourcc_code('N', 'A', '6', '1') /* 2x1 subsampled Cb:Cr plane */
> >> +#define DRM_FORMAT_NV24_10	fourcc_code('N', 'A', '2', '4') /* non-subsampled Cr:Cb plane */
> >> +#define DRM_FORMAT_NV42_10	fourcc_code('N', 'A', '4', '2') /* non-subsampled Cb:Cr plane */
> >> +
> >> +/*
> >>    * 3 plane YCbCr
> >>    * index 0: Y plane, [7:0] Y
> >>    * index 1: Cb plane, [7:0] Cb
> >> -- 
> >> 2.7.4
> >>
> >>
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@...ts.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Ville Syrjälä
Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ