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.
Unified · Split
| @@ -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 | } |