[vlc-commits] codec: vt_utils: add P010 support
Thomas Guillem
git at videolan.org
Fri Feb 9 19:46:04 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 9 18:29:19 2018 +0100| [d222f689f1e02f29652c85607c09ceb5c9adecaf] | committer: Thomas Guillem
codec: vt_utils: add P010 support
(cherry picked from commit c5d2a307d8e4c63a2f1d69fe36e10141eb33b1fe)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d222f689f1e02f29652c85607c09ceb5c9adecaf
---
modules/codec/vt_utils.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index f36b11003a..508e2902cf 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -149,7 +149,8 @@ cvpxpic_create_mapped(const video_format_t *fmt, CVPixelBufferRef cvpx,
{
case VLC_CODEC_BGRA:
case VLC_CODEC_UYVY: planes_count = 0; break;
- case VLC_CODEC_NV12: planes_count = 2; break;
+ case VLC_CODEC_NV12:
+ case VLC_CODEC_P010: planes_count = 2; break;
case VLC_CODEC_I420: planes_count = 3; break;
default: return NULL;
}
@@ -199,6 +200,7 @@ cvpxpic_unmap(picture_t *mapped_pic)
{
case VLC_CODEC_UYVY: fmt.i_chroma = VLC_CODEC_CVPX_UYVY; break;
case VLC_CODEC_NV12: fmt.i_chroma = VLC_CODEC_CVPX_NV12; break;
+ case VLC_CODEC_P010: fmt.i_chroma = VLC_CODEC_CVPX_P010; break;
case VLC_CODEC_I420: fmt.i_chroma = VLC_CODEC_CVPX_I420; break;
case VLC_CODEC_BGRA: fmt.i_chroma = VLC_CODEC_CVPX_BGRA; break;
default:
@@ -239,6 +241,9 @@ cvpxpool_create(const video_format_t *fmt, unsigned count)
case VLC_CODEC_CVPX_BGRA:
cvpx_format = kCVPixelFormatType_32BGRA;
break;
+ case VLC_CODEC_CVPX_P010:
+ cvpx_format = kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange;
+ break;
default:
return NULL;
}
More information about the vlc-commits
mailing list