AMF
AMF copied to clipboard
SimpleEncoder Colors Issues
Hi everyone, I modified the SimpleEncoder example to draw three squares with these NV12 Colors:
FillNV12SurfaceWithColor(pColor4, 0, 128, 128);
FillNV12SurfaceWithColor(pColor3, 15, 128, 128);
FillNV12SurfaceWithColor(pColor2, 31, 128, 128);
FillNV12SurfaceWithColor(pColor1, 64, 128, 128);
This should give 3 squares with different colors, but two of these 3 have the same color on screen.
I tried to set AMF_VIDEO_ENCODER_FULL_RANGE_COLOR
to true
,
and both AMF_VIDEO_ENCODER_INPUT_COLOR_PROFILE
and AMF_VIDEO_ENCODER_OUTPUT_COLOR_PROFILE
to AMF_VIDEO_CONVERTER_COLOR_PROFILE_FULL_709
, and while the problem is still present, Full Range Color is detected by MPC
I attached the output of the program for Partial and Full Color Range Below simpleencoder_outputs.zip
My Graphics Card is a Radeon Vega 11 on Ryzen 2400G The driver version is 27.20.15003.5017 Windows 10 version is 20H2
Thank you in advance for the support
Could you please share full code for modified sample?
Hi, The modified sample is available on this GitHub gist
https://gist.github.com/TheElixZammuto/67b763c767a8eea1b9ecbcd553eac1a4
Thanks for source. I assume you are using PlaybackHW sample to check the stream. The stream is good but the problem is AMF CSC handling full range. Once fixed, the player shows proper colors. I will push the fix to driver.
Tried it with PlaybackHW and Media Player Classic, both with the same issue. By the way, thank you for the very fast response, hoping to test this very soon!
This should be fixed with the latest driver release (21.6.1)
Closing as fixed starting in driver release 21.6.1.