Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
ca0cb785
Commit
ca0cb785
authored
Apr 18, 2013
by
Alex Ray
Committed by
Android (Google) Code Review
Apr 18, 2013
Browse files
Options
Downloads
Plain Diff
Merge "graphics: add Android flexible YCbCr format" into jb-mr2-dev
parents
25538257
e13f15ab
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/system/graphics.h
+54
-0
54 additions, 0 deletions
include/system/graphics.h
with
54 additions
and
0 deletions
include/system/graphics.h
+
54
−
0
View file @
ca0cb785
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
#ifndef SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H
#ifndef SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H
#define SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H
#define SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H
#include
<stdint.h>
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
...
@@ -188,12 +190,64 @@ enum {
...
@@ -188,12 +190,64 @@ enum {
*/
*/
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
=
0x22
,
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
=
0x22
,
/*
* Android flexible YCbCr formats
*
* This format allows platforms to use an efficient YCbCr/YCrCb buffer
* layout, while still describing the buffer layout in a way accessible to
* the CPU in a device-independent manner. While called YCbCr, it can be
* used to describe formats with either chromatic ordering, as well as
* whole planar or semiplanar layouts.
*
* struct android_ycbcr (below) is the the struct used to describe it.
*
* This format must be accepted by the gralloc module when
* USAGE_HW_CAMERA_WRITE and USAGE_SW_READ_* are set.
*
* This format is locked for use by gralloc's (*lock_ycbcr) method, and
* locking with the (*lock) method will return an error.
*/
HAL_PIXEL_FORMAT_YCbCr_420_888
=
0x23
,
/* Legacy formats (deprecated), used by ImageFormat.java */
/* Legacy formats (deprecated), used by ImageFormat.java */
HAL_PIXEL_FORMAT_YCbCr_422_SP
=
0x10
,
// NV16
HAL_PIXEL_FORMAT_YCbCr_422_SP
=
0x10
,
// NV16
HAL_PIXEL_FORMAT_YCrCb_420_SP
=
0x11
,
// NV21
HAL_PIXEL_FORMAT_YCrCb_420_SP
=
0x11
,
// NV21
HAL_PIXEL_FORMAT_YCbCr_422_I
=
0x14
,
// YUY2
HAL_PIXEL_FORMAT_YCbCr_422_I
=
0x14
,
// YUY2
};
};
/*
* Structure for describing YCbCr formats for consumption by applications.
* This is used with HAL_PIXEL_FORMAT_YCbCr_*_888.
*
* Buffer chroma subsampling is defined in the format.
* e.g. HAL_PIXEL_FORMAT_YCbCr_420_888 has subsampling 4:2:0.
*
* Buffers must have a 8 bit depth.
*
* @y, @cb, and @cr point to the first byte of their respective planes.
*
* Stride describes the distance in bytes from the first value of one row of
* the image to the first value of the next row. It includes the width of the
* image plus padding.
* @ystride is the stride of the luma plane.
* @cstride is the stride of the chroma planes.
*
* @chroma_step is the distance in bytes from one chroma pixel value to the
* next. This is 2 bytes for semiplanar (because chroma values are interleaved
* and each chroma value is one byte) and 1 for planar.
*/
struct
android_ycbcr
{
void
*
y
;
void
*
cb
;
void
*
cr
;
size_t
ystride
;
size_t
cstride
;
size_t
chroma_step
;
/** reserved for future use, set to 0 by gralloc's (*lock_ycbcr)() */
uint32_t
reserved
[
8
];
};
/**
/**
* Transformation definitions
* Transformation definitions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment