feat(server): tone-mapping (#3512)

* added tonemapping

* check for hdr in transcode policy

* merged video thumbnail and transcoding logic

* updated tests

* removed log

* added dashboard option, updated api

* `out_color_matrix` for sdr video thumbs, cleanup

* updated tests & styling

* refactored tonemapping setting

* fixed tests

* formatting

* added tests

* updated api

* set target npl higher for mobius and reinhard

* convert to nv12 before nvenc

* fix test

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Mert
2023-08-07 16:35:25 -04:00
committed by GitHub
parent 19da705fcb
commit 1d37d8cac0
26 changed files with 549 additions and 89 deletions

View File

@@ -7,7 +7,7 @@ const probeStubDefaultFormat: VideoFormat = {
};
const probeStubDefaultVideoStream: VideoStreamInfo[] = [
{ height: 1080, width: 1920, codecName: 'hevc', codecType: 'video', frameCount: 100, rotation: 0 },
{ height: 1080, width: 1920, codecName: 'hevc', codecType: 'video', frameCount: 100, rotation: 0, isHDR: false },
];
const probeStubDefaultAudioStream: AudioStreamInfo[] = [{ codecName: 'aac', codecType: 'audio' }];
@@ -31,6 +31,7 @@ export const probeStub = {
codecType: 'video',
frameCount: 100,
rotation: 0,
isHDR: false,
},
{
height: 1080,
@@ -39,6 +40,7 @@ export const probeStub = {
codecType: 'video',
frameCount: 99,
rotation: 0,
isHDR: false,
},
],
}),
@@ -52,6 +54,7 @@ export const probeStub = {
codecType: 'video',
frameCount: 100,
rotation: 0,
isHDR: false,
},
],
}),
@@ -65,6 +68,21 @@ export const probeStub = {
codecType: 'video',
frameCount: 100,
rotation: 0,
isHDR: false,
},
],
}),
videoStreamHDR: Object.freeze<VideoInfo>({
...probeStubDefault,
videoStreams: [
{
height: 480,
width: 480,
codecName: 'h264',
codecType: 'video',
frameCount: 100,
rotation: 0,
isHDR: true,
},
],
}),
@@ -78,6 +96,7 @@ export const probeStub = {
codecType: 'video',
frameCount: 100,
rotation: 90,
isHDR: false,
},
],
}),