1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00:00

formatting

This commit is contained in:
mertalev 2024-11-22 01:51:28 -05:00
parent e2188867a6
commit efb4394c7b
No known key found for this signature in database
GPG key ID: CA85EF6600C9E8AD
2 changed files with 7 additions and 7 deletions

View file

@ -2227,9 +2227,7 @@ describe(MediaService.name, () => {
expect.objectContaining({
inputOptions: expect.arrayContaining(['-hwaccel rkmpp', '-hwaccel_output_format drm_prime', '-afbc rga']),
outputOptions: expect.arrayContaining([
expect.stringContaining(
'scale_rkrga=-2:720:format=nv12:afbc=1:async_depth=4',
),
expect.stringContaining('scale_rkrga=-2:720:format=nv12:afbc=1:async_depth=4'),
]),
twoPass: false,
}),

View file

@ -59,8 +59,8 @@ export class BaseConfig implements VideoCodecSWConfig {
}
case TranscodeHWAccel.RKMPP: {
handler = config.accelDecode
? new RkmppHwDecodeConfig(config, devices, hasMaliOpenCL)
: new RkmppSwDecodeConfig(config, devices);
? new RkmppHwDecodeConfig(config, devices, hasMaliOpenCL)
: new RkmppSwDecodeConfig(config, devices);
break;
}
default: {
@ -989,7 +989,8 @@ export class RkmppHwDecodeConfig extends RkmppSwDecodeConfig {
if (this.shouldToneMap(videoStream)) {
const { primaries, transfer, matrix } = this.getColors();
if (this.hasMaliOpenCL) {
return [ // use RKMPP for scaling, OpenCL for tone mapping
return [
// use RKMPP for scaling, OpenCL for tone mapping
`scale_rkrga=${this.getScaling(videoStream)}:format=p010:afbc=1:async_depth=4`,
'hwmap=derive_device=opencl:mode=read',
`tonemap_opencl=format=nv12:r=pc:p=${primaries}:t=${transfer}:m=${matrix}:tonemap=${this.config.tonemap}:desat=0:tonemap_mode=lum:peak=100`,
@ -997,7 +998,8 @@ export class RkmppHwDecodeConfig extends RkmppSwDecodeConfig {
'format=drm_prime',
];
}
return [ // use RKMPP for scaling, CPU for tone mapping (only works on RK3588 which support 10bit output)
return [
// use RKMPP for scaling, CPU for tone mapping (only works on RK3588, which supports 10-bit output)
`scale_rkrga=${this.getScaling(videoStream)}:format=p010:afbc=1:async_depth=4`,
'hwdownload',
'format=p010',