Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3066 Discussions

hevc_qsv encoding gives too bright video. Looks like hdr issue.

christoph_fahrni
Beginner
89 Views

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?

0 Kudos
0 Replies
Reply