mirror of
https://github.com/immich-app/immich.git
synced 2025-06-20 17:03:14 +02:00
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 #18103
This commit is contained in:
parent
f34f83e164
commit
62c128d1fb
1 changed files with 6 additions and 1 deletions
|
@ -781,7 +781,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…
Add table
Add a link
Reference in a new issue