mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	
							parent
							
								
									3f44a33eac
								
							
						
					
					
						commit
						69b5eb005f
					
				@ -1496,7 +1496,12 @@ describe(MediaService.name, () => {
 | 
				
			|||||||
        '/original/path.ext',
 | 
					        '/original/path.ext',
 | 
				
			||||||
        'upload/encoded-video/user-id/as/se/asset-id.mp4',
 | 
					        'upload/encoded-video/user-id/as/se/asset-id.mp4',
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          inputOptions: expect.arrayContaining(['-hwaccel qsv', '-async_depth 4', '-threads 1']),
 | 
					          inputOptions: expect.arrayContaining([
 | 
				
			||||||
 | 
					            '-hwaccel qsv',
 | 
				
			||||||
 | 
					            '-hwaccel_output_format qsv',
 | 
				
			||||||
 | 
					            '-async_depth 4',
 | 
				
			||||||
 | 
					            '-threads 1',
 | 
				
			||||||
 | 
					          ]),
 | 
				
			||||||
          outputOptions: expect.arrayContaining([
 | 
					          outputOptions: expect.arrayContaining([
 | 
				
			||||||
            expect.stringContaining('scale_qsv=-1:720:async_depth=4:mode=hq:format=nv12'),
 | 
					            expect.stringContaining('scale_qsv=-1:720:async_depth=4:mode=hq:format=nv12'),
 | 
				
			||||||
          ]),
 | 
					          ]),
 | 
				
			||||||
@ -1519,10 +1524,15 @@ describe(MediaService.name, () => {
 | 
				
			|||||||
        '/original/path.ext',
 | 
					        '/original/path.ext',
 | 
				
			||||||
        'upload/encoded-video/user-id/as/se/asset-id.mp4',
 | 
					        'upload/encoded-video/user-id/as/se/asset-id.mp4',
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          inputOptions: expect.arrayContaining(['-hwaccel qsv', '-async_depth 4', '-threads 1']),
 | 
					          inputOptions: expect.arrayContaining([
 | 
				
			||||||
 | 
					            '-hwaccel qsv',
 | 
				
			||||||
 | 
					            '-hwaccel_output_format qsv',
 | 
				
			||||||
 | 
					            '-async_depth 4',
 | 
				
			||||||
 | 
					            '-threads 1',
 | 
				
			||||||
 | 
					          ]),
 | 
				
			||||||
          outputOptions: expect.arrayContaining([
 | 
					          outputOptions: expect.arrayContaining([
 | 
				
			||||||
            expect.stringContaining(
 | 
					            expect.stringContaining(
 | 
				
			||||||
              'hwmap=derive_device=opencl,tonemap_opencl=desat=0:format=nv12:matrix=bt709:primaries=bt709:range=pc:tonemap=hable:transfer=bt709,hwmap=derive_device=vaapi:reverse=1',
 | 
					              'hwmap=derive_device=opencl,tonemap_opencl=desat=0:format=nv12:matrix=bt709:primaries=bt709:range=pc:tonemap=hable:transfer=bt709,hwmap=derive_device=qsv:reverse=1,format=qsv',
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
          ]),
 | 
					          ]),
 | 
				
			||||||
          twoPass: false,
 | 
					          twoPass: false,
 | 
				
			||||||
 | 
				
			|||||||
@ -649,7 +649,7 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig {
 | 
				
			|||||||
      throw new Error('No QSV device found');
 | 
					      throw new Error('No QSV device found');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const options = ['-hwaccel qsv', '-async_depth 4', '-threads 1'];
 | 
					    const options = ['-hwaccel qsv', '-hwaccel_output_format qsv', '-async_depth 4', '-threads 1'];
 | 
				
			||||||
    const hwDevice = this.getPreferredHardwareDevice();
 | 
					    const hwDevice = this.getPreferredHardwareDevice();
 | 
				
			||||||
    if (hwDevice) {
 | 
					    if (hwDevice) {
 | 
				
			||||||
      options.push(`-qsv_device ${hwDevice}`);
 | 
					      options.push(`-qsv_device ${hwDevice}`);
 | 
				
			||||||
@ -691,7 +691,7 @@ export class QsvHwDecodeConfig extends QsvSwDecodeConfig {
 | 
				
			|||||||
    return [
 | 
					    return [
 | 
				
			||||||
      'hwmap=derive_device=opencl',
 | 
					      'hwmap=derive_device=opencl',
 | 
				
			||||||
      `tonemap_opencl=${tonemapOptions.join(':')}`,
 | 
					      `tonemap_opencl=${tonemapOptions.join(':')}`,
 | 
				
			||||||
      'hwmap=derive_device=vaapi:reverse=1',
 | 
					      'hwmap=derive_device=qsv:reverse=1,format=qsv',
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user