X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fvideo_output%2Fvout_pictures.h;h=518e6c5cf1fd505508dabff412b26fc656b6311a;hb=a8879770fc2af864fb56c985d2ad0a4b2de14fd2;hp=ce5dc8e9fa5dd287b0c4b6af5640dfa8cad35e9c;hpb=9803dc4610d12f49440b9dca80ac6bb173863956;p=vlc diff --git a/src/video_output/vout_pictures.h b/src/video_output/vout_pictures.h index ce5dc8e9fa..518e6c5cf1 100644 --- a/src/video_output/vout_pictures.h +++ b/src/video_output/vout_pictures.h @@ -1,8 +1,8 @@ /***************************************************************************** * vout_pictures.h : picture management definitions ***************************************************************************** - * Copyright (C) 2002-2004 VideoLAN - * $Id: vout_pictures.h,v 1.6 2004/02/27 14:01:35 fenrir Exp $ + * Copyright (C) 2002-2004 the VideoLAN team + * $Id$ * * Authors: Samuel Hocevar * @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** @@ -44,9 +44,13 @@ /* Packed RGB 32bpp, usually 0x00ff0000, 0x0000ff00, 0x000000ff */ #define FOURCC_RV32 VLC_FOURCC('R','V','3','2') +/* Packed RGBA 32bpp, like RV32 with 0xff000000 used for alpha */ +#define FOURCC_RGBA VLC_FOURCC('R','G','B','A') + /* Planar YUV 4:2:0, Y:U:V */ #define FOURCC_I420 VLC_FOURCC('I','4','2','0') #define FOURCC_IYUV VLC_FOURCC('I','Y','U','V') +#define FOURCC_J420 VLC_FOURCC('J','4','2','0') /* Planar YUV 4:2:0, Y:V:U */ #define FOURCC_YV12 VLC_FOURCC('Y','V','1','2') @@ -84,7 +88,48 @@ /* Planar 4:2:2, Y:U:V */ #define FOURCC_I422 VLC_FOURCC('I','4','2','2') +#define FOURCC_J422 VLC_FOURCC('J','4','2','2') /* Planar 4:4:4, Y:U:V */ #define FOURCC_I444 VLC_FOURCC('I','4','4','4') +#define FOURCC_J444 VLC_FOURCC('J','4','4','4') + +/* Planar 4:4:4:4 Y:U:V:A */ +#define FOURCC_YUVA VLC_FOURCC('Y','U','V','A') + +/* Palettized YUV with palette element Y:U:V:A */ +#define FOURCC_YUVP VLC_FOURCC('Y','U','V','P') + +/* Planar 8-bit grayscale */ +#define FOURCC_GREY VLC_FOURCC('G','R','E','Y') + +/* Alignment of critical dynamic data structure + * + * Not all platforms support memalign so we provide a vlc_memalign wrapper + * void *vlc_memalign( size_t align, size_t size, void **pp_orig ) + * *pp_orig is the pointer that has to be freed afterwards. + */ +static inline +void *vlc_memalign (void **pp, size_t align, size_t size) +{ +#if defined (HAVE_POSIX_MEMALIGN) + return posix_memalign (pp, align, size) ? NULL : *pp; +#elif defined (HAVE_MEMALIGN) + return *pp = memalign (align, size); +#else + unsigned char *ptr; + + if (align < 1) + return NULL; + + align--; + ptr = malloc (size + align); + if (ptr == NULL) + return NULL; + + *pp = ptr; + ptr += align; + return (void *)(((uintptr_t)ptr) & ~align); +#endif +}