diff options
-rw-r--r-- | system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp | 5 | ||||
-rw-r--r-- | system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp | 5 | ||||
-rw-r--r-- | system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp b/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp index 8e871458..90b56532 100644 --- a/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp +++ b/system/codecs/c2/decoders/avcdec/C2GoldfishAvcDec.cpp @@ -670,10 +670,11 @@ C2GoldfishAvcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> &pool) { void C2GoldfishAvcDec::checkMode(const std::shared_ptr<C2BlockPool> &pool) { mWidth = mIntf->width(); mHeight = mIntf->height(); - const bool isGraphic = (pool->getAllocatorId() == C2Allocator::GRAPHIC); + const bool isGraphic = (pool->getAllocatorId() & C2Allocator::GRAPHIC); + DDD("buffer id %d", (int)(pool->getAllocatorId())); if (isGraphic) { DDD("decoding to host color buffer"); - mEnableAndroidNativeBuffers = false; + mEnableAndroidNativeBuffers = true; } else { DDD("decoding to guest byte buffer"); mEnableAndroidNativeBuffers = false; diff --git a/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp b/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp index 7aac56f8..7008bd5d 100644 --- a/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp +++ b/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp @@ -661,10 +661,11 @@ C2GoldfishHevcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> &pool) void C2GoldfishHevcDec::checkMode(const std::shared_ptr<C2BlockPool> &pool) { mWidth = mIntf->width(); mHeight = mIntf->height(); - const bool isGraphic = (pool->getAllocatorId() == C2Allocator::GRAPHIC); + const bool isGraphic = (pool->getAllocatorId() & C2Allocator::GRAPHIC); + DDD("buffer id %d", (int)(pool->getAllocatorId())); if (isGraphic) { DDD("decoding to host color buffer"); - mEnableAndroidNativeBuffers = false; + mEnableAndroidNativeBuffers = true; } else { DDD("decoding to guest byte buffer"); mEnableAndroidNativeBuffers = false; diff --git a/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp b/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp index bb61cf94..99f0469a 100644 --- a/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp +++ b/system/codecs/c2/decoders/vpxdec/C2GoldfishVpxDec.cpp @@ -465,10 +465,11 @@ void C2GoldfishVpxDec::checkContext(const std::shared_ptr<C2BlockPool> &pool) { mCtx = new vpx_codec_ctx_t; mCtx->vpversion = mMode == MODE_VP8 ? 8 : 9; - const bool isGraphic = (pool->getAllocatorId() == C2Allocator::GRAPHIC); + const bool isGraphic = (pool->getAllocatorId() & C2Allocator::GRAPHIC); + DDD("buffer id %d", (int)(pool->getAllocatorId())); if (isGraphic) { DDD("decoding to host color buffer"); - mEnableAndroidNativeBuffers = false; + mEnableAndroidNativeBuffers = true; } else { DDD("decoding to guest byte buffer"); mEnableAndroidNativeBuffers = false; |