AV1: Fixed an issue with multiple tile group OBUs per picture cases. (#404)
* * rocDecode/AV1: Fixed an issue with multiple tile group OBUs per picture cases. - We now use the single base pointer for all tiles in all tile group OBUs and submit them once per picture. * * rocDecode/AV1: Fixed a typo.
This commit is contained in:
@@ -1233,10 +1233,9 @@ void Av1VideoParser::ParseTileGroupObu(uint8_t *p_stream, size_t size) {
|
||||
uint8_t *p_tg_buf = p_stream;
|
||||
uint32_t tg_size = size;
|
||||
|
||||
pic_stream_data_ptr_ = p_stream; // Todo: deal with multiple tile group OBUs
|
||||
pic_stream_data_size_ = size;
|
||||
p_tile_group->buffer_ptr = p_stream;
|
||||
p_tile_group->buffer_size = size;
|
||||
if (p_tile_group->tile_group_num == 0) {
|
||||
p_tile_group->buffer_ptr = p_stream;
|
||||
}
|
||||
|
||||
// First parse the header
|
||||
p_tile_group->num_tiles = tile_cols * tile_rows;
|
||||
@@ -1272,7 +1271,12 @@ void Av1VideoParser::ParseTileGroupObu(uint8_t *p_stream, size_t size) {
|
||||
}
|
||||
p_tile_group->num_tiles_parsed++;
|
||||
}
|
||||
p_tile_group->tile_group_num++;
|
||||
if (p_tile_group->tg_end == p_tile_group->num_tiles - 1) {
|
||||
p_tile_group->buffer_size = p_tile_group->tile_data_info[p_tile_group->tg_end].tile_offset + p_tile_group->tile_data_info[p_tile_group->tg_end].tile_size;
|
||||
p_tile_group->tg_start = 0;
|
||||
pic_stream_data_ptr_ = p_tile_group->buffer_ptr;
|
||||
pic_stream_data_size_ = p_tile_group->buffer_size;
|
||||
if (!frame_header_.disable_frame_end_update_cdf) {
|
||||
//frame_end_update_cdf();
|
||||
}
|
||||
|
||||
@@ -63,9 +63,10 @@ public:
|
||||
} Av1TileDataInfo;
|
||||
|
||||
typedef struct {
|
||||
uint8_t *buffer_ptr; // pointer of the current tile group data.
|
||||
uint32_t buffer_size; // total size of the data buffer, may include the header bytes.
|
||||
uint32_t num_tiles;
|
||||
uint8_t *buffer_ptr; // base pointer to all tile data.
|
||||
uint32_t buffer_size; // total size of all tile data, can come from multiple tile group OBUs.
|
||||
uint32_t num_tiles; // total number of tiles in the picture
|
||||
uint32_t tile_group_num; // current tile group number, counting from 0.
|
||||
uint32_t tg_start; // tg_start of the current tile group
|
||||
uint32_t tg_end; // tg_end of the current tile group
|
||||
uint32_t num_tiles_parsed; // number of parsed tiles for the current frame
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user