History

hwdec_dxva2dxgi: don't lie about the image format

The conversion is done to DXGI_FORMAT_B8G8R8X8_UNORM, this was tagged as IMGFMT_RGB0 because vo_gpu didn't understand that B8G8R8X8 needs to be sampled differently. This is fixed now, so we can tag the image with the correct format. Fixes output with dxva2 for gpu-next (after https://github.com/haasn/libplacebo/commit/bbe63109cba2ef5c7e6aea1c47d5f6994b6dc71c) and gpu (after previous commit). Will fail with older libplacebo, but there is no reason to use dxva2 anyway. d3d11va is available on all supported platforms and is bit-exact unlike dxva2 which always does conversion to 8-bit BGR. Also note that libplacebo was broken with all BGR inputs up until recently, and only because it was working the same as vo=gpu, the issue was canceling out.

Kacper Michajłow committed 1 year ago

Commit bd3ff141 parent 4d08d4d1 file · +1 −1Browse files

Unified · Split

video/out/d3d11/hwdec_dxva2dxgi.c+1−1
@@ -162,7 +162,7 @@ static int mapper_init(struct ra_hwdec_mapper *mapper) · 161 unmodified lines
162 ID3D11Device_GetImmediateContext(o->dev11, &p->ctx11);162 ID3D11Device_GetImmediateContext(o->dev11, &p->ctx11);
163 163
164 mapper->dst_params = mapper->src_params;164 mapper->dst_params = mapper->src_params;
165 mapper->dst_params.imgfmt = IMGFMT_RGB0;165 mapper->dst_params.imgfmt = IMGFMT_BGR0;
166 mapper->dst_params.hw_subfmt = 0;166 mapper->dst_params.hw_subfmt = 0;
167 return 0;167 return 0;
168}168}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t