gralloc: Fix ITU formats for camera
Make sure ITU formats are applied exclusively for camera buffers. Camera HW_TEXTURE buffers go to GPU and should be marked as 601 FR. Earlier, this was OR'd with video encoder due to which it incorrectly got marked as 709. Change-Id: Icaf3692b581b7861229e613dd632123d21dda2cf
This commit is contained in:
@@ -109,11 +109,17 @@ int gpu_context_t::gralloc_alloc_buffer(size_t size, int usage,
|
|||||||
#ifndef MDSS_TARGET
|
#ifndef MDSS_TARGET
|
||||||
flags |= private_handle_t::PRIV_FLAGS_ITU_R_601_FR;
|
flags |= private_handle_t::PRIV_FLAGS_ITU_R_601_FR;
|
||||||
#else
|
#else
|
||||||
if (usage & (GRALLOC_USAGE_HW_TEXTURE |
|
// Per the camera spec ITU 709 format should be set only for
|
||||||
GRALLOC_USAGE_HW_VIDEO_ENCODER))
|
// video encoding.
|
||||||
|
// It should be set to ITU 601 full range format for any other
|
||||||
|
// camera buffer
|
||||||
|
//
|
||||||
|
if (usage & GRALLOC_USAGE_HW_CAMERA_MASK) {
|
||||||
|
if (usage & GRALLOC_USAGE_HW_VIDEO_ENCODER)
|
||||||
flags |= private_handle_t::PRIV_FLAGS_ITU_R_709;
|
flags |= private_handle_t::PRIV_FLAGS_ITU_R_709;
|
||||||
else if (usage & GRALLOC_USAGE_HW_CAMERA_ZSL)
|
else
|
||||||
flags |= private_handle_t::PRIV_FLAGS_ITU_R_601_FR;
|
flags |= private_handle_t::PRIV_FLAGS_ITU_R_601_FR;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
flags |= private_handle_t::PRIV_FLAGS_ITU_R_601;
|
flags |= private_handle_t::PRIV_FLAGS_ITU_R_601;
|
||||||
|
|||||||
Reference in New Issue
Block a user