Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goldfish-opengl
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
device
generic
goldfish-opengl
Commits
ba776504
Commit
ba776504
authored
Apr 17, 2019
by
android-build-team Robot
Browse files
Options
Downloads
Plain Diff
Snap for 5476769 from
76835be6
to qt-release
Change-Id: I2363f0efbebbf5dee02557e94125510bea9ce6c4
parents
f7ce8cef
76835be6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
shared/OpenglCodecCommon/gralloc_cb.h
+2
-1
2 additions, 1 deletion
shared/OpenglCodecCommon/gralloc_cb.h
system/gralloc/gralloc.cpp
+22
-7
22 additions, 7 deletions
system/gralloc/gralloc.cpp
with
24 additions
and
8 deletions
shared/OpenglCodecCommon/gralloc_cb.h
+
2
−
1
View file @
ba776504
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
enum
EmulatorFrameworkFormat
{
enum
EmulatorFrameworkFormat
{
FRAMEWORK_FORMAT_GL_COMPATIBLE
=
0
,
FRAMEWORK_FORMAT_GL_COMPATIBLE
=
0
,
FRAMEWORK_FORMAT_YV12
=
1
,
FRAMEWORK_FORMAT_YV12
=
1
,
FRAMEWORK_FORMAT_YUV_420_888
=
2
,
FRAMEWORK_FORMAT_YUV_420_888
=
2
,
// (Y+)(U+)(V+)
FRAMEWORK_FORMAT_YUV_420_888_INTERLEAVED
=
3
,
// (Y+)(UV)+
};
};
//
//
...
...
...
...
This diff is collapsed.
Click to expand it.
system/gralloc/gralloc.cpp
+
22
−
7
View file @
ba776504
...
@@ -622,7 +622,13 @@ static int gralloc_alloc(alloc_device_t* dev,
...
@@ -622,7 +622,13 @@ static int gralloc_alloc(alloc_device_t* dev,
// We are going to use RGB888 on the host
// We are going to use RGB888 on the host
glFormat
=
GL_RGB
;
glFormat
=
GL_RGB
;
glType
=
GL_UNSIGNED_BYTE
;
glType
=
GL_UNSIGNED_BYTE
;
if
(
usage
&
(
GRALLOC_USAGE_HW_CAMERA_READ
|
GRALLOC_USAGE_HW_CAMERA_WRITE
))
{
// EmulatedFakeCamera3.cpp assumes it is NV21
selectedEmuFrameworkFormat
=
FRAMEWORK_FORMAT_YUV_420_888_INTERLEAVED
;
}
else
{
selectedEmuFrameworkFormat
=
FRAMEWORK_FORMAT_YUV_420_888
;
selectedEmuFrameworkFormat
=
FRAMEWORK_FORMAT_YUV_420_888
;
}
break
;
break
;
default
:
default
:
ALOGE
(
"gralloc_alloc: Unknown format %d"
,
format
);
ALOGE
(
"gralloc_alloc: Unknown format %d"
,
format
);
...
@@ -1360,12 +1366,21 @@ static int gralloc_lock_ycbcr(gralloc_module_t const* module,
...
@@ -1360,12 +1366,21 @@ static int gralloc_lock_ycbcr(gralloc_module_t const* module,
cStep
=
1
;
cStep
=
1
;
break
;
break
;
case
HAL_PIXEL_FORMAT_YCbCr_420_888
:
case
HAL_PIXEL_FORMAT_YCbCr_420_888
:
if
(
cb
->
emuFrameworkFormat
==
FRAMEWORK_FORMAT_YUV_420_888_INTERLEAVED
)
{
yStride
=
cb
->
width
;
cStride
=
cb
->
width
;
yOffset
=
0
;
vOffset
=
yStride
*
cb
->
height
;
uOffset
=
vOffset
+
1
;
cStep
=
2
;
}
else
{
yStride
=
cb
->
width
;
yStride
=
cb
->
width
;
cStride
=
yStride
/
2
;
cStride
=
yStride
/
2
;
yOffset
=
0
;
yOffset
=
0
;
uOffset
=
cb
->
height
*
yStride
;
uOffset
=
cb
->
height
*
yStride
;
vOffset
=
uOffset
+
cStride
*
cb
->
height
/
2
;
vOffset
=
uOffset
+
cStride
*
cb
->
height
/
2
;
cStep
=
1
;
cStep
=
1
;
}
break
;
break
;
default
:
default
:
ALOGE
(
"gralloc_lock_ycbcr unexpected internal format %x"
,
ALOGE
(
"gralloc_lock_ycbcr unexpected internal format %x"
,
...
...
...
...
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
sign in
to comment