Posts by andreabak

    jernej Could it be perhaps possible that the HDMI driver is telling the TV/AVR/monitor that the output is in limited range while it actually is full range therefore ending up with a clipped range as a result. AFAIK at least the TCL TV is able to automatically determine the HDMI input range and use the correct settings accordingly. Still no amount of fiddling with range/brightness/contrast settings is able to recover the lost blacks.

    jernej Here's the outputs from edid-decode /sys/class/drm/card0-HDMI-A-1/edid command.

    First, the monitor on which the image displays correctly:

    Then, the same monitor but connected through a HDMI-to-VGA converter (the image is not correct, blacks 16-above are clipped to pure black, whites 235-below appear correctly):

    Here's the output while connected to the Pioneer AVR:

    And this while connected directly to the TCL TV:

    andreabak Can you make some photo or video what it is and what it should be? I played video you referenced, but with that latest test update, it works same regardless DRM or GPU rendering (both HW decoded) or even completely SW decoded and GPU rendered. I can see flashing bars from 16 to 235. That's on PC monitor.

    You are right indeed. I tried it on another monitor and the color bars 16-235 are correctly displayed flashing. Both with the test release you linked and with the latest update from here libreelec-h3.arm-9.1-devel-20190118214745-4e7ea9e.tar. Also the UI looks brighter too, so it looks like the whole HDMI output is affected, not only video playback.

    In my setup I'm using a TCL TV and a Pioneer AVR, connecting the OrangePi to any of these the resulting image is always wrong. Through the AVR I can't get the 16-235 to show at all, while connected directly to the TV only the 235 downwards are visible (see attached pictures). I've tried all sort of combinations of settings (brightness, contrast, range, gamma, etc.) on all these devices without success. Connecting my laptop the test videos display correctly, and so do they using the latest OE release on the OrangePi.

    That makes me think it might be something related to HDMI/EDID maybe?

    Is there perhaps a way I can quickly alter display/HDMI/driver output settings from ssh to quickly test possible solutions? Could the OpenELEC build help giving information about HDMI output status or something like that?

    andreabak It turns out that color range and color encoding are pretty easy to implement. Can you test following update:

    libreelec-h3.arm-9.1-devel-20190129185238-064c56c.tar

    You can see what encoding & range is used for video, if you run "modetest -M sun4i-drm" command during video playback via ssh. Both properties are set by Kodi to values based on video metadata and AFAIK you can't override them.

    It seems that driver used BT601 full range transformation till now.

    So, I tried the test update and unfortunately the issue remains. Both with movies and test calibration files.

    In particular I'm using test files files from here AVS HD 709 Calibration, with the file 2-APL Clipping.mp4, the bars from 16 upwards and 235 downwards should appear flashing, instead they appear completely black and white respectively. I noticed this happens during playback in fullscreen video mode, but when I hit TAB and there's Kodi's UI overlayed on top I can sort of glimpse the correct bars flashing on the background video. Also, I noticed that setting 16-235 output in Kodi's settings flattens contrast in Kodi's UI (and when there's video playing in background too), but in fullscreen mode it looks like the output range is unaffected (the same black/white range with 0-255 or 16-235 setting).

    Here's the output from the command modetest -M sun4i-drm.

    Display Spoiler

    It appears to be always the same, regardless of what video file is playing (both BT.709 encoded or not). Color encoding and range always are

    Code
    30 COLOR_ENCODING:
            flags: enum
            enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
            value: 0
    31 COLOR_RANGE:
            flags: enum
            enums: YCbCr limited range=0 YCbCr full range=1
            value: 0

    Tell me if there are other things I could try to help debug this issue.


    Edit: On the PC monitor I can get the bars 235 downwards to show, the 16 upwards are still pure black. Again, with latest OE build, same exact TV or monitor settings, just swapping SD card, all files display just fine.

    I guess your box outputs full range, but your tv expect limited range, that's why clipping occurs. Set full hdmi range on your tv, this setting may be called different depends on tv manufacturer, for example samsung called it Hdmi black level > normal / low

    As mentioned in my previous post, this doesn't seem to be the issue. TV settings are correct, and I've tested with a PC monitor as well, setting hdmi input range to limited mode exaggerates contrast even more. Setting 16-235 output mode in kodi settings just makes everything look dull, but blacks and whites are still clipped (now to 16 instead to 0 black level). The GUI is unaffected, as are pictures and thumbnails that display with the correct black/white range. Only video playback has this issue.

    Latest old OpenELEC release from jernej tested with same TV and PC monitor does not have this issue.

    I verified the issue is just with video playback layer. GUI output range is correct, images are correct. In video playback anything below 32 is clipped to pure black, anything above 235 is clipped to pure white.

    Any suggestions?

    I managed to find time to watch some stuff using this release, and I noticed that the contrast is wrong. Blacks and whites are clipped, with dark scenes in particular being almost unwatchable. I figured it has something to do with output range (limited vs. full 0-255), but changing this option in the settings doesn't fix the issue, it just makes everything look dull, with grayish blacks and whites, but still clipped. Also, only video streams seem to be affected, the UI looks fine (even though posters and thumbnails did look over-contrast as well, so I will do further testing on this).

    I tried also changing video settings (brightness and contrast), but these don't work at all when HW scaling is enabled (both EGL mode or Direct To Surface), and with HW scaling disabled I can get decent looking pictures with brightness at 58% and contrast at 42% more or less, but cpu usage is at 100% and I get 10fps maybe, so it's not a feasible solution.

    I checked all TV settings which are fine, and tested with another monitor, the problem still remains.

    From these attempts I feel like it's some wrong output range conversion within OpenGL/GPU stage or something similar.

    Anyone else having a similar issue? I tried looking for answers on kodi's and libreelec forums but all the solutions I found were either not working or not applicable to the hardware.

    I'm using the latest image version and updates on an OrangePI Plus 2E. Latest old OpenELEC images from jernej did not appear to have this issue.