Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add WebCodecs HEVC support
https://bugs.webkit.org/show_bug.cgi?id=259102 rdar://112067287 Reviewed by Eric Carlson. Update H265 RTC encoder to properly handle webcodecs. In particular, we add some nullptr checks, as well as fixing init data in case AVC format is used. We also set low latency mode according what webcodecs gives us. Skipping tests in GLib until it gets implemented. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any.worker_h265_annexb-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any.worker_h265_hevc-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any_h265_annexb-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any_h265_hevc-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h265_annexb-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h265_hevc-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h265_annexb-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h265_hevc-expected.txt: * LayoutTests/platform/glib/TestExpectations: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitEncoder.mm: (-[WK_RTCLocalVideoH264H265Encoder setLowLatency:]): * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH265.mm: (-[RTCVideoDecoderH265 decodeData:size:timeStamp:]): (-[RTCVideoDecoderH265 setAVCFormat:size:width:height:]): * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.h: * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH265.mm: (-[RTCVideoEncoderH265 initWithCodecInfo:]): (-[RTCVideoEncoderH265 setLowLatency:]): (-[RTCVideoEncoderH265 resetCompressionSession]): (-[RTCVideoEncoderH265 configureCompressionSession]): * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::videoCodecTypeFromWebCodec): Canonical link: https://commits.webkit.org/266044@main
- Loading branch information
Showing
15 changed files
with
108 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...3c/web-platform-tests/webcodecs/full-cycle-test.https.any.worker_h265_annexb-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Encoding and decoding cycle promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
FAIL Encoding and decoding cycle w/ stripped color space promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
PASS Encoding and decoding cycle | ||
PASS Encoding and decoding cycle w/ stripped color space | ||
|
4 changes: 2 additions & 2 deletions
4
.../w3c/web-platform-tests/webcodecs/full-cycle-test.https.any.worker_h265_hevc-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Encoding and decoding cycle promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
FAIL Encoding and decoding cycle w/ stripped color space promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
PASS Encoding and decoding cycle | ||
PASS Encoding and decoding cycle w/ stripped color space | ||
|
4 changes: 2 additions & 2 deletions
4
...orted/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any_h265_annexb-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Encoding and decoding cycle promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
FAIL Encoding and decoding cycle w/ stripped color space promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
PASS Encoding and decoding cycle | ||
PASS Encoding and decoding cycle w/ stripped color space | ||
|
4 changes: 2 additions & 2 deletions
4
...mported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any_h265_hevc-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Encoding and decoding cycle promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
FAIL Encoding and decoding cycle w/ stripped color space promise_test: Unhandled rejection with value: object "InvalidStateError: VideoDecoder is not configured" | ||
PASS Encoding and decoding cycle | ||
PASS Encoding and decoding cycle w/ stripped color space | ||
|
36 changes: 18 additions & 18 deletions
36
...orm-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h265_annexb-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
|
||
NOTRUN Test isConfigSupported() hev1.1.6.L60.90 unsupported | ||
NOTRUN Test isConfigSupported() with 1080p crop hev1.1.6.L60.90 unsupported | ||
NOTRUN Test that isConfigSupported() returns a parsed configuration hev1.1.6.L60.90 unsupported | ||
NOTRUN Test invalid configs hev1.1.6.L60.90 unsupported | ||
NOTRUN Test configure() hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode a key frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode a non key frame first fails hev1.1.6.L60.90 unsupported | ||
NOTRUN Verify reset() suppresses outputs hev1.1.6.L60.90 unsupported | ||
NOTRUN Test unconfigured VideoDecoder operations hev1.1.6.L60.90 unsupported | ||
NOTRUN Test closed VideoDecoder operations hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode empty frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode corrupt frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Close while decoding corrupt frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Test decoding after flush hev1.1.6.L60.90 unsupported | ||
NOTRUN Test decoding a with negative timestamp hev1.1.6.L60.90 unsupported | ||
NOTRUN Test reset during flush hev1.1.6.L60.90 unsupported | ||
NOTRUN Test low-latency decoding hev1.1.6.L60.90 unsupported | ||
NOTRUN VideoDecoder decodeQueueSize test hev1.1.6.L60.90 unsupported | ||
PASS Test isConfigSupported() | ||
PASS Test isConfigSupported() with 1080p crop | ||
PASS Test that isConfigSupported() returns a parsed configuration | ||
PASS Test invalid configs | ||
PASS Test configure() | ||
PASS Decode a key frame | ||
PASS Decode a non key frame first fails | ||
PASS Verify reset() suppresses outputs | ||
PASS Test unconfigured VideoDecoder operations | ||
PASS Test closed VideoDecoder operations | ||
PASS Decode empty frame | ||
PASS Decode corrupt frame | ||
PASS Close while decoding corrupt frame | ||
PASS Test decoding after flush | ||
PASS Test decoding a with negative timestamp | ||
PASS Test reset during flush | ||
PASS Test low-latency decoding | ||
PASS VideoDecoder decodeQueueSize test | ||
|
26 changes: 12 additions & 14 deletions
26
...tform-tests/webcodecs/videoDecoder-codec-specific.https.any.worker_h265_hevc-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
PASS Test isConfigSupported() | ||
PASS Test isConfigSupported() with 1080p crop | ||
PASS Test that isConfigSupported() returns a parsed configuration | ||
PASS Test invalid configs | ||
PASS Test configure() | ||
FAIL Decode a key frame promise_test: Unhandled rejection with value: object "EncodingError: Decoder failure" | ||
PASS Decode a key frame | ||
PASS Decode a non key frame first fails | ||
TIMEOUT Verify reset() suppresses outputs Test timed out | ||
NOTRUN Test unconfigured VideoDecoder operations | ||
NOTRUN Test closed VideoDecoder operations | ||
NOTRUN Decode empty frame | ||
NOTRUN Decode corrupt frame | ||
NOTRUN Close while decoding corrupt frame | ||
NOTRUN Test decoding after flush | ||
NOTRUN Test decoding a with negative timestamp | ||
NOTRUN Test reset during flush | ||
NOTRUN Test low-latency decoding | ||
NOTRUN VideoDecoder decodeQueueSize test | ||
PASS Verify reset() suppresses outputs | ||
PASS Test unconfigured VideoDecoder operations | ||
PASS Test closed VideoDecoder operations | ||
PASS Decode empty frame | ||
PASS Decode corrupt frame | ||
PASS Close while decoding corrupt frame | ||
PASS Test decoding after flush | ||
PASS Test decoding a with negative timestamp | ||
PASS Test reset during flush | ||
PASS Test low-latency decoding | ||
PASS VideoDecoder decodeQueueSize test | ||
|
36 changes: 18 additions & 18 deletions
36
...b-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h265_annexb-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
|
||
NOTRUN Test isConfigSupported() hev1.1.6.L60.90 unsupported | ||
NOTRUN Test isConfigSupported() with 1080p crop hev1.1.6.L60.90 unsupported | ||
NOTRUN Test that isConfigSupported() returns a parsed configuration hev1.1.6.L60.90 unsupported | ||
NOTRUN Test invalid configs hev1.1.6.L60.90 unsupported | ||
NOTRUN Test configure() hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode a key frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode a non key frame first fails hev1.1.6.L60.90 unsupported | ||
NOTRUN Verify reset() suppresses outputs hev1.1.6.L60.90 unsupported | ||
NOTRUN Test unconfigured VideoDecoder operations hev1.1.6.L60.90 unsupported | ||
NOTRUN Test closed VideoDecoder operations hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode empty frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Decode corrupt frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Close while decoding corrupt frame hev1.1.6.L60.90 unsupported | ||
NOTRUN Test decoding after flush hev1.1.6.L60.90 unsupported | ||
NOTRUN Test decoding a with negative timestamp hev1.1.6.L60.90 unsupported | ||
NOTRUN Test reset during flush hev1.1.6.L60.90 unsupported | ||
NOTRUN Test low-latency decoding hev1.1.6.L60.90 unsupported | ||
NOTRUN VideoDecoder decodeQueueSize test hev1.1.6.L60.90 unsupported | ||
PASS Test isConfigSupported() | ||
PASS Test isConfigSupported() with 1080p crop | ||
PASS Test that isConfigSupported() returns a parsed configuration | ||
PASS Test invalid configs | ||
PASS Test configure() | ||
PASS Decode a key frame | ||
PASS Decode a non key frame first fails | ||
PASS Verify reset() suppresses outputs | ||
PASS Test unconfigured VideoDecoder operations | ||
PASS Test closed VideoDecoder operations | ||
PASS Decode empty frame | ||
PASS Decode corrupt frame | ||
PASS Close while decoding corrupt frame | ||
PASS Test decoding after flush | ||
PASS Test decoding a with negative timestamp | ||
PASS Test reset during flush | ||
PASS Test low-latency decoding | ||
PASS VideoDecoder decodeQueueSize test | ||
|
26 changes: 12 additions & 14 deletions
26
...web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any_h265_hevc-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
PASS Test isConfigSupported() | ||
PASS Test isConfigSupported() with 1080p crop | ||
PASS Test that isConfigSupported() returns a parsed configuration | ||
PASS Test invalid configs | ||
PASS Test configure() | ||
FAIL Decode a key frame promise_test: Unhandled rejection with value: object "EncodingError: Decoder failure" | ||
PASS Decode a key frame | ||
PASS Decode a non key frame first fails | ||
TIMEOUT Verify reset() suppresses outputs Test timed out | ||
NOTRUN Test unconfigured VideoDecoder operations | ||
NOTRUN Test closed VideoDecoder operations | ||
NOTRUN Decode empty frame | ||
NOTRUN Decode corrupt frame | ||
NOTRUN Close while decoding corrupt frame | ||
NOTRUN Test decoding after flush | ||
NOTRUN Test decoding a with negative timestamp | ||
NOTRUN Test reset during flush | ||
NOTRUN Test low-latency decoding | ||
NOTRUN VideoDecoder decodeQueueSize test | ||
PASS Verify reset() suppresses outputs | ||
PASS Test unconfigured VideoDecoder operations | ||
PASS Test closed VideoDecoder operations | ||
PASS Decode empty frame | ||
PASS Decode corrupt frame | ||
PASS Close while decoding corrupt frame | ||
PASS Test decoding after flush | ||
PASS Test decoding a with negative timestamp | ||
PASS Test reset during flush | ||
PASS Test low-latency decoding | ||
PASS VideoDecoder decodeQueueSize test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters