CESNET / UltraGrid

UltraGrid low-latency audio and video network transmission system
http://www.ultragrid.cz
Other
489 stars 55 forks source link

--param decoder-use-codec=R12L turns into 8bit with master #290

Closed alatteri closed 1 year ago

alatteri commented 1 year ago

Hello,

I am doing some testing using an HD frame that ramps from RGB 0 to RGB 1023, essentially a Black to White ramp provided to encoder via HD 3G SDI RGB444.

Using the Jan 13th continuous on receiver with --param decoder-use-codec=R12L the ramp is smooth.
But using master, the ramp gets steps like 8 bit. See attach screenshots. The reason I a using the parameter is to force full range as decoder is Detected internal codec: R10k

encoder:

./UltraGrid-481cc66-x86_64.AppImage -t decklink -c libavcodec:encoder=hevc_nvenc --param lavc-rc-buffer-size-factor=0 10.55.118.48
[Decklink capture] Format change detected (display mode, color space - RGB444, 12bit).
[Decklink capture] Detected 12-bit signal, use ":codec=UYVY" to enforce 8-bit capture (old behavior).
[Decklink capture] Using codec: R12L
[DeckLink capture] Enable video input: 1080p24
[lavc] Using codec: H.265, encoder: hevc_nvenc
[lavc] Setting bitrate to 7962.6 kbps.
[lavc] Setting NVENC preset to p4.
[lavc] Selected pixfmt: gbrp16le
[lavc] Selected pixfmt has not 4:2:0 subsampling, which is usually not supported by hw. decoders
[DeckLink capture] 115 frames in 5.00613 seconds = 22.9718 FPS

Screenshot 2023-02-03 at 3 49 55 PM Screenshot 2023-02-03 at 3 51 00 PM Screenshot 2023-02-03 at 3 51 26 PM Screenshot 2023-02-03 at 3 51 58 PM Screenshot 2023-02-03 at 3 52 32 PM

MartinPulec commented 1 year ago

Correct, but even in the previous version this was not much intended behavior - the conversion was missing and out of necessity swscale was used. Currently more options are considered prior to swscale and thus it ends up with different conversion over 8-bit RGB,