- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My program creates a hevc on my Intel GPU debian 5.10.0-10.
My installed versions are for libavutil-dev and libavcodec-dev are 7:4.3.6-0. libmfx-dev 22.6.4
The goal is to compress a monochrome image stream for a later image processing. The provided code and example movie show a linear gradient from black (left) to white (right). The video looks as expected, but the bright parts are too bright. The color gradient reaches the maximum at already at ~80%.
When I convert the video to a png file the png is too bright:
ffmpeg -i output_test.h265 -compression_level 3 -pred mixed -vf "format=gray16be" -sws_flags +accurate_rnd+bitexact img/img%04d.png
Aswell the vlc player confirms the saturation (screenshot attached) - but the brightness can be manually adjusted. When adjusting the brightness, the saturated can be removed.
I played around with different setting as shown below - with no effect.
codec_ctx->color_primaries = AVCOL_PRI_BT709;
codec_ctx->color_trc = AVCOL_TRC_BT709;
codec_ctx->color_range = AVCOL_RANGE_JPEG;
codec_ctx->colorspace = AVCOL_SPC_BT709;
...
frame->color_primaries = AVCOL_PRI_BT709;
frame->color_trc = AVCOL_TRC_BT709;
frame->color_range = AVCOL_RANGE_JPEG;
frame->colorspace = AVCOL_SPC_BT709;
I am wondering, what is needed to fix the saturation issue in my video pipeline. (I also have exactly the same issue, when I use the mfx lib.
Are there any presets for hdr/sdr, gamma, brightness?
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page