diff options
author | bohu <bohu@google.com> | 2022-05-13 13:59:26 -0700 |
---|---|---|
committer | Bo Hu <bohu@google.com> | 2022-05-13 21:01:53 +0000 |
commit | fe82255f0309972b0a7858057a38356241652a14 (patch) | |
tree | 8ece8d5d9909b620719f9dc8424b6a2d824b4090 | |
parent | 9c42d7b37592420d4c44b4810ed134e92f474b4b (diff) | |
download | goldfish-opengl-fe82255f0309972b0a7858057a38356241652a14.tar.gz |
codecs: remove the output buffer as it is not needed by hevc helper
Since the hevc helper only decodes the header, it dose not need
output buffer.
Bug: 228596851
Change-Id: I2955d8b8c4621be283e99eae8a760d8c16bb93f6
-rw-r--r-- | system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.cpp | 17 | ||||
-rw-r--r-- | system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.h | 1 |
2 files changed, 3 insertions, 15 deletions
diff --git a/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.cpp b/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.cpp index 5bf2672d..1b93a0d9 100644 --- a/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.cpp +++ b/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.cpp @@ -64,10 +64,6 @@ GoldfishHevcHelper::GoldfishHevcHelper(int w, int h):mWidth(w),mHeight(h) { crea GoldfishHevcHelper::~GoldfishHevcHelper() { destroyDecoder(); - if (mOutBufferFlush) { - ivd_aligned_free(nullptr, mOutBufferFlush); - mOutBufferFlush = nullptr; - } } void GoldfishHevcHelper::createDecoder() { @@ -304,17 +300,10 @@ bool GoldfishHevcHelper::setDecodeArgs(ivd_video_decode_ip_t *ps_decode_ip, ps_decode_ip->s_out_buffer.u4_min_out_buf_size[0] = lumaSize; ps_decode_ip->s_out_buffer.u4_min_out_buf_size[1] = chromaSize; ps_decode_ip->s_out_buffer.u4_min_out_buf_size[2] = chromaSize; - if (!mOutBufferFlush) { - uint32_t displayStride = mStride; - uint32_t displayHeight = mHeight; - uint32_t bufferSize = displayStride * displayHeight * 3 / 2; - mOutBufferFlush = (uint8_t *)ivd_aligned_malloc(nullptr, 128, bufferSize); - } { - ps_decode_ip->s_out_buffer.pu1_bufs[0] = mOutBufferFlush; - ps_decode_ip->s_out_buffer.pu1_bufs[1] = mOutBufferFlush + lumaSize; - ps_decode_ip->s_out_buffer.pu1_bufs[2] = - mOutBufferFlush + lumaSize + chromaSize; + ps_decode_ip->s_out_buffer.pu1_bufs[0] = nullptr; + ps_decode_ip->s_out_buffer.pu1_bufs[1] = nullptr; + ps_decode_ip->s_out_buffer.pu1_bufs[2] = nullptr; } ps_decode_ip->s_out_buffer.u4_num_bufs = 3; ps_decode_op->u4_size = sizeof(ihevcd_cxa_video_decode_op_t); diff --git a/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.h b/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.h index 22615433..09de8301 100644 --- a/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.h +++ b/system/codecs/c2/decoders/hevcdec/GoldfishHevcHelper.h @@ -59,7 +59,6 @@ class GoldfishHevcHelper { int mNumCores = 1; int mStride = 16; int mOutputDelay = 8; // default - uint8_t* mOutBufferFlush = nullptr; IV_COLOR_FORMAT_T mIvColorformat = IV_YUV_420P; }; |