Skip to content

Commit

Permalink
[GStreamer] Caps negotiation issue in video encoder for I422 formats
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271110

Reviewed by Xabier Rodriguez-Calvar.

The encoder was being configured to convert input buffers to Y422, which is not a valid GStreamer
video format. Use I422 instead.

* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
(webkit_video_encoder_class_init):

Canonical link: https://commits.webkit.org/276261@main
  • Loading branch information
philn committed Mar 18, 2024
1 parent 014919f commit b65e200
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions LayoutTests/platform/glib/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,10 @@ imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any.worker.
imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any.html [ Pass DumpJSConsoleLogInStdErr ]
http/wpt/webcodecs/encoder-task-failing.html [ Pass ]

# H.264 high-4:2:2 encoding is supported in the GStreamer ports, so this test (checking that profile
# is not supported) is expected to fail.
http/wpt/webcodecs/H264-422.html [ Failure ]

fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-canvas-webgl.html [ Pass Failure ]

webkit.org/b/264665 http/wpt/webcodecs/videoFrame-webglCanvasImageSource.html [ Failure ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ static void webkit_video_encoder_class_init(WebKitVideoEncoderClass* klass)
pixelFormat = "Y444";
} else if (g_str_has_prefix(profileString, "high-4:2:2")) {
if (supports10BitsLittleEndian)
pixelFormat = "Y422_10LE";
pixelFormat = "I422_10LE";
else if (supports10BitsBigEndian)
pixelFormat = "Y422_10BE";
pixelFormat = "I422_10BE";
else
pixelFormat = "Y42B";
} else if (g_str_has_prefix(profileString, "high-10")) {
Expand Down Expand Up @@ -915,9 +915,9 @@ static void webkit_video_encoder_class_init(WebKitVideoEncoderClass* klass)
pixelFormat = "Y444";
} else if (isY422) {
if (supports12BitsLittleEndian)
pixelFormat = "Y422_12LE";
pixelFormat = "I422_12LE";
else if (supports12BitsBigEndian)
pixelFormat = "Y422_12BE";
pixelFormat = "I422_12BE";
else
pixelFormat = "Y42B";
}
Expand Down

0 comments on commit b65e200

Please sign in to comment.