From: Imagination Technologies/TI Date: Mon, 11 Feb 2013 21:41:17 +0000 (+0200) Subject: 1.7.17.867897/4.06.00.03 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe8ffa1cda879630c7b69972bb2067201be78c55;p=sgx.git 1.7.17.867897/4.06.00.03 --- diff --git a/services4/3rdparty/bufferclass_ti/bc_cat.c b/services4/3rdparty/bufferclass_ti/bc_cat.c index 04f5c38..121aad5 100644 --- a/services4/3rdparty/bufferclass_ti/bc_cat.c +++ b/services4/3rdparty/bufferclass_ti/bc_cat.c @@ -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) { diff --git a/services4/3rdparty/bufferclass_ti/bc_cat.h b/services4/3rdparty/bufferclass_ti/bc_cat.h index 0b436ee..7d45649 100644 --- a/services4/3rdparty/bufferclass_ti/bc_cat.h +++ b/services4/3rdparty/bufferclass_ti/bc_cat.h @@ -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*/