Error resilience: Added a few error handling measures. (#581)
* * Error resilience: Added a few error handling measures.
- AV1: Added check flags to sequence header and frame header to indicate if the headers are parsed without errors. The flags are used to check if the parsing process which refers to the headers can proceed or stop.
- AV1: Added divide by 0 check on tile columns in tile group parsing.
- AV1: Added invalid OBU size check in AV1 elementary stream parsing in bitstream reader.
- All codecs: Added divide by 0 check in display aspect ratio calculation.
* * Error resilience: Fixed a typo in an error message.
[ROCm/rocdecode commit: a861d6f1d2]
Tento commit je obsažen v:
@@ -226,8 +226,10 @@ ParserResult Vp9VideoParser::NotifyNewSequence(Vp9UncompressedHeader *p_uncomp_h
|
||||
int disp_width = (video_format_params_.display_area.right - video_format_params_.display_area.left);
|
||||
int disp_height = (video_format_params_.display_area.bottom - video_format_params_.display_area.top);
|
||||
int gcd = std::__gcd(disp_width, disp_height); // greatest common divisor
|
||||
video_format_params_.display_aspect_ratio.x = disp_width / gcd;
|
||||
video_format_params_.display_aspect_ratio.y = disp_height / gcd;
|
||||
if (gcd) {
|
||||
video_format_params_.display_aspect_ratio.x = disp_width / gcd;
|
||||
video_format_params_.display_aspect_ratio.y = disp_height / gcd;
|
||||
}
|
||||
|
||||
video_format_params_.reconfig_options = reconfig_option_;
|
||||
video_format_params_.video_signal_description = {0};
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele