[webkit-changes] [WebKit/WebKit] a8ddee: ComputeH264ReorderSizeFromSPS should use pic_width...

youennf noreply at github.com
Wed Jan 31 05:47:30 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a8ddee0e8c2e16cd7e5deea6fee5c46161e98301
      https://github.com/WebKit/WebKit/commit/a8ddee0e8c2e16cd7e5deea6fee5c46161e98301
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    A LayoutTests/http/wpt/webcodecs/h264_small-size.any-expected.txt
    A LayoutTests/http/wpt/webcodecs/h264_small-size.any.html
    A LayoutTests/http/wpt/webcodecs/h264_small-size.any.js
    M Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h264/sps_parser.cc
    M Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h264/sps_parser.h
    M Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc

  Log Message:
  -----------
  ComputeH264ReorderSizeFromSPS should use pic_width_in_mbs_minus1 and pic_height_in_map_units_minus1 to compute max_dpb_frames_from_sps
https://bugs.webkit.org/show_bug.cgi?id=268440
rdar://121957799

Reviewed by Jean-Yves Avenard.

Using state.width and state.height for max_dpb_frames_from_sps computation can lead to divide by zero issues since either one can be below 16.
We instead use pic_width_in_mbs_minus1 and pic_height_in_map_units_minus1 to ensure we do not divide by zero.

* LayoutTests/http/wpt/webcodecs/h264_small-size.any-expected.txt: Added.
* LayoutTests/http/wpt/webcodecs/h264_small-size.any.html: Added.
* LayoutTests/http/wpt/webcodecs/h264_small-size.any.js: Added.
(promise_test.async t):
* Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h264/sps_parser.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/common_video/h264/sps_parser.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter.cc:

Canonical link: https://commits.webkit.org/273823@main




More information about the webkit-changes mailing list