Loading media/extractors/mp4/ItemTable.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1471,8 +1471,8 @@ sp<MetaData> ItemTable::getImageMeta(const uint32_t imageIndex) { // point image to the first tile for grid size and HVCC image = &mItemIdToItemMap.editValueAt(tileItemIndex); meta->setInt32(kKeyGridWidth, image->width); meta->setInt32(kKeyGridHeight, image->height); meta->setInt32(kKeyTileWidth, image->width); meta->setInt32(kKeyTileHeight, image->height); meta->setInt32(kKeyMaxInputSize, image->width * image->height * 1.5); } Loading media/libmedia/NdkWrapper.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -56,10 +56,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_COLOR_TRANSFER, AMEDIAFORMAT_KEY_COMPLEXITY, AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL, AMEDIAFORMAT_KEY_GRID_COLS, AMEDIAFORMAT_KEY_GRID_HEIGHT, AMEDIAFORMAT_KEY_GRID_COLUMNS, AMEDIAFORMAT_KEY_GRID_ROWS, AMEDIAFORMAT_KEY_GRID_WIDTH, AMEDIAFORMAT_KEY_HEIGHT, AMEDIAFORMAT_KEY_INTRA_REFRESH_PERIOD, AMEDIAFORMAT_KEY_IS_ADTS, Loading @@ -84,6 +82,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_DISPLAY_HEIGHT, AMEDIAFORMAT_KEY_DISPLAY_WIDTH, AMEDIAFORMAT_KEY_TEMPORAL_LAYER_ID, AMEDIAFORMAT_KEY_TILE_HEIGHT, AMEDIAFORMAT_KEY_TILE_WIDTH, AMEDIAFORMAT_KEY_TRACK_INDEX, }; Loading media/libmediaextractor/include/media/stagefright/MetaDataBase.h +3 −3 Original line number Diff line number Diff line Loading @@ -211,11 +211,11 @@ enum { kKeyTemporalLayerId = 'iLyr', // int32_t, temporal layer-id. 0-based (0 => base layer) kKeyTemporalLayerCount = 'cLyr', // int32_t, number of temporal layers encoded kKeyGridWidth = 'grdW', // int32_t, HEIF grid width kKeyGridHeight = 'grdH', // int32_t, HEIF grid height kKeyTileWidth = 'tilW', // int32_t, HEIF tile width kKeyTileHeight = 'tilH', // int32_t, HEIF tile height kKeyGridRows = 'grdR', // int32_t, HEIF grid rows kKeyGridCols = 'grdC', // int32_t, HEIF grid columns kKeyIccProfile = 'prof', // raw data, ICC prifile data kKeyIccProfile = 'prof', // raw data, ICC profile data kKeyIsPrimaryImage = 'prim', // bool (int32_t), image track is the primary image kKeyFrameCount = 'nfrm', // int32_t, total number of frame in video track }; Loading media/libstagefright/ACodec.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -4384,9 +4384,9 @@ status_t ACodec::setupAVCEncoderParameters(const sp<AMessage> &msg) { status_t ACodec::configureImageGrid( const sp<AMessage> &msg, sp<AMessage> &outputFormat) { int32_t gridWidth, gridHeight, gridRows, gridCols; if (!msg->findInt32("grid-width", &gridWidth) || !msg->findInt32("grid-height", &gridHeight) || int32_t tileWidth, tileHeight, gridRows, gridCols; if (!msg->findInt32("tile-width", &tileWidth) || !msg->findInt32("tile-height", &tileHeight) || !msg->findInt32("grid-rows", &gridRows) || !msg->findInt32("grid-cols", &gridCols)) { return OK; Loading @@ -4396,8 +4396,8 @@ status_t ACodec::configureImageGrid( InitOMXParams(&gridType); gridType.nPortIndex = kPortIndexOutput; gridType.bEnabled = OMX_TRUE; gridType.nGridWidth = gridWidth; gridType.nGridHeight = gridHeight; gridType.nTileWidth = tileWidth; gridType.nTileHeight = tileHeight; gridType.nGridRows = gridRows; gridType.nGridCols = gridCols; Loading @@ -4422,8 +4422,8 @@ status_t ACodec::configureImageGrid( &gridType, sizeof(gridType)); if (err == OK && gridType.bEnabled) { outputFormat->setInt32("grid-width", gridType.nGridWidth); outputFormat->setInt32("grid-height", gridType.nGridHeight); outputFormat->setInt32("tile-width", gridType.nTileWidth); outputFormat->setInt32("tile-height", gridType.nTileHeight); outputFormat->setInt32("grid-rows", gridType.nGridRows); outputFormat->setInt32("grid-cols", gridType.nGridCols); } Loading media/libstagefright/FrameDecoder.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -495,27 +495,27 @@ sp<AMessage> ImageDecoder::onGetFormatAndSeekOptions( mGridRows = mGridCols = 1; if (overrideMeta == NULL) { // check if we're dealing with a tiled heif int32_t gridWidth, gridHeight, gridRows, gridCols; if (trackMeta()->findInt32(kKeyGridWidth, &gridWidth) && gridWidth > 0 && trackMeta()->findInt32(kKeyGridHeight, &gridHeight) && gridHeight > 0 int32_t tileWidth, tileHeight, gridRows, gridCols; if (trackMeta()->findInt32(kKeyTileWidth, &tileWidth) && tileWidth > 0 && trackMeta()->findInt32(kKeyTileHeight, &tileHeight) && tileHeight > 0 && trackMeta()->findInt32(kKeyGridRows, &gridRows) && gridRows > 0 && trackMeta()->findInt32(kKeyGridCols, &gridCols) && gridCols > 0) { int32_t width, height; CHECK(trackMeta()->findInt32(kKeyWidth, &width)); CHECK(trackMeta()->findInt32(kKeyHeight, &height)); if (width <= gridWidth * gridCols && height <= gridHeight * gridRows) { ALOGV("grid: %dx%d, size: %dx%d, picture size: %dx%d", gridCols, gridRows, gridWidth, gridHeight, width, height); if (width <= tileWidth * gridCols && height <= tileHeight * gridRows) { ALOGV("grid: %dx%d, tile size: %dx%d, picture size: %dx%d", gridCols, gridRows, tileWidth, tileHeight, width, height); overrideMeta = new MetaData(*(trackMeta())); overrideMeta->setInt32(kKeyWidth, gridWidth); overrideMeta->setInt32(kKeyHeight, gridHeight); overrideMeta->setInt32(kKeyWidth, tileWidth); overrideMeta->setInt32(kKeyHeight, tileHeight); mGridCols = gridCols; mGridRows = gridRows; } else { ALOGE("bad grid: %dx%d, size: %dx%d, picture size: %dx%d", gridCols, gridRows, gridWidth, gridHeight, width, height); ALOGE("bad grid: %dx%d, tile size: %dx%d, picture size: %dx%d", gridCols, gridRows, tileWidth, tileHeight, width, height); } } if (overrideMeta == NULL) { Loading Loading
media/extractors/mp4/ItemTable.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1471,8 +1471,8 @@ sp<MetaData> ItemTable::getImageMeta(const uint32_t imageIndex) { // point image to the first tile for grid size and HVCC image = &mItemIdToItemMap.editValueAt(tileItemIndex); meta->setInt32(kKeyGridWidth, image->width); meta->setInt32(kKeyGridHeight, image->height); meta->setInt32(kKeyTileWidth, image->width); meta->setInt32(kKeyTileHeight, image->height); meta->setInt32(kKeyMaxInputSize, image->width * image->height * 1.5); } Loading
media/libmedia/NdkWrapper.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -56,10 +56,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_COLOR_TRANSFER, AMEDIAFORMAT_KEY_COMPLEXITY, AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL, AMEDIAFORMAT_KEY_GRID_COLS, AMEDIAFORMAT_KEY_GRID_HEIGHT, AMEDIAFORMAT_KEY_GRID_COLUMNS, AMEDIAFORMAT_KEY_GRID_ROWS, AMEDIAFORMAT_KEY_GRID_WIDTH, AMEDIAFORMAT_KEY_HEIGHT, AMEDIAFORMAT_KEY_INTRA_REFRESH_PERIOD, AMEDIAFORMAT_KEY_IS_ADTS, Loading @@ -84,6 +82,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_DISPLAY_HEIGHT, AMEDIAFORMAT_KEY_DISPLAY_WIDTH, AMEDIAFORMAT_KEY_TEMPORAL_LAYER_ID, AMEDIAFORMAT_KEY_TILE_HEIGHT, AMEDIAFORMAT_KEY_TILE_WIDTH, AMEDIAFORMAT_KEY_TRACK_INDEX, }; Loading
media/libmediaextractor/include/media/stagefright/MetaDataBase.h +3 −3 Original line number Diff line number Diff line Loading @@ -211,11 +211,11 @@ enum { kKeyTemporalLayerId = 'iLyr', // int32_t, temporal layer-id. 0-based (0 => base layer) kKeyTemporalLayerCount = 'cLyr', // int32_t, number of temporal layers encoded kKeyGridWidth = 'grdW', // int32_t, HEIF grid width kKeyGridHeight = 'grdH', // int32_t, HEIF grid height kKeyTileWidth = 'tilW', // int32_t, HEIF tile width kKeyTileHeight = 'tilH', // int32_t, HEIF tile height kKeyGridRows = 'grdR', // int32_t, HEIF grid rows kKeyGridCols = 'grdC', // int32_t, HEIF grid columns kKeyIccProfile = 'prof', // raw data, ICC prifile data kKeyIccProfile = 'prof', // raw data, ICC profile data kKeyIsPrimaryImage = 'prim', // bool (int32_t), image track is the primary image kKeyFrameCount = 'nfrm', // int32_t, total number of frame in video track }; Loading
media/libstagefright/ACodec.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -4384,9 +4384,9 @@ status_t ACodec::setupAVCEncoderParameters(const sp<AMessage> &msg) { status_t ACodec::configureImageGrid( const sp<AMessage> &msg, sp<AMessage> &outputFormat) { int32_t gridWidth, gridHeight, gridRows, gridCols; if (!msg->findInt32("grid-width", &gridWidth) || !msg->findInt32("grid-height", &gridHeight) || int32_t tileWidth, tileHeight, gridRows, gridCols; if (!msg->findInt32("tile-width", &tileWidth) || !msg->findInt32("tile-height", &tileHeight) || !msg->findInt32("grid-rows", &gridRows) || !msg->findInt32("grid-cols", &gridCols)) { return OK; Loading @@ -4396,8 +4396,8 @@ status_t ACodec::configureImageGrid( InitOMXParams(&gridType); gridType.nPortIndex = kPortIndexOutput; gridType.bEnabled = OMX_TRUE; gridType.nGridWidth = gridWidth; gridType.nGridHeight = gridHeight; gridType.nTileWidth = tileWidth; gridType.nTileHeight = tileHeight; gridType.nGridRows = gridRows; gridType.nGridCols = gridCols; Loading @@ -4422,8 +4422,8 @@ status_t ACodec::configureImageGrid( &gridType, sizeof(gridType)); if (err == OK && gridType.bEnabled) { outputFormat->setInt32("grid-width", gridType.nGridWidth); outputFormat->setInt32("grid-height", gridType.nGridHeight); outputFormat->setInt32("tile-width", gridType.nTileWidth); outputFormat->setInt32("tile-height", gridType.nTileHeight); outputFormat->setInt32("grid-rows", gridType.nGridRows); outputFormat->setInt32("grid-cols", gridType.nGridCols); } Loading
media/libstagefright/FrameDecoder.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -495,27 +495,27 @@ sp<AMessage> ImageDecoder::onGetFormatAndSeekOptions( mGridRows = mGridCols = 1; if (overrideMeta == NULL) { // check if we're dealing with a tiled heif int32_t gridWidth, gridHeight, gridRows, gridCols; if (trackMeta()->findInt32(kKeyGridWidth, &gridWidth) && gridWidth > 0 && trackMeta()->findInt32(kKeyGridHeight, &gridHeight) && gridHeight > 0 int32_t tileWidth, tileHeight, gridRows, gridCols; if (trackMeta()->findInt32(kKeyTileWidth, &tileWidth) && tileWidth > 0 && trackMeta()->findInt32(kKeyTileHeight, &tileHeight) && tileHeight > 0 && trackMeta()->findInt32(kKeyGridRows, &gridRows) && gridRows > 0 && trackMeta()->findInt32(kKeyGridCols, &gridCols) && gridCols > 0) { int32_t width, height; CHECK(trackMeta()->findInt32(kKeyWidth, &width)); CHECK(trackMeta()->findInt32(kKeyHeight, &height)); if (width <= gridWidth * gridCols && height <= gridHeight * gridRows) { ALOGV("grid: %dx%d, size: %dx%d, picture size: %dx%d", gridCols, gridRows, gridWidth, gridHeight, width, height); if (width <= tileWidth * gridCols && height <= tileHeight * gridRows) { ALOGV("grid: %dx%d, tile size: %dx%d, picture size: %dx%d", gridCols, gridRows, tileWidth, tileHeight, width, height); overrideMeta = new MetaData(*(trackMeta())); overrideMeta->setInt32(kKeyWidth, gridWidth); overrideMeta->setInt32(kKeyHeight, gridHeight); overrideMeta->setInt32(kKeyWidth, tileWidth); overrideMeta->setInt32(kKeyHeight, tileHeight); mGridCols = gridCols; mGridRows = gridRows; } else { ALOGE("bad grid: %dx%d, size: %dx%d, picture size: %dx%d", gridCols, gridRows, gridWidth, gridHeight, width, height); ALOGE("bad grid: %dx%d, tile size: %dx%d, picture size: %dx%d", gridCols, gridRows, tileWidth, tileHeight, width, height); } } if (overrideMeta == NULL) { Loading