Loading media/codec2/components/avc/C2SoftAvcDec.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -511,7 +511,7 @@ void C2SoftAvcDec::getVersion() { status_t C2SoftAvcDec::initDecoder() { if (OK != createDecoder()) return UNKNOWN_ERROR; mNumCores = MIN(getCpuCoreCount(), MAX_NUM_CORES); mStride = ALIGN32(mWidth); mStride = ALIGN128(mWidth); mSignalledError = false; resetPlugin(); (void) setNumCores(); Loading Loading @@ -777,20 +777,20 @@ c2_status_t C2SoftAvcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> return C2_CORRUPTED; } if (mOutBlock && (mOutBlock->width() != ALIGN32(mWidth) || mOutBlock->height() != mHeight)) { (mOutBlock->width() != ALIGN128(mWidth) || mOutBlock->height() != mHeight)) { mOutBlock.reset(); } if (!mOutBlock) { uint32_t format = HAL_PIXEL_FORMAT_YV12; C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE }; c2_status_t err = pool->fetchGraphicBlock(ALIGN32(mWidth), mHeight, format, usage, &mOutBlock); pool->fetchGraphicBlock(ALIGN128(mWidth), mHeight, format, usage, &mOutBlock); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); return err; } ALOGV("provided (%dx%d) required (%dx%d)", mOutBlock->width(), mOutBlock->height(), ALIGN32(mWidth), mHeight); mOutBlock->width(), mOutBlock->height(), ALIGN128(mWidth), mHeight); } return C2_OK; Loading Loading @@ -928,7 +928,7 @@ void C2SoftAvcDec::process( if (0 < ps_decode_op->u4_pic_wd && 0 < ps_decode_op->u4_pic_ht) { if (mHeaderDecoded == false) { mHeaderDecoded = true; mStride = ALIGN32(ps_decode_op->u4_pic_wd); mStride = ALIGN128(ps_decode_op->u4_pic_wd); setParams(mStride, IVD_DECODE_FRAME); } if (ps_decode_op->u4_pic_wd != mWidth || ps_decode_op->u4_pic_ht != mHeight) { Loading media/codec2/components/avc/C2SoftAvcDec.h +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ namespace android { #define ivdext_ctl_set_num_cores_op_t ih264d_ctl_set_num_cores_op_t #define ivdext_ctl_get_vui_params_ip_t ih264d_ctl_get_vui_params_ip_t #define ivdext_ctl_get_vui_params_op_t ih264d_ctl_get_vui_params_op_t #define ALIGN32(x) ((((x) + 31) >> 5) << 5) #define ALIGN128(x) ((((x) + 127) >> 7) << 7) #define MAX_NUM_CORES 4 #define IVDEXT_CMD_CTL_SET_NUM_CORES \ (IVD_CONTROL_API_COMMAND_TYPE_T)IH264D_CMD_CTL_SET_NUM_CORES Loading media/codec2/components/hevc/C2SoftHevcDec.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -502,7 +502,7 @@ status_t C2SoftHevcDec::getVersion() { status_t C2SoftHevcDec::initDecoder() { if (OK != createDecoder()) return UNKNOWN_ERROR; mNumCores = MIN(getCpuCoreCount(), MAX_NUM_CORES); mStride = ALIGN32(mWidth); mStride = ALIGN128(mWidth); mSignalledError = false; resetPlugin(); (void) setNumCores(); Loading Loading @@ -768,20 +768,20 @@ c2_status_t C2SoftHevcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> return C2_CORRUPTED; } if (mOutBlock && (mOutBlock->width() != ALIGN32(mWidth) || mOutBlock->height() != mHeight)) { (mOutBlock->width() != ALIGN128(mWidth) || mOutBlock->height() != mHeight)) { mOutBlock.reset(); } if (!mOutBlock) { uint32_t format = HAL_PIXEL_FORMAT_YV12; C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE }; c2_status_t err = pool->fetchGraphicBlock(ALIGN32(mWidth), mHeight, format, usage, &mOutBlock); pool->fetchGraphicBlock(ALIGN128(mWidth), mHeight, format, usage, &mOutBlock); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); return err; } ALOGV("provided (%dx%d) required (%dx%d)", mOutBlock->width(), mOutBlock->height(), ALIGN32(mWidth), mHeight); mOutBlock->width(), mOutBlock->height(), ALIGN128(mWidth), mHeight); } return C2_OK; Loading Loading @@ -917,7 +917,7 @@ void C2SoftHevcDec::process( if (0 < ps_decode_op->u4_pic_wd && 0 < ps_decode_op->u4_pic_ht) { if (mHeaderDecoded == false) { mHeaderDecoded = true; setParams(ALIGN32(ps_decode_op->u4_pic_wd), IVD_DECODE_FRAME); setParams(ALIGN128(ps_decode_op->u4_pic_wd), IVD_DECODE_FRAME); } if (ps_decode_op->u4_pic_wd != mWidth || ps_decode_op->u4_pic_ht != mHeight) { mWidth = ps_decode_op->u4_pic_wd; Loading media/codec2/components/hevc/C2SoftHevcDec.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ namespace android { #define ivdext_ctl_set_num_cores_op_t ihevcd_cxa_ctl_set_num_cores_op_t #define ivdext_ctl_get_vui_params_ip_t ihevcd_cxa_ctl_get_vui_params_ip_t #define ivdext_ctl_get_vui_params_op_t ihevcd_cxa_ctl_get_vui_params_op_t #define ALIGN32(x) ((((x) + 31) >> 5) << 5) #define ALIGN128(x) ((((x) + 127) >> 7) << 7) #define MAX_NUM_CORES 4 #define IVDEXT_CMD_CTL_SET_NUM_CORES \ (IVD_CONTROL_API_COMMAND_TYPE_T)IHEVCD_CXA_CMD_CTL_SET_NUM_CORES Loading media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -572,7 +572,7 @@ status_t C2SoftMpeg2Dec::initDecoder() { if (OK != createDecoder()) return UNKNOWN_ERROR; mNumCores = MIN(getCpuCoreCount(), MAX_NUM_CORES); mStride = ALIGN32(mWidth); mStride = ALIGN128(mWidth); mSignalledError = false; resetPlugin(); (void) setNumCores(); Loading Loading @@ -845,20 +845,20 @@ c2_status_t C2SoftMpeg2Dec::ensureDecoderState(const std::shared_ptr<C2BlockPool return C2_CORRUPTED; } if (mOutBlock && (mOutBlock->width() != ALIGN32(mWidth) || mOutBlock->height() != mHeight)) { (mOutBlock->width() != ALIGN128(mWidth) || mOutBlock->height() != mHeight)) { mOutBlock.reset(); } if (!mOutBlock) { uint32_t format = HAL_PIXEL_FORMAT_YV12; C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE }; c2_status_t err = pool->fetchGraphicBlock(ALIGN32(mWidth), mHeight, format, usage, &mOutBlock); pool->fetchGraphicBlock(ALIGN128(mWidth), mHeight, format, usage, &mOutBlock); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); return err; } ALOGV("provided (%dx%d) required (%dx%d)", mOutBlock->width(), mOutBlock->height(), ALIGN32(mWidth), mHeight); mOutBlock->width(), mOutBlock->height(), ALIGN128(mWidth), mHeight); } return C2_OK; Loading Loading
media/codec2/components/avc/C2SoftAvcDec.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -511,7 +511,7 @@ void C2SoftAvcDec::getVersion() { status_t C2SoftAvcDec::initDecoder() { if (OK != createDecoder()) return UNKNOWN_ERROR; mNumCores = MIN(getCpuCoreCount(), MAX_NUM_CORES); mStride = ALIGN32(mWidth); mStride = ALIGN128(mWidth); mSignalledError = false; resetPlugin(); (void) setNumCores(); Loading Loading @@ -777,20 +777,20 @@ c2_status_t C2SoftAvcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> return C2_CORRUPTED; } if (mOutBlock && (mOutBlock->width() != ALIGN32(mWidth) || mOutBlock->height() != mHeight)) { (mOutBlock->width() != ALIGN128(mWidth) || mOutBlock->height() != mHeight)) { mOutBlock.reset(); } if (!mOutBlock) { uint32_t format = HAL_PIXEL_FORMAT_YV12; C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE }; c2_status_t err = pool->fetchGraphicBlock(ALIGN32(mWidth), mHeight, format, usage, &mOutBlock); pool->fetchGraphicBlock(ALIGN128(mWidth), mHeight, format, usage, &mOutBlock); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); return err; } ALOGV("provided (%dx%d) required (%dx%d)", mOutBlock->width(), mOutBlock->height(), ALIGN32(mWidth), mHeight); mOutBlock->width(), mOutBlock->height(), ALIGN128(mWidth), mHeight); } return C2_OK; Loading Loading @@ -928,7 +928,7 @@ void C2SoftAvcDec::process( if (0 < ps_decode_op->u4_pic_wd && 0 < ps_decode_op->u4_pic_ht) { if (mHeaderDecoded == false) { mHeaderDecoded = true; mStride = ALIGN32(ps_decode_op->u4_pic_wd); mStride = ALIGN128(ps_decode_op->u4_pic_wd); setParams(mStride, IVD_DECODE_FRAME); } if (ps_decode_op->u4_pic_wd != mWidth || ps_decode_op->u4_pic_ht != mHeight) { Loading
media/codec2/components/avc/C2SoftAvcDec.h +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ namespace android { #define ivdext_ctl_set_num_cores_op_t ih264d_ctl_set_num_cores_op_t #define ivdext_ctl_get_vui_params_ip_t ih264d_ctl_get_vui_params_ip_t #define ivdext_ctl_get_vui_params_op_t ih264d_ctl_get_vui_params_op_t #define ALIGN32(x) ((((x) + 31) >> 5) << 5) #define ALIGN128(x) ((((x) + 127) >> 7) << 7) #define MAX_NUM_CORES 4 #define IVDEXT_CMD_CTL_SET_NUM_CORES \ (IVD_CONTROL_API_COMMAND_TYPE_T)IH264D_CMD_CTL_SET_NUM_CORES Loading
media/codec2/components/hevc/C2SoftHevcDec.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -502,7 +502,7 @@ status_t C2SoftHevcDec::getVersion() { status_t C2SoftHevcDec::initDecoder() { if (OK != createDecoder()) return UNKNOWN_ERROR; mNumCores = MIN(getCpuCoreCount(), MAX_NUM_CORES); mStride = ALIGN32(mWidth); mStride = ALIGN128(mWidth); mSignalledError = false; resetPlugin(); (void) setNumCores(); Loading Loading @@ -768,20 +768,20 @@ c2_status_t C2SoftHevcDec::ensureDecoderState(const std::shared_ptr<C2BlockPool> return C2_CORRUPTED; } if (mOutBlock && (mOutBlock->width() != ALIGN32(mWidth) || mOutBlock->height() != mHeight)) { (mOutBlock->width() != ALIGN128(mWidth) || mOutBlock->height() != mHeight)) { mOutBlock.reset(); } if (!mOutBlock) { uint32_t format = HAL_PIXEL_FORMAT_YV12; C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE }; c2_status_t err = pool->fetchGraphicBlock(ALIGN32(mWidth), mHeight, format, usage, &mOutBlock); pool->fetchGraphicBlock(ALIGN128(mWidth), mHeight, format, usage, &mOutBlock); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); return err; } ALOGV("provided (%dx%d) required (%dx%d)", mOutBlock->width(), mOutBlock->height(), ALIGN32(mWidth), mHeight); mOutBlock->width(), mOutBlock->height(), ALIGN128(mWidth), mHeight); } return C2_OK; Loading Loading @@ -917,7 +917,7 @@ void C2SoftHevcDec::process( if (0 < ps_decode_op->u4_pic_wd && 0 < ps_decode_op->u4_pic_ht) { if (mHeaderDecoded == false) { mHeaderDecoded = true; setParams(ALIGN32(ps_decode_op->u4_pic_wd), IVD_DECODE_FRAME); setParams(ALIGN128(ps_decode_op->u4_pic_wd), IVD_DECODE_FRAME); } if (ps_decode_op->u4_pic_wd != mWidth || ps_decode_op->u4_pic_ht != mHeight) { mWidth = ps_decode_op->u4_pic_wd; Loading
media/codec2/components/hevc/C2SoftHevcDec.h +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ namespace android { #define ivdext_ctl_set_num_cores_op_t ihevcd_cxa_ctl_set_num_cores_op_t #define ivdext_ctl_get_vui_params_ip_t ihevcd_cxa_ctl_get_vui_params_ip_t #define ivdext_ctl_get_vui_params_op_t ihevcd_cxa_ctl_get_vui_params_op_t #define ALIGN32(x) ((((x) + 31) >> 5) << 5) #define ALIGN128(x) ((((x) + 127) >> 7) << 7) #define MAX_NUM_CORES 4 #define IVDEXT_CMD_CTL_SET_NUM_CORES \ (IVD_CONTROL_API_COMMAND_TYPE_T)IHEVCD_CXA_CMD_CTL_SET_NUM_CORES Loading
media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -572,7 +572,7 @@ status_t C2SoftMpeg2Dec::initDecoder() { if (OK != createDecoder()) return UNKNOWN_ERROR; mNumCores = MIN(getCpuCoreCount(), MAX_NUM_CORES); mStride = ALIGN32(mWidth); mStride = ALIGN128(mWidth); mSignalledError = false; resetPlugin(); (void) setNumCores(); Loading Loading @@ -845,20 +845,20 @@ c2_status_t C2SoftMpeg2Dec::ensureDecoderState(const std::shared_ptr<C2BlockPool return C2_CORRUPTED; } if (mOutBlock && (mOutBlock->width() != ALIGN32(mWidth) || mOutBlock->height() != mHeight)) { (mOutBlock->width() != ALIGN128(mWidth) || mOutBlock->height() != mHeight)) { mOutBlock.reset(); } if (!mOutBlock) { uint32_t format = HAL_PIXEL_FORMAT_YV12; C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE }; c2_status_t err = pool->fetchGraphicBlock(ALIGN32(mWidth), mHeight, format, usage, &mOutBlock); pool->fetchGraphicBlock(ALIGN128(mWidth), mHeight, format, usage, &mOutBlock); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); return err; } ALOGV("provided (%dx%d) required (%dx%d)", mOutBlock->width(), mOutBlock->height(), ALIGN32(mWidth), mHeight); mOutBlock->width(), mOutBlock->height(), ALIGN128(mWidth), mHeight); } return C2_OK; Loading