Merge "media: MediaCodec: add RGBA_1010102 and RGBA_F16 format support"

This commit is contained in:
Lajos Molnar
2022-01-26 18:19:36 +00:00
committed by Gerrit Code Review
2 changed files with 41 additions and 0 deletions

View File

@@ -21951,9 +21951,11 @@ package android.media {
field public static final int COLOR_Format24bitBGR888 = 12; // 0xc
field @Deprecated public static final int COLOR_Format24bitRGB888 = 11; // 0xb
field @Deprecated public static final int COLOR_Format25bitARGB1888 = 14; // 0xe
field public static final int COLOR_Format32bitABGR2101010 = 2130750114; // 0x7f00aaa2
field public static final int COLOR_Format32bitABGR8888 = 2130747392; // 0x7f00a000
field @Deprecated public static final int COLOR_Format32bitARGB8888 = 16; // 0x10
field @Deprecated public static final int COLOR_Format32bitBGRA8888 = 15; // 0xf
field public static final int COLOR_Format64bitABGRFloat = 2130710294; // 0x7f000f16
field @Deprecated public static final int COLOR_Format8bitRGB332 = 2; // 0x2
field @Deprecated public static final int COLOR_FormatCbYCrY = 27; // 0x1b
field @Deprecated public static final int COLOR_FormatCrYCbY = 28; // 0x1c

View File

@@ -458,6 +458,25 @@ public final class MediaCodecInfo {
// Note: in OMX this is called OMX_COLOR_FormatAndroidOpaque.
public static final int COLOR_FormatSurface = 0x7F000789;
/**
* 64 bits per pixel RGBA color format, with 16-bit signed
* floating point red, green, blue, and alpha components.
* <p>
*
* <pre>
* byte byte byte byte
* <-- i -->|<- i+1 ->|<- i+2 ->|<- i+3 ->|<- i+4 ->|<- i+5 ->|<- i+6 ->|<- i+7 ->
* +---------+---------+-------------------+---------+---------+---------+---------+
* | RED | GREEN | BLUE | ALPHA |
* +---------+---------+-------------------+---------+---------+---------+---------+
* 0 7 0 7 0 7 0 7 0 7 0 7 0 7 0 7
* </pre>
*
* This corresponds to {@link android.graphics.PixelFormat#RGBA_F16}.
*/
@SuppressLint("AllUpper")
public static final int COLOR_Format64bitABGRFloat = 0x7F000F16;
/**
* 32 bits per pixel RGBA color format, with 8-bit red, green, blue, and alpha components.
* <p>
@@ -475,6 +494,26 @@ public final class MediaCodecInfo {
*/
public static final int COLOR_Format32bitABGR8888 = 0x7F00A000;
/**
* 32 bits per pixel RGBA color format, with 10-bit red, green,
* blue, and 2-bit alpha components.
* <p>
* Using 32-bit little-endian representation, colors stored as
* Red 9:0, Green 19:10, Blue 29:20, and Alpha 31:30.
* <pre>
* byte byte byte byte
* <------ i -----> | <---- i+1 ----> | <---- i+2 ----> | <---- i+3 ----->
* +-----------------+---+-------------+-------+---------+-----------+-----+
* | RED | GREEN | BLUE |ALPHA|
* +-----------------+---+-------------+-------+---------+-----------+-----+
* 0 7 0 1 2 7 0 3 4 7 0 5 6 7
* </pre>
*
* This corresponds to {@link android.graphics.PixelFormat#RGBA_1010102}.
*/
@SuppressLint("AllUpper")
public static final int COLOR_Format32bitABGR2101010 = 0x7F00AAA2;
/**
* Flexible 12 bits per pixel, subsampled YUV color format with 8-bit chroma and luma
* components.