Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 130d65a

Browse files
yhe39Shao-Feng
authored andcommitted
The buffer interlace info should change to frame by frame
So far the buffer interlace is set according to GRALLOC_USAGE_PRIVATE_0. It will cause play some irregular size video has green line in screen bottom. Change-Id: I2bff0bf84a056c1e313cb79c2762e788598fd7ac Tests: Video play without issue. Tracked-On: https://jira.devtools.intel.com/browse/OAM-79458 Signed-off-by: HeYue <[email protected]>
1 parent 9bc722f commit 130d65a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

common/core/overlaylayer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ void OverlayLayer::SetBuffer(HWCNativeHandle handle, int32_t acquire_fence,
106106
}
107107
} else {
108108
buffer->SetOriginalHandle(handle);
109+
// need to update interlace info since interlace info is update frame by
110+
// frame
111+
if (buffer->GetUsage() == kLayerVideo)
112+
buffer->SetInterlace(
113+
resource_manager->GetNativeBufferHandler()->GetInterlace(handle));
109114
}
110115

111116
buffer->SetDataSpace(dataspace_);

os/android/utils_android.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
extern "C" {
4040
#endif
4141

42-
#define GRALLOC_USAGE_PRIVATE_INTERLACE GRALLOC_USAGE_PRIVATE_0
43-
4442
// Conversion from HAL to fourcc-based DRM formats
4543
static uint32_t GetDrmFormatFromHALFormat(int format) {
4644
switch (format) {
@@ -221,7 +219,7 @@ static bool ImportGraphicsBuffer(HWCNativeHandle handle, int fd) {
221219
handle->meta_data_.height_ = gr_handle->height;
222220
handle->meta_data_.native_format_ = gr_handle->droid_format;
223221

224-
if (gr_handle->consumer_usage & GRALLOC_USAGE_PRIVATE_INTERLACE) {
222+
if (gr_handle->is_interlaced > 0) {
225223
handle->meta_data_.is_interlaced_ = true;
226224
} else {
227225
handle->meta_data_.is_interlaced_ = false;

0 commit comments

Comments
 (0)