Open tonyliangli opened 2 years ago
Seems the metadata is not being copied correctly. Other hardware codecs don't have this issue so I doubt the issue is on the side of mpv or FFmpeg. If you're unlucky the bug might be in mediacodec.
Seems the metadata is not being copied correctly. Other hardware codecs don't have this issue so I doubt the issue is on the side of mpv or FFmpeg. If you're unlucky the bug might be in mediacodec.
Hope it's not related to mediacodec. It's the only HW codec on Android.
AFAIK only hw accelerators(-hwaccels) and sw decoders can parse DoVi metadata into the side_data of AVframes, but mediacodec in ffmpeg is a hw decoder(-decoders), not an accelerator, which may requires extra effort to handle the DoVi side_data.
Important Information
Reproduction steps
I'm using a custom build mpv-android with the latest libplacebo (> 4.192.0) and ffmpeg (>5.0). The build is from the following locations:
https://www.reddit.com/r/AV1/comments/v55ukc/custom_build_the_endgame_is_approaching_leading/ https://github.com/Quackdoc/mpv-android/tree/testvk
I'm using the following config:
vo=gpu-next gpu-api=vulkan vd-lavc-film-grain=gpu
Only when using software decoding the color tone mapping is correct for a DV format file. Once I changed to hardware decoding (mediacodec-copy), the color tone is still incorrect. I'm using a samsung Snapdragon 8 Gen 1 device with no DV license.
Expected behavior
The color tone should be normal same as using software decoding.
Actual behavior
Instead the color is still purple or green.
Log file
Sample files
Any dolby vision format files.