rockchip-linux/mpp

RK3328: rkvdec: HDR format decoding metadata problem

mcerveny opened this issue · 2 comments

Hello.
There is problems with HDR metadata decodings:

  • problem 1 - colorspace error
## TESTING ENVIRONMENT
## kernel https://github.com/rockchip-linux/kernel.git (commit 50b2d1bb0f6455db61391ef94b813e53bf0d6986)
## + minimum patches from https://github.com/Kwiboo/linux-rockchip.git to get video working
## 	clk: rockchip: fix round rate
## 	phy: rockchip-inno-hdmi-phy: add vesa dmt pixel clocks
## 	rockchip: vop: force skip lines if image too big
##    ...
## mpp/drm from https://launchpad.net/~ayufan/+archive/ubuntu/rock64-ppa
##	mpp 	1.4.0-1ayufan3 or today "git clone" (commit 1c7586932cbdd4bcc30f599f303c4a3a03061201)
##	libdrm 	2.4.89-1ayufan1 
 
# ffmpeg -i "LG Chess 4K Demo.mp4" -c:v copy -an -bsf:v hevc_mp4toannexb 2k60hdr.hevc

### CODE sniplet:
    // compute HDR metadata
    MppFrameColorTransferCharacteristic colorTrc = mpp_frame_get_color_trc(frame);
    MppFrameColorPrimaries colorPri = mpp_frame_get_color_primaries(frame);
    MppFrameColorSpace colorSpc = mpp_frame_get_colorspace(frame);
    printf("COLOR primaries %d transfer %d space %d\n", colorPri, colorTrc, colorSpc);

### OUTPUT for 2k60hdr.hevc:
COLOR primaries 9 transfer 16 space 0

# colorPri(9) = MPP_FRAME_PRI_BT2020 = OK 
# colorTrc(16) = MPP_FRAME_TRC_SMPTEST2084 = OK
# colorSpc(0) = MPP_FRAME_SPC_RGB = ERROR !!! (should be *BT2020*)
  • problem 2 - HDR_HLG not recognized
# ffmpeg -i "LG Cymatic Jazz 4K Demo.ts" -c:v copy -an -bsf:v hevc_mp4toannexb 2k60hdr_hlg.hevc

### OUTPUT for 2k60hdr_hlg.hevc:
COLOR primaries 9 transfer 14 space 0

# colorPri(9) = MPP_FRAME_PRI_BT2020 = OK 
# colorTrc(16) = MPP_FRAME_TRC_BT2020_10 = ERROR (should be MPP_FRAME_TRC_ARIB_STD_B67)
# colorSpc(0) = MPP_FRAME_SPC_RGB = ERROR (should be *BT2020*)

Any explanation or solution that leads to close this issue ?

##linux-rockchip:
21:40 <ayaka> because you post this issue to wrong place
21:41 <ayaka> rockchip mpp has nothing to do with HDR, those are the meta data, should be processed by the other parser
22:18 <ayaka> I am just tired about those unrelated issue report
22:19 <ayaka> I think close is better than leaving them there

Ok. All must run other parser before MPP parser. It is better to delete all function like mpp_frame_get_color_trc(), mpp_frame_get_color_primaries() mpp_frame_get_colorspace() if this functions are unrelated.
I am tired too #6, #8, #10, #13, #14, #15 ... Bye.
I will never send any more issues to rockchip-linux trackers.