Skip to contentSkip to conversation

libdrm/fourcc: Add formats R8, RG88, GR88, NV24, NV42

PATCH Superseded Dongseong Hwang 1 participant 3 messages Apr 21, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libdrm/fourcc: Add formats R8, RG88, GR88, NV24, NV42

Follow-up of kernel patch: https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html

Generate it using make headers_install

ChromeOS will use new format to optimize video decoding.

CC Stéphane Marchesin <[email protected]>
CC Daniele Castagna <[email protected]>
Cc Rainer Hochecker <[email protected]>
Cc Benjamin Widawsky <[email protected]>
CC Chad Versace <[email protected]>
---
 include/drm/drm_fourcc.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
include/drm/drm_fourcc.h +10 -1
index e741b09..bf68099 100644
@@ -34,6 +34,13 @@
 /* color index */
 #define DRM_FORMAT_C8		fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
 
+/* 8 bpp Red */
+#define DRM_FORMAT_R8		fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
+
+/* 16 bpp RG */
+#define DRM_FORMAT_RG88		fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */
+#define DRM_FORMAT_GR88		fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
+
 /* 8 bpp RGB */
 #define DRM_FORMAT_RGB332	fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
 #define DRM_FORMAT_BGR233	fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */
@@ -106,6 +113,8 @@
 #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', '2') /* non-subsampled Cb:Cr plane */
 
 /*
  * 3 plane YCbCr
@@ -216,7 +225,7 @@
  * - multiple of 128 pixels for the width
  * - multiple of  32 pixels for the height
  *
- * For more information: see http://linuxtv.org/downloads/v4l-dvb-apis/re32.html
+ * For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
  */
 #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE	fourcc_mod_code(SAMSUNG, 1)
 
Signature · 6 lines
2.5.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

Hi Stéphane and Daniele,

Could you give me lgtm?
Daniel wants someone from client side to ack this change in order to land it.

Kind Regards,
Dongseong

Quoted 66 lines · Dongseong Hwang

Follow-up of kernel patch:
https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html

Generate it using make headers_install

ChromeOS will use new format to optimize video decoding.

CC Stéphane Marchesin <[email protected]>
CC Daniele Castagna <[email protected]>
Cc Rainer Hochecker <[email protected]>
Cc Benjamin Widawsky <[email protected]>
CC Chad Versace <[email protected]>
---
 include/drm/drm_fourcc.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
include/drm/drm_fourcc.h +5 -0
index e741b09..bf68099 100644
@@ -34,6 +34,13 @@
 /* color index */
 #define DRM_FORMAT_C8          fourcc_code('C', '8', ' ', ' ') /* [7:0] C
 */
 
+/* 8 bpp Red */
+#define DRM_FORMAT_R8          fourcc_code('R', '8', ' ', ' ') /* [7:0] R
 */
+
+/* 16 bpp RG */
+#define DRM_FORMAT_RG88                fourcc_code('R', 'G', '8', '8') /*

[15:0] R:G 8:8 little endian */
+#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /*
[15:0] G:R 8:8 little endian */
+
/* 8 bpp RGB */
#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0]
R:G:B 3:3:2 */
#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0]
B:G:R 2:3:3 */

include/drm/drm_fourcc.h +0 -0
@@ -106,6 +113,8 @@
 #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', '2') /*
non-subsampled Cb:Cr plane */

/*
* 3 plane YCbCr

include/drm/drm_fourcc.h +0 -1
@@ -216,7 +225,7 @@
  * - multiple of 128 pixels for the width
  * - multiple of  32 pixels for the height
  *
- * For more information: see

http://linuxtv.org/downloads/v4l-dvb-apis/re32.html
+ * For more information: see
https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
*/
#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)

Quoted 4 lines

--
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

As it's landed in kernel, it doesn't need ack from client users. Sorry for noise.

In addition, I'll send new patch with tree and commit sha info.

- Dongseong

On Thu, Apr 21, 2016 at 7:06 PM, Hwang, Dongseong <[email protected]

Quoted 81 lines

wrote:

Hi Stéphane and Daniele,

Could you give me lgtm?
Daniel wants someone from client side to ack this change in order to land it.

Kind Regards,
Dongseong

Quoted 67 lines · Dongseong Hwang

Follow-up of kernel patch:
https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html

Generate it using make headers_install

ChromeOS will use new format to optimize video decoding.

CC Stéphane Marchesin <[email protected]>
CC Daniele Castagna <[email protected]>
Cc Rainer Hochecker <[email protected]>
Cc Benjamin Widawsky <[email protected]>
CC Chad Versace <[email protected]>
---
 include/drm/drm_fourcc.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
include/drm/drm_fourcc.h +0 -0
index e741b09..bf68099 100644
@@ -34,6 +34,13 @@
 /* color index */
 #define DRM_FORMAT_C8          fourcc_code('C', '8', ' ', ' ') /* [7:0]

C */

include/drm/drm_fourcc.h +2 -0
+/* 8 bpp Red */
+#define DRM_FORMAT_R8          fourcc_code('R', '8', ' ', ' ') /* [7:0]

R */

include/drm/drm_fourcc.h +3 -0
+
+/* 16 bpp RG */
+#define DRM_FORMAT_RG88                fourcc_code('R', 'G', '8', '8')

/* [15:0] R:G 8:8 little endian */
+#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8')
/* [15:0] G:R 8:8 little endian */
+
/* 8 bpp RGB */
#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') /* [7:0]
R:G:B 3:3:2 */
#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') /* [7:0]
B:G:R 2:3:3 */

include/drm/drm_fourcc.h +1 -0
@@ -106,6 +113,8 @@
 #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', '2')
/* non-subsampled Cb:Cr plane */

/*
* 3 plane YCbCr

include/drm/drm_fourcc.h +0 -1
@@ -216,7 +225,7 @@
  * - multiple of 128 pixels for the width
  * - multiple of  32 pixels for the height
  *
- * For more information: see

http://linuxtv.org/downloads/v4l-dvb-apis/re32.html
+ * For more information: see
https://linuxtv.org/downloads/v4l-dvb-apis/re32.html
*/
#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG,
1)

Quoted 5 lines
Quoted 4 lines

--
2.5.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel