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

Commit f8e9f76

Browse files
Shao-Fengjs0701
authored andcommitted
WA for VPP linux compiling error
WA for VPP linux compiling error Change-Id: Ibf5363ac15abdbdf2705363ea7d7913ab26d231a Tracked-On: None Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
1 parent 4d5d131 commit f8e9f76

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Android.common.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ LOCAL_C_INCLUDES += \
151151
LOCAL_SHARED_LIBRARIES += \
152152
libva \
153153
libva-android
154-
LOCAL_CPPFLAGS += -DVA_WITH_PAVP
154+
LOCAL_CPPFLAGS += \
155+
-DVA_WITH_PAVP \
156+
-DVA_WITH_VPP
155157
else
156158
LOCAL_CPPFLAGS += -DDISABLE_VA
157159
endif

common/Android.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libva
101101
LOCAL_SRC_FILES += compositor/va/varenderer.cpp \
102102
compositor/va/vautils.cpp
103103

104-
LOCAL_CPPFLAGS += -DVA_WITH_PAVP
104+
LOCAL_CPPFLAGS += \
105+
-DVA_WITH_PAVP \
106+
-DVA_WITH_VPP
105107
else
106108
LOCAL_CPPFLAGS += -DDISABLE_VA
107109
endif

common/compositor/va/varenderer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,6 @@ bool VARenderer::Draw(const MediaState& state, NativeSurface* surface) {
310310
output_region.width = layer_in->GetDisplayFrameWidth();
311311
output_region.height = layer_in->GetDisplayFrameHeight();
312312

313-
VABlendState bs = {};
314-
bs.flags = VA_BLEND_PREMULTIPLIED_ALPHA;
315-
316313
VAProcPipelineParameterBuffer pipe_param = {};
317314
pipe_param.surface = surface_in;
318315
pipe_param.surface_region = &surface_region;
@@ -332,7 +329,11 @@ bool VARenderer::Draw(const MediaState& state, NativeSurface* surface) {
332329
}
333330
#endif
334331

332+
#ifdef VA_WITH_VPP
333+
VABlendState bs = {};
334+
bs.flags = VA_BLEND_PREMULTIPLIED_ALPHA;
335335
pipe_param.blend_state = &bs;
336+
#endif
336337

337338
DUMPTRACE("surface_region: (%d, %d, %d, %d)\n", surface_region.x,
338339
surface_region.y, surface_region.width, surface_region.height);

0 commit comments

Comments
 (0)