Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions c2_components/include/mfx_c2_decoder_component.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "mfx_c2_bitstream_in.h"
#include "mfx_frame_pool_allocator.h"
#include "mfx_gralloc_instance.h"
#include "mfx_intel_device.h"
#include "mfx_c2_setters.h"
#include "mfx_c2_utils.h"
#include <cutils/properties.h>
Expand Down Expand Up @@ -265,7 +264,6 @@ class MfxC2DecoderComponent : public MfxC2Component
// dump output multiple times, the first dumped file named xxx_0.yuv,
// second dumped file named xxx_1.yuv ...
uint32_t m_file_num = 0;
bool m_needCpuAccess = false;

/* -----------------------C2Parameters--------------------------- */
std::shared_ptr<C2ComponentNameSetting> m_name;
Expand Down
18 changes: 1 addition & 17 deletions c2_components/src/mfx_c2_decoder_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mfx_c2_decoder_component.h"

#include "mfx_debug.h"
#include "mfx_intel_device.h"
#include "mfx_msdk_debug.h"
#include "mfx_c2_debug.h"
#include "mfx_c2_components_registry.h"
Expand Down Expand Up @@ -179,12 +178,6 @@ MfxC2DecoderComponent::MfxC2DecoderComponent(const C2String name, const CreateCo
MFX_DEBUG_TRACE_FUNC;
const unsigned int SINGLE_STREAM_ID = 0u;

// We need to enable CPU access to the buffers of decoded images when
// 1. decode with DG2 and display with RPL-p iGPU;
// 2. decode with RPL-p iGPU and display with DG2.
// The displaying GPU will appear as virtio-GPU.
m_needCpuAccess = enforceLinearBuffer();

addParameter(
DefineParam(m_kind, C2_PARAMKEY_COMPONENT_KIND)
.withConstValue(new C2ComponentKindSetting(C2Component::KIND_DECODER))
Expand Down Expand Up @@ -233,11 +226,6 @@ MfxC2DecoderComponent::MfxC2DecoderComponent(const C2String name, const CreateCo
.build());

m_consumerUsage = C2AndroidMemoryUsage::FromGrallocUsage(kDefaultConsumerUsage).expected;
// We need these flags in the case of hybrid GPU.
if (m_needCpuAccess) {
m_consumerUsage |= C2AndroidMemoryUsage::CPU_READ;
m_consumerUsage |= C2AndroidMemoryUsage::CPU_WRITE;
}
addParameter(
DefineParam(m_outputUsage, C2_PARAMKEY_OUTPUT_STREAM_USAGE)
.withDefault(new C2StreamUsageTuning::output(SINGLE_STREAM_ID, m_consumerUsage))
Expand Down Expand Up @@ -1588,10 +1576,6 @@ void MfxC2DecoderComponent::DoUpdateMfxParam(const std::vector<C2Param*> &params
case kParamIndexUsage: {
if (C2StreamUsageTuning::output::PARAM_TYPE == param->index()) {
m_consumerUsage = m_outputUsage->value;
if (m_needCpuAccess) {
m_consumerUsage |= C2AndroidMemoryUsage::CPU_READ;
m_consumerUsage |= C2AndroidMemoryUsage::CPU_WRITE;
}
// Set memory type according to consumer usage sent from framework
m_mfxVideoParams.IOPattern = (m_consumerUsage & (C2MemoryUsage::CPU_READ | C2MemoryUsage::CPU_WRITE)) ?
MFX_IOPATTERN_OUT_SYSTEM_MEMORY : MFX_IOPATTERN_OUT_VIDEO_MEMORY;
Expand Down Expand Up @@ -1854,7 +1838,7 @@ c2_status_t MfxC2DecoderComponent::AllocateC2Block(uint32_t width, uint32_t heig
}
}
} else if (m_mfxVideoParams.IOPattern == MFX_IOPATTERN_OUT_SYSTEM_MEMORY) {
C2MemoryUsage mem_usage = {m_consumerUsage, C2MemoryUsage::CPU_WRITE};
C2MemoryUsage mem_usage = {m_consumerUsage, 0};
res = m_c2Allocator->fetchGraphicBlock(width, height,
MfxFourCCToGralloc(fourcc, false), mem_usage, out_block);
}
Expand Down
1 change: 0 additions & 1 deletion c2_utils/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ cc_library_static {
],

shared_libs: [
"libdrm",
"liblog",
"libgralloctypes",
"libstagefright_foundation",
Expand Down
54 changes: 0 additions & 54 deletions c2_utils/include/mfx_intel_device.h

This file was deleted.

4 changes: 0 additions & 4 deletions c2_utils/src/mfx_c2_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "mfx_c2_utils.h"
#include "mfx_debug.h"
#include "mfx_c2_debug.h"
#include "mfx_intel_device.h"

#include <iomanip>
#include <sys/types.h>
Expand Down Expand Up @@ -574,9 +573,6 @@ int MfxFourCCToGralloc(mfxU32 fourcc, bool using_video_memory)
MFX_DEBUG_TRACE_FUNC;
MFX_DEBUG_TRACE_U32(fourcc);

if (enforceLinearBuffer()) {
using_video_memory = false;
}
switch (fourcc)
{
case MFX_FOURCC_NV12:
Expand Down
Loading