Opened 8 years ago
Closed 7 years ago
#7704 closed defect (fixed)
8-bit pixel format is used when decoding 10-bit video using VideoToolbox
| Reported by: | fumoboy007 | Owned by: | Aman |
|---|---|---|---|
| Priority: | normal | Component: | avcodec |
| Version: | git-master | Keywords: | videotoolbox |
| Cc: | ffmpeg@tmm1.net | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug:
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange is always used regardless of the bit depth of the video.
Attachments (2)
Change History (9)
comment:1 by , 8 years ago
| Keywords: | hwaccel added |
|---|
comment:2 by , 8 years ago
| Keywords: | 10bit hdr hwaccel removed |
|---|
comment:3 by , 8 years ago
by , 8 years ago
| Attachment: | VideoToolbox_10bit.patch added |
|---|
comment:4 by , 8 years ago
| Cc: | added |
|---|---|
| Owner: | set to |
| Status: | new → open |
Could you please submit git-format-patch version of the patch including Author info so we can commit it? There are some patterns used to define missing symbols on older versions of macOS which I can add to make this patch complete.
by , 8 years ago
| Attachment: | 0001-Support-10-bit-color-when-using-VideoToolbox-to-deco.patch added |
|---|
comment:5 by , 8 years ago
Thanks for picking this up! I’ve attached the patch. Let me know if there is anything else you need.
comment:6 by , 8 years ago
Thanks. I forgot to specify that ffmpeg-devel is the preferred place for patches, so they can be more widely reviewed.
As far as macOS compatibility, you can refer to how I added compatibility checks for kCMVideoCodecType_HEVC here:
https://github.com/FFmpeg/FFmpeg/commit/3d4f8b9184a4693c577e0b73496e6cc1989c6bbf#diff-c9d8dd2e290f045e209331df387c0bbaR43
https://github.com/FFmpeg/FFmpeg/commit/3d4f8b9184a4693c577e0b73496e6cc1989c6bbf#diff-e2d5a00791bce9a01f99bc6fd613a39dR2084
https://github.com/FFmpeg/FFmpeg/commit/3d4f8b9184a4693c577e0b73496e6cc1989c6bbf#diff-e2d5a00791bce9a01f99bc6fd613a39dR5822
If you feel so inclined, take a stab at adding compatibility using the approach above and send the new patch to the ffmpeg-devel list. If not, I will plan to pick this up in a few weeks and do the same. Thanks for your contribution!
comment:7 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
Patch applied as 036b4b0f85933f49a7094b5b568a93f68c9cd544



Here is an unfinished patch. It is unfinished because we should probably check at runtime for macOS 10.13+ before using the 10-bit pixel format since that is when it was introduced. I don’t have time in the immediate future to figure out how to check the macOS version at runtime.