fix(vaapi): use FFmpeg bt2020nc matrix name
ci / rust (pull_request) Canceled after 0s
ci / rust-arm64 (pull_request) Canceled after 0s
ci / web (pull_request) Canceled after 0s
ci / docs-site (pull_request) Canceled after 0s
ci / bench (pull_request) Canceled after 0s
apple / swift (pull_request) Canceled after 0s
apple / screenshots (pull_request) Canceled after 0s
android / android (pull_request) Canceled after 0s
ci / rust (pull_request) Canceled after 0s
ci / rust-arm64 (pull_request) Canceled after 0s
ci / web (pull_request) Canceled after 0s
ci / docs-site (pull_request) Canceled after 0s
ci / bench (pull_request) Canceled after 0s
apple / swift (pull_request) Canceled after 0s
apple / screenshots (pull_request) Canceled after 0s
android / android (pull_request) Canceled after 0s
FFmpeg rejects bt2020 as an out_color_matrix value. Use its canonical bt2020nc name for non-constant-luminance BT.2020, matching the existing AVCOL_SPC_BT2020_NCL encoder VUI. Co-Authored-By: OpenAI Codex <noreply@openai.com>
This commit is contained in:
@@ -157,7 +157,7 @@ struct Vui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 10-bit HDR: BT.2020 primaries + SMPTE-2084 (PQ) transfer, limited range — matches the P010 the
|
/// 10-bit HDR: BT.2020 primaries + SMPTE-2084 (PQ) transfer, limited range — matches the P010 the
|
||||||
/// CSC produces (swscale BT.2020 on the CPU path; `scale_vaapi` pinned to bt2020 on the zero-copy
|
/// CSC produces (swscale BT.2020 on the CPU path; `scale_vaapi` pinned to bt2020nc on the zero-copy
|
||||||
/// path); the client decoder auto-detects PQ from the VUI. SDR: we hand the encoder BT.709
|
/// path); the client decoder auto-detects PQ from the VUI. SDR: we hand the encoder BT.709
|
||||||
/// *limited* NV12 (swscale CSC on the CPU path; `scale_vaapi` pinned to
|
/// *limited* NV12 (swscale CSC on the CPU path; `scale_vaapi` pinned to
|
||||||
/// `out_color_matrix=bt709:out_range=limited` on the zero-copy path, with the full-range RGB input
|
/// `out_color_matrix=bt709:out_range=limited` on the zero-copy path, with the full-range RGB input
|
||||||
@@ -204,7 +204,7 @@ fn async_depth(raw: Option<&str>) -> u32 {
|
|||||||
/// matrix untouched.)
|
/// matrix untouched.)
|
||||||
fn scale_vaapi_args(ten_bit: bool) -> &'static CStr {
|
fn scale_vaapi_args(ten_bit: bool) -> &'static CStr {
|
||||||
if ten_bit {
|
if ten_bit {
|
||||||
c"format=p010:out_color_matrix=bt2020:out_range=limited"
|
c"format=p010:out_color_matrix=bt2020nc:out_range=limited"
|
||||||
} else {
|
} else {
|
||||||
c"format=nv12:out_color_matrix=bt709:out_range=limited"
|
c"format=nv12:out_color_matrix=bt709:out_range=limited"
|
||||||
}
|
}
|
||||||
@@ -1565,7 +1565,7 @@ mod tests {
|
|||||||
let args = scale_vaapi_args(true).to_str().unwrap();
|
let args = scale_vaapi_args(true).to_str().unwrap();
|
||||||
for needle in [
|
for needle in [
|
||||||
"format=p010",
|
"format=p010",
|
||||||
"out_color_matrix=bt2020",
|
"out_color_matrix=bt2020nc",
|
||||||
"out_range=limited",
|
"out_range=limited",
|
||||||
] {
|
] {
|
||||||
assert!(
|
assert!(
|
||||||
|
|||||||
Reference in New Issue
Block a user