AMF icon indicating copy to clipboard operation
AMF copied to clipboard

SimpleEncoder Colors Issues

Open TheElixZammuto opened this issue 3 years ago • 5 comments

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

TheElixZammuto avatar Apr 30 '21 10:04 TheElixZammuto

Could you please share full code for modified sample?

MikhailAMD avatar Apr 30 '21 15:04 MikhailAMD

Hi, The modified sample is available on this GitHub gist

https://gist.github.com/TheElixZammuto/67b763c767a8eea1b9ecbcd553eac1a4

TheElixZammuto avatar Apr 30 '21 18:04 TheElixZammuto

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.

MikhailAMD avatar Apr 30 '21 20:04 MikhailAMD

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!

TheElixZammuto avatar Apr 30 '21 20:04 TheElixZammuto

This should be fixed with the latest driver release (21.6.1)

MikhailAMD avatar Jun 23 '21 22:06 MikhailAMD

Closing as fixed starting in driver release 21.6.1.

rhutsAMD avatar Oct 26 '23 21:10 rhutsAMD