mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
decoder: hevc: sync with the codecparser changes
The Tile Scanning Conversion process (spec 6-3 and 6-4) is implemented in codecparsers now. Remove the duplication from gstvaapidecoder_h265
This commit is contained in:
parent
3b7c0f8bb1
commit
279c49e8f2
1 changed files with 0 additions and 41 deletions
|
@ -1381,47 +1381,6 @@ parse_pps (GstVaapiDecoderH265 * decoder, GstVaapiDecoderUnit * unit)
|
|||
if (result != GST_H265_PARSER_OK)
|
||||
return get_status (result);
|
||||
|
||||
if (pps->tiles_enabled_flag) {
|
||||
guint i;
|
||||
guint PicWidthInCtbsY, PicHeightInCtbsY;
|
||||
|
||||
get_pic_width_height_in_ctbs (pps, &PicWidthInCtbsY, &PicHeightInCtbsY);
|
||||
GST_DEBUG ("PicWidthInCtbsY %d PicHeightInCtbsY %d", PicWidthInCtbsY,
|
||||
PicHeightInCtbsY);
|
||||
|
||||
/* Tile Scanning Conversion 6-3 and 6-4 */
|
||||
if (pps->uniform_spacing_flag) {
|
||||
|
||||
for (i = 0; i <= pps->num_tile_columns_minus1; i++)
|
||||
col_width[i] =
|
||||
((i + 1) * PicWidthInCtbsY) / (pps->num_tile_columns_minus1 + 1) -
|
||||
(i * PicWidthInCtbsY) / (pps->num_tile_columns_minus1 + 1);
|
||||
|
||||
for (i = 0; i <= pps->num_tile_rows_minus1; i++)
|
||||
row_height[i] =
|
||||
((i + 1) * PicHeightInCtbsY) / (pps->num_tile_rows_minus1 + 1) -
|
||||
(i * PicHeightInCtbsY) / (pps->num_tile_rows_minus1 + 1);
|
||||
|
||||
} else {
|
||||
|
||||
col_width[pps->num_tile_columns_minus1] = PicWidthInCtbsY;
|
||||
for (i = 0; i < pps->num_tile_columns_minus1; i++) {
|
||||
col_width[i] = pps->column_width_minus1[i] + 1;
|
||||
col_width[pps->num_tile_columns_minus1] -= col_width[i];
|
||||
}
|
||||
|
||||
row_height[pps->num_tile_rows_minus1] = PicHeightInCtbsY;
|
||||
for (i = 0; i < pps->num_tile_rows_minus1; i++) {
|
||||
row_height[i] = pps->row_height_minus1[i] + 1;
|
||||
row_height[pps->num_tile_rows_minus1] -= row_height[i];
|
||||
}
|
||||
}
|
||||
for (i = 0; i <= pps->num_tile_columns_minus1; i++)
|
||||
pps->column_width_minus1[i] = col_width[i] - 1;
|
||||
for (i = 0; i <= pps->num_tile_rows_minus1; i++)
|
||||
pps->row_height_minus1[i] = row_height[i] - 1;
|
||||
}
|
||||
|
||||
priv->parser_state |= GST_H265_VIDEO_STATE_GOT_PPS;
|
||||
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue