fix(transcode): conditionally fix VAAPI filter order for HEVC (tested on Haswel) l
Places 'format=nv12' before 'hwupload' in the VAAPI video filter chain only when the input codec is HEVC and hardware decoding is disabled. This resolves filtergraph/driver issues observed on Intel Haswell GPUs when transcoding HEVC->H.264 VAAPI via software decode, ensuring the encoder receives the expected NV12 surface. Retains default filter logic for other codecs. Addresses issues discussed in GitHub issue #18103pull/18111/head
parent
0f2fe656db
commit
e623fbfa7a
|
|
@ -802,7 +802,12 @@ export class VaapiSwDecodeConfig extends BaseHWConfig {
|
|||
|
||||
getFilterOptions(videoStream: VideoStreamInfo) {
|
||||
const options = this.getToneMapping(videoStream);
|
||||
options.push('hwupload=extra_hw_frames=64');
|
||||
if (videoStream.codecName === VideoCodec.HEVC) {
|
||||
options.push('format=nv12');
|
||||
options.push('hwupload=extra_hw_frames=64');
|
||||
} else {
|
||||
options.push('hwupload=extra_hw_frames=64');
|
||||
}
|
||||
if (this.shouldScale(videoStream)) {
|
||||
options.push(`scale_vaapi=${this.getScaling(videoStream)}:mode=hq:out_range=pc:format=nv12`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue