vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Fri Feb  9 18:29:19 
2018 +0100| [c5d2a307d8e4c63a2f1d69fe36e10141eb33b1fe] | committer: Thomas 
Guillem

codec: vt_utils: add P010 support

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c5d2a307d8e4c63a2f1d69fe36e10141eb33b1fe
---

 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 42b0bc43dc..d2450111bf 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;
     }

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to