1.7.17.867897/4.06.00.03
authorImagination Technologies/TI <imgtec>
Mon, 11 Feb 2013 21:41:17 +0000 (23:41 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 11 Feb 2013 21:41:17 +0000 (23:41 +0200)
services4/3rdparty/bufferclass_ti/bc_cat.c
services4/3rdparty/bufferclass_ti/bc_cat.h

index 04f5c38..121aad5 100644 (file)
@@ -324,6 +324,15 @@ static int BC_CreateBuffers(int id, bc_buf_params_t *p)
         return -EINVAL;
 
     switch (p->fourcc) {
+    case BC_PIX_FMT_YV12:
+        pixel_fmt = PVRSRV_PIXEL_FORMAT_YV12;
+        stride = p->width;
+        break;
+    case BC_PIX_FMT_I420:
+        pixel_fmt = PVRSRV_PIXEL_FORMAT_I420;
+        stride = p->width;
+        break;
+
     case BC_PIX_FMT_NV12:
         pixel_fmt = PVRSRV_PIXEL_FORMAT_NV12;
         stride = p->width;
@@ -381,6 +390,12 @@ static int BC_CreateBuffers(int id, bc_buf_params_t *p)
     if (pixel_fmt == PVRSRV_PIXEL_FORMAT_NV12)
         ulSize += (stride >> 1) * (p->height >> 1) << 1;
 
+    if ((pixel_fmt == PVRSRV_PIXEL_FORMAT_I420) || (pixel_fmt == PVRSRV_PIXEL_FORMAT_YV12) )
+    {
+        ulSize += (stride >> 1) * (p->height >> 1);
+        ulSize += (stride >> 1) * (p->height >> 1);
+    }
+
     for (i=0; i < p->count; i++) {
         if (psDevInfo->buf_type == BC_MEMORY_MMAP) {
 
index 0b436ee..7d45649 100644 (file)
@@ -33,6 +33,8 @@
 #define BC_FOURCC(a,b,c,d) \
     ((unsigned long) ((a) | (b)<<8 | (c)<<16 | (d)<<24))
 
+#define BC_PIX_FMT_I420     BC_FOURCC('I', '4', '2', '0') /*YUV 4:2:0*/
+#define BC_PIX_FMT_YV12     BC_FOURCC('Y', 'V', '1', '2') /*YUV 4:2:0*/
 #define BC_PIX_FMT_NV12     BC_FOURCC('N', 'V', '1', '2') /*YUV 4:2:0*/
 #define BC_PIX_FMT_UYVY     BC_FOURCC('U', 'Y', 'V', 'Y') /*YUV 4:2:2*/
 #define BC_PIX_FMT_YUYV     BC_FOURCC('Y', 'U', 'Y', 'V') /*YUV 4:2:2*/