Revert "d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported"

This reverts commit d6bb4ddc63.
Fixes: d6bb4ddc63 ("d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported")

PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE is necessary for some scenarios like the example below
described in https://github.com/microsoft/WSL/issues/11838

gst-launch-1.0 -v videotestsrc num-buffers=250 !
    video/x-raw,width=1920,height=1200 !
    vaapipostproc !
    vaapih264enc !
    filesink location=~/wsl_test.h264

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30548>
(cherry picked from commit a0f1a708c4)
This commit is contained in:
Sil Vilerino 2024-08-07 08:39:58 -04:00 committed by Eric Engestrom
parent 0f15e9ec10
commit 79283b3d7e
3 changed files with 3 additions and 1 deletions

View file

@ -3494,7 +3494,7 @@
"description": "Revert \"d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported\" This reverts commit d6bb4ddc638f3ee37fbbe066c631dad80aaeb2d3. Fixes: d6bb4ddc638 (\"d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported\")",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "d6bb4ddc638f3ee37fbbe066c631dad80aaeb2d3",
"notes": null

View file

@ -1090,6 +1090,7 @@ d3d12_video_encoder_convert_profile_to_d3d12_enc_profile_h264(enum pipe_video_pr
{
switch (profile) {
case PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
{
return D3D12_VIDEO_ENCODER_PROFILE_H264_MAIN;

View file

@ -873,6 +873,7 @@ d3d12_has_video_encode_support(struct pipe_screen *pscreen,
switch (profile) {
#if VIDEO_CODEC_H264ENC
case PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10: