mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Windows: Full library refresh.
git-svn-id: https://svn.eduke32.com/eduke32@4319 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8146f6014c
commit
fd3712ab22
56 changed files with 2704 additions and 2442 deletions
|
@ -166,7 +166,7 @@ ifneq (0,$(LUNATIC))
|
||||||
|
|
||||||
ifneq ($(PLATFORM),WINDOWS)
|
ifneq ($(PLATFORM),WINDOWS)
|
||||||
# On non-Windows, we expect to have liblpeg.a (or a symlink to it) in source/.
|
# On non-Windows, we expect to have liblpeg.a (or a symlink to it) in source/.
|
||||||
# On Windows, it will reside in platform/Windows/lib32 or lib64.
|
# On Windows, it will reside in platform/Windows/lib/32/ or lib/64/.
|
||||||
LIBDIRS+= -L$(OBJ)/..
|
LIBDIRS+= -L$(OBJ)/..
|
||||||
ifeq ($(realpath $(OBJ)/../liblpeg.a),)
|
ifeq ($(realpath $(OBJ)/../liblpeg.a),)
|
||||||
# XXX: This cripples "make clean" etc. too, but IMO it's better than warning.
|
# XXX: This cripples "make clean" etc. too, but IMO it's better than warning.
|
||||||
|
|
|
@ -473,8 +473,14 @@ endif
|
||||||
LUAJIT:=luajit
|
LUAJIT:=luajit
|
||||||
# Options to "luajit -b" for synthesis. Since it runs on Linux, we need to tell
|
# Options to "luajit -b" for synthesis. Since it runs on Linux, we need to tell
|
||||||
# the native LuaJIT to emit PE object files.
|
# the native LuaJIT to emit PE object files.
|
||||||
ifneq ($(SYNTHESIS),0)
|
ifeq ($(PLATFORM),WINDOWS)
|
||||||
LUAJIT_BCOPTS := -o windows -a x86
|
LUAJIT_BCOPTS := -o windows
|
||||||
|
ifeq (32,$(WINBITS))
|
||||||
|
LUAJIT_BCOPTS += -a x86
|
||||||
|
endif
|
||||||
|
ifeq (64,$(WINBITS))
|
||||||
|
LUAJIT_BCOPTS += -a x64
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(LUNATIC),0)
|
ifneq ($(LUNATIC),0)
|
||||||
|
|
|
@ -312,6 +312,7 @@ ifeq ($(PLATFORM),WINDOWS)
|
||||||
ifneq ($(USE_LIBPNG),0)
|
ifneq ($(USE_LIBPNG),0)
|
||||||
BUILDLIBS+= -lpng_mini -lz_mini
|
BUILDLIBS+= -lpng_mini -lz_mini
|
||||||
endif
|
endif
|
||||||
|
BUILDLIBS+= -lcompat-from-mingw-w64
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
ifneq ($(USE_LIBPNG),0)
|
ifneq ($(USE_LIBPNG),0)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.12 - July 11, 2012
|
* libpng version 1.6.8 - December 19, 2013
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
|
@ -22,33 +22,69 @@
|
||||||
#ifndef PNGCONF_H
|
#ifndef PNGCONF_H
|
||||||
#define PNGCONF_H
|
#define PNGCONF_H
|
||||||
|
|
||||||
#ifndef PNG_BUILDING_SYMBOL_TABLE
|
/* To do: Do all of this in scripts/pnglibconf.dfa */
|
||||||
/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
|
#ifdef PNG_SAFE_LIMITS_SUPPORTED
|
||||||
* definition file for machine specific limits, this may impact the
|
# ifdef PNG_USER_WIDTH_MAX
|
||||||
* correctness of the definitions below (see uses of INT_MAX).
|
# undef PNG_USER_WIDTH_MAX
|
||||||
*/
|
# define PNG_USER_WIDTH_MAX 1000000L
|
||||||
# ifndef PNG_NO_LIMITS_H
|
|
||||||
# include <limits.h>
|
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef PNG_USER_HEIGHT_MAX
|
||||||
/* For the memory copy APIs (i.e. the standard definitions of these),
|
# undef PNG_USER_HEIGHT_MAX
|
||||||
* because this file defines png_memcpy and so on the base APIs must
|
# define PNG_USER_HEIGHT_MAX 1000000L
|
||||||
* be defined here.
|
|
||||||
*/
|
|
||||||
# ifdef BSD
|
|
||||||
# include <strings.h>
|
|
||||||
# else
|
|
||||||
# include <string.h>
|
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef PNG_USER_CHUNK_MALLOC_MAX
|
||||||
/* For png_FILE_p - this provides the standard definition of a
|
# undef PNG_USER_CHUNK_MALLOC_MAX
|
||||||
* FILE
|
# define PNG_USER_CHUNK_MALLOC_MAX 4000000L
|
||||||
*/
|
# endif
|
||||||
# ifdef PNG_STDIO_SUPPORTED
|
# ifdef PNG_USER_CHUNK_CACHE_MAX
|
||||||
# include <stdio.h>
|
# undef PNG_USER_CHUNK_CACHE_MAX
|
||||||
|
# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */
|
||||||
|
|
||||||
|
/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C
|
||||||
|
* compiler for correct compilation. The following header files are required by
|
||||||
|
* the standard. If your compiler doesn't provide these header files, or they
|
||||||
|
* do not match the standard, you will need to provide/improve them.
|
||||||
|
*/
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
/* Library header files. These header files are all defined by ISOC90; libpng
|
||||||
|
* expects conformant implementations, however, an ISOC90 conformant system need
|
||||||
|
* not provide these header files if the functionality cannot be implemented.
|
||||||
|
* In this case it will be necessary to disable the relevant parts of libpng in
|
||||||
|
* the build of pnglibconf.h.
|
||||||
|
*
|
||||||
|
* Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not
|
||||||
|
* include this unnecessary header file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef PNG_STDIO_SUPPORTED
|
||||||
|
/* Required for the definition of FILE: */
|
||||||
|
# include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
|
/* Required for the definition of jmp_buf and the declaration of longjmp: */
|
||||||
|
# include <setjmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_CONVERT_tIME_SUPPORTED
|
||||||
|
/* Required for struct tm: */
|
||||||
|
# include <time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* PNG_BUILDING_SYMBOL_TABLE */
|
||||||
|
|
||||||
|
/* Prior to 1.6.0 it was possible to turn off 'const' in declarations using
|
||||||
|
* PNG_NO_CONST; this is no longer supported except for data declarations which
|
||||||
|
* apparently still cause problems in 2011 on some compilers.
|
||||||
|
*/
|
||||||
|
#define PNG_CONST const /* backward compatibility only */
|
||||||
|
|
||||||
/* This controls optimization of the reading of 16 and 32 bit values
|
/* This controls optimization of the reading of 16 and 32 bit values
|
||||||
* from PNG files. It can be set on a per-app-file basis - it
|
* from PNG files. It can be set on a per-app-file basis - it
|
||||||
* just changes whether a macro is used when the function is called.
|
* just changes whether a macro is used when the function is called.
|
||||||
|
@ -72,28 +108,13 @@
|
||||||
* may be changed on a per-file basis when compiling against libpng.
|
* may be changed on a per-file basis when compiling against libpng.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The PNGARG macro protects us against machines that don't have function
|
/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect
|
||||||
* prototypes (ie K&R style headers). If your compiler does not handle
|
* against legacy (pre ISOC90) compilers that did not understand function
|
||||||
* function prototypes, define this macro and use the included ansi2knr.
|
* prototypes. It is not required for modern C compilers.
|
||||||
* I've always been able to use _NO_PROTO as the indicator, but you may
|
|
||||||
* need to drag the empty declaration out in front of here, or change the
|
|
||||||
* ifdef to suit your own needs.
|
|
||||||
*/
|
*/
|
||||||
#ifndef PNGARG
|
#ifndef PNGARG
|
||||||
|
# define PNGARG(arglist) arglist
|
||||||
# ifdef OF /* zlib prototype munger */
|
#endif
|
||||||
# define PNGARG(arglist) OF(arglist)
|
|
||||||
# else
|
|
||||||
|
|
||||||
# ifdef _NO_PROTO
|
|
||||||
# define PNGARG(arglist) ()
|
|
||||||
# else
|
|
||||||
# define PNGARG(arglist) arglist
|
|
||||||
# endif /* _NO_PROTO */
|
|
||||||
|
|
||||||
# endif /* OF */
|
|
||||||
|
|
||||||
#endif /* PNGARG */
|
|
||||||
|
|
||||||
/* Function calling conventions.
|
/* Function calling conventions.
|
||||||
* =============================
|
* =============================
|
||||||
|
@ -177,18 +198,16 @@
|
||||||
* ==========================
|
* ==========================
|
||||||
* This code is used at build time to find PNG_IMPEXP, the API settings
|
* This code is used at build time to find PNG_IMPEXP, the API settings
|
||||||
* and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
|
* and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
|
||||||
* import processing is possible. On Windows/x86 systems it also sets
|
* import processing is possible. On Windows systems it also sets
|
||||||
* compiler-specific macros to the values required to change the calling
|
* compiler-specific macros to the values required to change the calling
|
||||||
* conventions of the various functions.
|
* conventions of the various functions.
|
||||||
*/
|
*/
|
||||||
#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
|
#if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
|
||||||
defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
|
defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||||
( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
|
/* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or
|
||||||
defined(_M_X64) || defined(_M_IA64) )
|
* MinGW on any architecture currently supported by Windows. Also includes
|
||||||
/* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes
|
* Watcom builds but these need special treatment because they are not
|
||||||
* builds under Cygwin or MinGW. Also includes Watcom builds but these need
|
* compatible with GCC or Visual C because of different calling conventions.
|
||||||
* special treatment because they are not compatible with GCC or Visual C
|
|
||||||
* because of different calling conventions.
|
|
||||||
*/
|
*/
|
||||||
# if PNG_API_RULE == 2
|
# if PNG_API_RULE == 2
|
||||||
/* If this line results in an error, either because __watcall is not
|
/* If this line results in an error, either because __watcall is not
|
||||||
|
@ -199,9 +218,12 @@
|
||||||
# define PNGCAPI __watcall
|
# define PNGCAPI __watcall
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
|
# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800))
|
||||||
# define PNGCAPI __cdecl
|
# define PNGCAPI __cdecl
|
||||||
# if PNG_API_RULE == 1
|
# if PNG_API_RULE == 1
|
||||||
|
/* If this line results in an error __stdcall is not understood and
|
||||||
|
* PNG_API_RULE should not have been set to '1'.
|
||||||
|
*/
|
||||||
# define PNGAPI __stdcall
|
# define PNGAPI __stdcall
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
|
@ -216,10 +238,11 @@
|
||||||
# define PNGAPI _stdcall
|
# define PNGAPI _stdcall
|
||||||
# endif
|
# endif
|
||||||
# endif /* compiler/api */
|
# endif /* compiler/api */
|
||||||
|
|
||||||
/* NOTE: PNGCBAPI always defaults to PNGCAPI. */
|
/* NOTE: PNGCBAPI always defaults to PNGCAPI. */
|
||||||
|
|
||||||
# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
|
# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
|
||||||
ERROR: PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed
|
# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if (defined(_MSC_VER) && _MSC_VER < 800) ||\
|
# if (defined(_MSC_VER) && _MSC_VER < 800) ||\
|
||||||
|
@ -239,7 +262,7 @@
|
||||||
# endif
|
# endif
|
||||||
# endif /* compiler */
|
# endif /* compiler */
|
||||||
|
|
||||||
#else /* !Windows/x86 */
|
#else /* !Windows */
|
||||||
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
|
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
|
||||||
# define PNGAPI _System
|
# define PNGAPI _System
|
||||||
# else /* !Windows/x86 && !OS/2 */
|
# else /* !Windows/x86 && !OS/2 */
|
||||||
|
@ -333,9 +356,10 @@
|
||||||
|
|
||||||
#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
|
#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
|
||||||
/* Support for compiler specific function attributes. These are used
|
/* Support for compiler specific function attributes. These are used
|
||||||
* so that where compiler support is available incorrect use of API
|
* so that where compiler support is available, incorrect use of API
|
||||||
* functions in png.h will generate compiler warnings. Added at libpng
|
* functions in png.h will generate compiler warnings. Added at libpng
|
||||||
* version 1.2.41.
|
* version 1.2.41. Disabling these removes the warnings but may also produce
|
||||||
|
* less efficient code.
|
||||||
*/
|
*/
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
# ifndef PNG_USE_RESULT
|
# ifndef PNG_USE_RESULT
|
||||||
|
@ -344,29 +368,35 @@
|
||||||
# ifndef PNG_NORETURN
|
# ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN __attribute__((__noreturn__))
|
# define PNG_NORETURN __attribute__((__noreturn__))
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_ALLOCATED
|
# if __GNUC__ >= 3
|
||||||
# define PNG_ALLOCATED __attribute__((__malloc__))
|
# ifndef PNG_ALLOCATED
|
||||||
# endif
|
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||||
# ifndef PNG_DEPRECATED
|
|
||||||
# define PNG_DEPRECATED __attribute__((__deprecated__))
|
|
||||||
# endif
|
|
||||||
# ifndef PNG_PRIVATE
|
|
||||||
# if 0 /* Doesn't work so we use deprecated instead*/
|
|
||||||
# define PNG_PRIVATE \
|
|
||||||
__attribute__((warning("This function is not exported by libpng.")))
|
|
||||||
# else
|
|
||||||
# define PNG_PRIVATE \
|
|
||||||
__attribute__((__deprecated__))
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# ifndef PNG_DEPRECATED
|
||||||
# endif /* __GNUC__ */
|
# define PNG_DEPRECATED __attribute__((__deprecated__))
|
||||||
|
# endif
|
||||||
|
# ifndef PNG_PRIVATE
|
||||||
|
# if 0 /* Doesn't work so we use deprecated instead*/
|
||||||
|
# define PNG_PRIVATE \
|
||||||
|
__attribute__((warning("This function is not exported by libpng.")))
|
||||||
|
# else
|
||||||
|
# define PNG_PRIVATE \
|
||||||
|
__attribute__((__deprecated__))
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# if ((__GNUC__ != 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
|
||||||
|
# ifndef PNG_RESTRICT
|
||||||
|
# define PNG_RESTRICT __restrict
|
||||||
|
# endif
|
||||||
|
# endif /* __GNUC__ == 3.0 */
|
||||||
|
# endif /* __GNUC__ >= 3 */
|
||||||
|
|
||||||
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||||
# ifndef PNG_USE_RESULT
|
# ifndef PNG_USE_RESULT
|
||||||
# define PNG_USE_RESULT /* not supported */
|
# define PNG_USE_RESULT /* not supported */
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_NORETURN
|
# ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN __declspec(noreturn)
|
# define PNG_NORETURN __declspec(noreturn)
|
||||||
# endif
|
# endif
|
||||||
# ifndef PNG_ALLOCATED
|
# ifndef PNG_ALLOCATED
|
||||||
# if (_MSC_VER >= 1400)
|
# if (_MSC_VER >= 1400)
|
||||||
|
@ -379,6 +409,16 @@
|
||||||
# ifndef PNG_PRIVATE
|
# ifndef PNG_PRIVATE
|
||||||
# define PNG_PRIVATE __declspec(deprecated)
|
# define PNG_PRIVATE __declspec(deprecated)
|
||||||
# endif
|
# endif
|
||||||
|
# ifndef PNG_RESTRICT
|
||||||
|
# if (_MSC_VER >= 1400)
|
||||||
|
# define PNG_RESTRICT __restrict
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# elif defined(__WATCOMC__)
|
||||||
|
# ifndef PNG_RESTRICT
|
||||||
|
# define PNG_RESTRICT __restrict
|
||||||
|
# endif
|
||||||
# endif /* _MSC_VER */
|
# endif /* _MSC_VER */
|
||||||
#endif /* PNG_PEDANTIC_WARNINGS */
|
#endif /* PNG_PEDANTIC_WARNINGS */
|
||||||
|
|
||||||
|
@ -397,10 +437,13 @@
|
||||||
#ifndef PNG_PRIVATE
|
#ifndef PNG_PRIVATE
|
||||||
# define PNG_PRIVATE /* This is a private libpng function */
|
# define PNG_PRIVATE /* This is a private libpng function */
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef PNG_RESTRICT
|
||||||
|
# define PNG_RESTRICT /* The C99 "restrict" feature */
|
||||||
|
#endif
|
||||||
#ifndef PNG_FP_EXPORT /* A floating point API. */
|
#ifndef PNG_FP_EXPORT /* A floating point API. */
|
||||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
# define PNG_FP_EXPORT(ordinal, type, name, args)\
|
||||||
PNG_EXPORT(ordinal, type, name, args)
|
PNG_EXPORT(ordinal, type, name, args);
|
||||||
# else /* No floating point APIs */
|
# else /* No floating point APIs */
|
||||||
# define PNG_FP_EXPORT(ordinal, type, name, args)
|
# define PNG_FP_EXPORT(ordinal, type, name, args)
|
||||||
# endif
|
# endif
|
||||||
|
@ -408,189 +451,167 @@
|
||||||
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
|
||||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
|
||||||
PNG_EXPORT(ordinal, type, name, args)
|
PNG_EXPORT(ordinal, type, name, args);
|
||||||
# else /* No fixed point APIs */
|
# else /* No fixed point APIs */
|
||||||
# define PNG_FIXED_EXPORT(ordinal, type, name, args)
|
# define PNG_FIXED_EXPORT(ordinal, type, name, args)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The following uses const char * instead of char * for error
|
#ifndef PNG_BUILDING_SYMBOL_TABLE
|
||||||
* and warning message functions, so some compilers won't complain.
|
/* Some typedefs to get us started. These should be safe on most of the common
|
||||||
* If you do not want to use const, define PNG_NO_CONST here.
|
* platforms.
|
||||||
*
|
*
|
||||||
* This should not change how the APIs are called, so it can be done
|
* png_uint_32 and png_int_32 may, currently, be larger than required to hold a
|
||||||
* on a per-file basis in the application.
|
* 32-bit value however this is not normally advisable.
|
||||||
|
*
|
||||||
|
* png_uint_16 and png_int_16 should always be two bytes in size - this is
|
||||||
|
* verified at library build time.
|
||||||
|
*
|
||||||
|
* png_byte must always be one byte in size.
|
||||||
|
*
|
||||||
|
* The checks below use constants from limits.h, as defined by the ISOC90
|
||||||
|
* standard.
|
||||||
*/
|
*/
|
||||||
#ifndef PNG_CONST
|
#if CHAR_BIT == 8 && UCHAR_MAX == 255
|
||||||
# ifndef PNG_NO_CONST
|
typedef unsigned char png_byte;
|
||||||
# define PNG_CONST const
|
#else
|
||||||
# else
|
# error "libpng requires 8 bit bytes"
|
||||||
# define PNG_CONST
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some typedefs to get us started. These should be safe on most of the
|
#if INT_MIN == -32768 && INT_MAX == 32767
|
||||||
* common platforms. The typedefs should be at least as large as the
|
typedef int png_int_16;
|
||||||
* numbers suggest (a png_uint_32 must be at least 32 bits long), but they
|
#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
|
||||||
* don't have to be exactly that size. Some compilers dislike passing
|
typedef short png_int_16;
|
||||||
* unsigned shorts as function parameters, so you may be better off using
|
|
||||||
* unsigned int for png_uint_16.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL)
|
|
||||||
typedef unsigned int png_uint_32;
|
|
||||||
typedef int png_int_32;
|
|
||||||
#else
|
#else
|
||||||
typedef unsigned long png_uint_32;
|
# error "libpng requires a signed 16 bit type"
|
||||||
typedef long png_int_32;
|
|
||||||
#endif
|
#endif
|
||||||
typedef unsigned short png_uint_16;
|
|
||||||
typedef short png_int_16;
|
|
||||||
typedef unsigned char png_byte;
|
|
||||||
|
|
||||||
#ifdef PNG_NO_SIZE_T
|
#if UINT_MAX == 65535
|
||||||
typedef unsigned int png_size_t;
|
typedef unsigned int png_uint_16;
|
||||||
|
#elif USHRT_MAX == 65535
|
||||||
|
typedef unsigned short png_uint_16;
|
||||||
#else
|
#else
|
||||||
|
# error "libpng requires an unsigned 16 bit type"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if INT_MIN < -2147483646 && INT_MAX > 2147483646
|
||||||
|
typedef int png_int_32;
|
||||||
|
#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
|
||||||
|
typedef long int png_int_32;
|
||||||
|
#else
|
||||||
|
# error "libpng requires a signed 32 bit (or more) type"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UINT_MAX > 4294967294
|
||||||
|
typedef unsigned int png_uint_32;
|
||||||
|
#elif ULONG_MAX > 4294967294
|
||||||
|
typedef unsigned long int png_uint_32;
|
||||||
|
#else
|
||||||
|
# error "libpng requires an unsigned 32 bit (or more) type"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however,
|
||||||
|
* requires an ISOC90 compiler and relies on consistent behavior of sizeof.
|
||||||
|
*/
|
||||||
typedef size_t png_size_t;
|
typedef size_t png_size_t;
|
||||||
#endif
|
typedef ptrdiff_t png_ptrdiff_t;
|
||||||
#define png_sizeof(x) (sizeof (x))
|
|
||||||
|
|
||||||
/* The following is needed for medium model support. It cannot be in the
|
/* libpng needs to know the maximum value of 'size_t' and this controls the
|
||||||
* pngpriv.h header. Needs modification for other compilers besides
|
* definition of png_alloc_size_t, below. This maximum value of size_t limits
|
||||||
* MSC. Model independent support declares all arrays and pointers to be
|
* but does not control the maximum allocations the library makes - there is
|
||||||
* large using the far keyword. The zlib version used must also support
|
* direct application control of this through png_set_user_limits().
|
||||||
* model independent data. As of version zlib 1.0.4, the necessary changes
|
|
||||||
* have been made in zlib. The USE_FAR_KEYWORD define triggers other
|
|
||||||
* changes that are needed. (Tim Wegner)
|
|
||||||
*/
|
*/
|
||||||
|
#ifndef PNG_SMALL_SIZE_T
|
||||||
/* Separate compiler dependencies (problem here is that zlib.h always
|
/* Compiler specific tests for systems where size_t is known to be less than
|
||||||
* defines FAR. (SJT)
|
* 32 bits (some of these systems may no longer work because of the lack of
|
||||||
*/
|
* 'far' support; see above.)
|
||||||
#ifdef __BORLANDC__
|
*/
|
||||||
# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
|
# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\
|
||||||
# define LDATA 1
|
(defined(_MSC_VER) && defined(MAXSEG_64K))
|
||||||
# else
|
# define PNG_SMALL_SIZE_T
|
||||||
# define LDATA 0
|
|
||||||
# endif
|
|
||||||
/* GRR: why is Cygwin in here? Cygwin is not Borland C... */
|
|
||||||
# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
|
|
||||||
# define PNG_MAX_MALLOC_64K /* only used in build */
|
|
||||||
# if (LDATA != 1)
|
|
||||||
# ifndef FAR
|
|
||||||
# define FAR __far
|
|
||||||
# endif
|
|
||||||
# define USE_FAR_KEYWORD
|
|
||||||
# endif /* LDATA != 1 */
|
|
||||||
/* Possibly useful for moving data out of default segment.
|
|
||||||
* Uncomment it if you want. Could also define FARDATA as
|
|
||||||
* const if your compiler supports it. (SJT)
|
|
||||||
# define FARDATA FAR
|
|
||||||
*/
|
|
||||||
# endif /* __WIN32__, __FLAT__, __CYGWIN__ */
|
|
||||||
#endif /* __BORLANDC__ */
|
|
||||||
|
|
||||||
|
|
||||||
/* Suggest testing for specific compiler first before testing for
|
|
||||||
* FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
|
|
||||||
* making reliance oncertain keywords suspect. (SJT)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* MSC Medium model */
|
|
||||||
#ifdef FAR
|
|
||||||
# ifdef M_I86MM
|
|
||||||
# define USE_FAR_KEYWORD
|
|
||||||
# define FARDATA FAR
|
|
||||||
# include <dos.h>
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* SJT: default case */
|
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no
|
||||||
#ifndef FAR
|
* smaller than png_uint_32. Casts from png_size_t or png_uint_32 to
|
||||||
# define FAR
|
* png_alloc_size_t are not necessary; in fact, it is recommended not to use
|
||||||
|
* them at all so that the compiler can complain when something turns out to be
|
||||||
|
* problematic.
|
||||||
|
*
|
||||||
|
* Casts in the other direction (from png_alloc_size_t to png_size_t or
|
||||||
|
* png_uint_32) should be explicitly applied; however, we do not expect to
|
||||||
|
* encounter practical situations that require such conversions.
|
||||||
|
*
|
||||||
|
* PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than
|
||||||
|
* 4294967295 - i.e. less than the maximum value of png_uint_32.
|
||||||
|
*/
|
||||||
|
#ifdef PNG_SMALL_SIZE_T
|
||||||
|
typedef png_uint_32 png_alloc_size_t;
|
||||||
|
#else
|
||||||
|
typedef png_size_t png_alloc_size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* At this point FAR is always defined */
|
/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
|
||||||
#ifndef FARDATA
|
* implementations of Intel CPU specific support of user-mode segmented address
|
||||||
# define FARDATA
|
* spaces, where 16-bit pointers address more than 65536 bytes of memory using
|
||||||
#endif
|
* separate 'segment' registers. The implementation requires two different
|
||||||
|
* types of pointer (only one of which includes the segment value.)
|
||||||
|
*
|
||||||
|
* If required this support is available in version 1.2 of libpng and may be
|
||||||
|
* available in versions through 1.5, although the correctness of the code has
|
||||||
|
* not been verified recently.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Typedef for floating-point numbers that are converted
|
/* Typedef for floating-point numbers that are converted to fixed-point with a
|
||||||
* to fixed-point with a multiple of 100,000, e.g., gamma
|
* multiple of 100,000, e.g., gamma
|
||||||
*/
|
*/
|
||||||
typedef png_int_32 png_fixed_point;
|
typedef png_int_32 png_fixed_point;
|
||||||
|
|
||||||
/* Add typedefs for pointers */
|
/* Add typedefs for pointers */
|
||||||
typedef void FAR * png_voidp;
|
typedef void * png_voidp;
|
||||||
typedef PNG_CONST void FAR * png_const_voidp;
|
typedef const void * png_const_voidp;
|
||||||
typedef png_byte FAR * png_bytep;
|
typedef png_byte * png_bytep;
|
||||||
typedef PNG_CONST png_byte FAR * png_const_bytep;
|
typedef const png_byte * png_const_bytep;
|
||||||
typedef png_uint_32 FAR * png_uint_32p;
|
typedef png_uint_32 * png_uint_32p;
|
||||||
typedef PNG_CONST png_uint_32 FAR * png_const_uint_32p;
|
typedef const png_uint_32 * png_const_uint_32p;
|
||||||
typedef png_int_32 FAR * png_int_32p;
|
typedef png_int_32 * png_int_32p;
|
||||||
typedef PNG_CONST png_int_32 FAR * png_const_int_32p;
|
typedef const png_int_32 * png_const_int_32p;
|
||||||
typedef png_uint_16 FAR * png_uint_16p;
|
typedef png_uint_16 * png_uint_16p;
|
||||||
typedef PNG_CONST png_uint_16 FAR * png_const_uint_16p;
|
typedef const png_uint_16 * png_const_uint_16p;
|
||||||
typedef png_int_16 FAR * png_int_16p;
|
typedef png_int_16 * png_int_16p;
|
||||||
typedef PNG_CONST png_int_16 FAR * png_const_int_16p;
|
typedef const png_int_16 * png_const_int_16p;
|
||||||
typedef char FAR * png_charp;
|
typedef char * png_charp;
|
||||||
typedef PNG_CONST char FAR * png_const_charp;
|
typedef const char * png_const_charp;
|
||||||
typedef png_fixed_point FAR * png_fixed_point_p;
|
typedef png_fixed_point * png_fixed_point_p;
|
||||||
typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p;
|
typedef const png_fixed_point * png_const_fixed_point_p;
|
||||||
typedef png_size_t FAR * png_size_tp;
|
typedef png_size_t * png_size_tp;
|
||||||
typedef PNG_CONST png_size_t FAR * png_const_size_tp;
|
typedef const png_size_t * png_const_size_tp;
|
||||||
|
|
||||||
#ifdef PNG_STDIO_SUPPORTED
|
#ifdef PNG_STDIO_SUPPORTED
|
||||||
typedef FILE * png_FILE_p;
|
typedef FILE * png_FILE_p;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
typedef double FAR * png_doublep;
|
typedef double * png_doublep;
|
||||||
typedef PNG_CONST double FAR * png_const_doublep;
|
typedef const double * png_const_doublep;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Pointers to pointers; i.e. arrays */
|
/* Pointers to pointers; i.e. arrays */
|
||||||
typedef png_byte FAR * FAR * png_bytepp;
|
typedef png_byte * * png_bytepp;
|
||||||
typedef png_uint_32 FAR * FAR * png_uint_32pp;
|
typedef png_uint_32 * * png_uint_32pp;
|
||||||
typedef png_int_32 FAR * FAR * png_int_32pp;
|
typedef png_int_32 * * png_int_32pp;
|
||||||
typedef png_uint_16 FAR * FAR * png_uint_16pp;
|
typedef png_uint_16 * * png_uint_16pp;
|
||||||
typedef png_int_16 FAR * FAR * png_int_16pp;
|
typedef png_int_16 * * png_int_16pp;
|
||||||
typedef PNG_CONST char FAR * FAR * png_const_charpp;
|
typedef const char * * png_const_charpp;
|
||||||
typedef char FAR * FAR * png_charpp;
|
typedef char * * png_charpp;
|
||||||
typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
|
typedef png_fixed_point * * png_fixed_point_pp;
|
||||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
typedef double FAR * FAR * png_doublepp;
|
typedef double * * png_doublepp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Pointers to pointers to pointers; i.e., pointer to array */
|
/* Pointers to pointers to pointers; i.e., pointer to array */
|
||||||
typedef char FAR * FAR * FAR * png_charppp;
|
typedef char * * * png_charppp;
|
||||||
|
|
||||||
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t,
|
#endif /* PNG_BUILDING_SYMBOL_TABLE */
|
||||||
* and no smaller than png_uint_32. Casts from png_size_t or png_uint_32
|
|
||||||
* to png_alloc_size_t are not necessary; in fact, it is recommended
|
|
||||||
* not to use them at all so that the compiler can complain when something
|
|
||||||
* turns out to be problematic.
|
|
||||||
* Casts in the other direction (from png_alloc_size_t to png_size_t or
|
|
||||||
* png_uint_32) should be explicitly applied; however, we do not expect
|
|
||||||
* to encounter practical situations that require such conversions.
|
|
||||||
*/
|
|
||||||
#if defined(__TURBOC__) && !defined(__FLAT__)
|
|
||||||
typedef unsigned long png_alloc_size_t;
|
|
||||||
#else
|
|
||||||
# if defined(_MSC_VER) && defined(MAXSEG_64K)
|
|
||||||
typedef unsigned long png_alloc_size_t;
|
|
||||||
# else
|
|
||||||
/* This is an attempt to detect an old Windows system where (int) is
|
|
||||||
* actually 16 bits, in that case png_malloc must have an argument with a
|
|
||||||
* bigger size to accomodate the requirements of the library.
|
|
||||||
*/
|
|
||||||
# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
|
|
||||||
(!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
|
|
||||||
typedef DWORD png_alloc_size_t;
|
|
||||||
# else
|
|
||||||
typedef png_size_t png_alloc_size_t;
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* PNGCONF_H */
|
#endif /* PNGCONF_H */
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* libpng version 1.5.12 - July 11, 2012 */
|
/* libpng version 1.6.8 - December 19, 2013 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
/* This code is released under the libpng license. */
|
/* This code is released under the libpng license. */
|
||||||
/* For conditions of distribution and use, see the disclaimer */
|
/* For conditions of distribution and use, see the disclaimer */
|
||||||
|
@ -13,168 +13,197 @@
|
||||||
/* Derived from: scripts/pnglibconf.dfa */
|
/* Derived from: scripts/pnglibconf.dfa */
|
||||||
#ifndef PNGLCONF_H
|
#ifndef PNGLCONF_H
|
||||||
#define PNGLCONF_H
|
#define PNGLCONF_H
|
||||||
/* settings */
|
|
||||||
#define PNG_MAX_GAMMA_8 11
|
|
||||||
#define PNG_CALLOC_SUPPORTED
|
|
||||||
#define PNG_QUANTIZE_RED_BITS 5
|
|
||||||
#define PNG_QUANTIZE_GREEN_BITS 5
|
|
||||||
#define PNG_API_RULE 0
|
|
||||||
#define PNG_QUANTIZE_BLUE_BITS 5
|
|
||||||
#define PNG_sCAL_PRECISION 5
|
|
||||||
#define PNG_COST_SHIFT 3
|
|
||||||
#define PNG_WEIGHT_SHIFT 8
|
|
||||||
#define PNG_DEFAULT_READ_MACROS 1
|
|
||||||
#define PNG_ZBUF_SIZE 8192
|
|
||||||
#define PNG_GAMMA_THRESHOLD_FIXED 5000
|
|
||||||
/* end of settings */
|
|
||||||
/* options */
|
/* options */
|
||||||
#define PNG_INFO_IMAGE_SUPPORTED 1
|
/*#undef PNG_16BIT_SUPPORTED*/
|
||||||
/*#undef PNG_HANDLE_AS_UNKNOWN_SUPPORTED*/
|
/*#undef PNG_ALIGNED_MEMORY_SUPPORTED*/
|
||||||
/*#undef PNG_POINTER_INDEXING_SUPPORTED*/
|
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
|
||||||
/*#undef PNG_WARNINGS_SUPPORTED*/
|
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
|
||||||
/*#undef PNG_FLOATING_ARITHMETIC_SUPPORTED*/
|
/*#undef PNG_BENIGN_ERRORS_SUPPORTED*/
|
||||||
#define PNG_WRITE_SUPPORTED 1
|
/*#undef PNG_BENIGN_READ_ERRORS_SUPPORTED*/
|
||||||
/*#undef PNG_WRITE_INTERLACING_SUPPORTED*/
|
/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
|
||||||
/*#undef PNG_WRITE_16BIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_EASY_ACCESS_SUPPORTED*/
|
|
||||||
/*#undef PNG_ALIGN_MEMORY_SUPPORTED*/
|
|
||||||
/*#undef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED*/
|
|
||||||
/*#undef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED*/
|
/*#undef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED*/
|
||||||
#define PNG_FIXED_POINT_SUPPORTED 1
|
/*#undef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
|
||||||
|
/*#undef PNG_COLORSPACE_SUPPORTED*/
|
||||||
|
/*#undef PNG_CONSOLE_IO_SUPPORTED*/
|
||||||
|
/*#undef PNG_CONVERT_tIME_SUPPORTED*/
|
||||||
|
/*#undef PNG_EASY_ACCESS_SUPPORTED*/
|
||||||
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
|
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
|
||||||
/*#undef PNG_ERROR_TEXT_SUPPORTED*/
|
/*#undef PNG_ERROR_TEXT_SUPPORTED*/
|
||||||
/*#undef PNG_READ_SUPPORTED*/
|
#define PNG_FIXED_POINT_SUPPORTED
|
||||||
/*#undef PNG_BENIGN_ERRORS_SUPPORTED*/
|
/*#undef PNG_FLOATING_ARITHMETIC_SUPPORTED*/
|
||||||
#define PNG_SETJMP_SUPPORTED 1
|
|
||||||
/*#undef PNG_TIME_RFC1123_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_FLUSH_SUPPORTED*/
|
|
||||||
/*#undef PNG_MNG_FEATURES_SUPPORTED*/
|
|
||||||
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
|
||||||
/*#undef PNG_FLOATING_POINT_SUPPORTED*/
|
/*#undef PNG_FLOATING_POINT_SUPPORTED*/
|
||||||
/*#undef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED*/
|
/*#undef PNG_FORMAT_AFIRST_SUPPORTED*/
|
||||||
|
/*#undef PNG_FORMAT_BGR_SUPPORTED*/
|
||||||
|
/*#undef PNG_GAMMA_SUPPORTED*/
|
||||||
|
/*#undef PNG_GET_PALETTE_MAX_SUPPORTED*/
|
||||||
|
/*#undef PNG_HANDLE_AS_UNKNOWN_SUPPORTED*/
|
||||||
/*#undef PNG_INCH_CONVERSIONS_SUPPORTED*/
|
/*#undef PNG_INCH_CONVERSIONS_SUPPORTED*/
|
||||||
#define PNG_STDIO_SUPPORTED 1
|
#define PNG_INFO_IMAGE_SUPPORTED
|
||||||
/*#undef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED*/
|
|
||||||
#define PNG_USER_MEM_SUPPORTED 1
|
|
||||||
/*#undef PNG_IO_STATE_SUPPORTED*/
|
/*#undef PNG_IO_STATE_SUPPORTED*/
|
||||||
/*#undef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED*/
|
/*#undef PNG_MNG_FEATURES_SUPPORTED*/
|
||||||
#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED 1
|
/*#undef PNG_POINTER_INDEXING_SUPPORTED*/
|
||||||
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED 1
|
|
||||||
/*#undef PNG_WRITE_FILTER_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_zTXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_iCCP_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_TRANSFORMS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_bKGD_SUPPORTED*/
|
|
||||||
/*#undef PNG_UNKNOWN_CHUNKS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_sCAL_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_hIST_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_OPT_PLTE_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_gAMA_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_GRAY_TO_RGB_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_pCAL_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_INVERT_ALPHA_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_TRANSFORMS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_ALPHA_MODE_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_sBIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_PACK_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_iTXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_SWAP_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_cHRM_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_STRIP_16_TO_8_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_tIME_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_INTERLACING_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_tRNS_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_pHYs_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_INVERT_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_RGB_TO_GRAY_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_sRGB_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_oFFs_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_FILLER_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_SHIFT_SUPPORTED*/
|
|
||||||
/*#undef PNG_PROGRESSIVE_READ_SUPPORTED*/
|
/*#undef PNG_PROGRESSIVE_READ_SUPPORTED*/
|
||||||
/*#undef PNG_READ_SHIFT_SUPPORTED*/
|
|
||||||
/*#undef PNG_CONVERT_tIME_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_USER_TRANSFORM_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_INT_FUNCTIONS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_USER_CHUNKS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_hIST_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_16BIT_SUPPORTED*/
|
/*#undef PNG_READ_16BIT_SUPPORTED*/
|
||||||
/*#undef PNG_READ_SWAP_ALPHA_SUPPORTED*/
|
/*#undef PNG_READ_ALPHA_MODE_SUPPORTED*/
|
||||||
/*#undef PNG_READ_COMPOSITE_NODIV_SUPPORTED*/
|
/*#undef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED*/
|
||||||
/*#undef PNG_SEQUENTIAL_READ_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_BACKGROUND_SUPPORTED*/
|
/*#undef PNG_READ_BACKGROUND_SUPPORTED*/
|
||||||
/*#undef PNG_READ_QUANTIZE_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_zTXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_USER_LIMITS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_iCCP_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_STRIP_ALPHA_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_PACKSWAP_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_sRGB_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_pCAL_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_sPLT_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_iTXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_SWAP_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_tIME_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_pHYs_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_SWAP_ALPHA_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_SCALE_16_TO_8_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_BGR_SUPPORTED*/
|
|
||||||
/*#undef PNG_USER_CHUNKS_SUPPORTED*/
|
|
||||||
/*#undef PNG_CONSOLE_IO_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_PACK_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_FILLER_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_bKGD_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_tRNS_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_sPLT_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_sCAL_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_oFFs_SUPPORTED*/
|
|
||||||
/*#undef PNG_SET_USER_LIMITS_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_sBIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_INVERT_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_cHRM_SUPPORTED*/
|
|
||||||
/*#undef PNG_16BIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_USER_TRANSFORM_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_BGR_SUPPORTED*/
|
/*#undef PNG_READ_BGR_SUPPORTED*/
|
||||||
/*#undef PNG_WRITE_PACKSWAP_SUPPORTED*/
|
/*#undef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
|
||||||
/*#undef PNG_WRITE_INVERT_ALPHA_SUPPORTED*/
|
/*#undef PNG_READ_COMPOSITE_NODIV_SUPPORTED*/
|
||||||
/*#undef PNG_sCAL_SUPPORTED*/
|
|
||||||
/*#undef PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_GAMMA_SUPPORTED*/
|
|
||||||
/*#undef PNG_USER_TRANSFORM_INFO_SUPPORTED*/
|
|
||||||
/*#undef PNG_sBIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED*/
|
|
||||||
/*#undef PNG_cHRM_SUPPORTED*/
|
|
||||||
/*#undef PNG_bKGD_SUPPORTED*/
|
|
||||||
/*#undef PNG_tRNS_SUPPORTED*/
|
|
||||||
/*#undef PNG_oFFs_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_EXPAND_16_SUPPORTED*/
|
|
||||||
/*#undef PNG_USER_TRANSFORM_PTR_SUPPORTED*/
|
|
||||||
#define PNG_WRITE_TEXT_SUPPORTED 1
|
|
||||||
/*#undef PNG_READ_COMPRESSED_TEXT_SUPPORTED*/
|
/*#undef PNG_READ_COMPRESSED_TEXT_SUPPORTED*/
|
||||||
/*#undef PNG_hIST_SUPPORTED*/
|
/*#undef PNG_READ_EXPAND_16_SUPPORTED*/
|
||||||
/*#undef PNG_zTXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_iCCP_SUPPORTED*/
|
|
||||||
/*#undef PNG_sRGB_SUPPORTED*/
|
|
||||||
/*#undef PNG_pCAL_SUPPORTED*/
|
|
||||||
/*#undef PNG_WRITE_tEXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_CHECK_cHRM_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_gAMA_SUPPORTED*/
|
|
||||||
/*#undef PNG_iTXt_SUPPORTED*/
|
|
||||||
/*#undef PNG_tIME_SUPPORTED*/
|
|
||||||
/*#undef PNG_READ_EXPAND_SUPPORTED*/
|
/*#undef PNG_READ_EXPAND_SUPPORTED*/
|
||||||
/*#undef PNG_pHYs_SUPPORTED*/
|
/*#undef PNG_READ_FILLER_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_GAMMA_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_GET_PALETTE_MAX_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_GRAY_TO_RGB_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_INTERLACING_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_INT_FUNCTIONS_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_INVERT_ALPHA_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_INVERT_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_OPT_PLTE_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_PACKSWAP_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_PACK_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_QUANTIZE_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_RGB_TO_GRAY_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_SCALE_16_TO_8_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_SHIFT_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_STRIP_16_TO_8_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_STRIP_ALPHA_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_SWAP_ALPHA_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_SWAP_SUPPORTED*/
|
||||||
/*#undef PNG_READ_TEXT_SUPPORTED*/
|
/*#undef PNG_READ_TEXT_SUPPORTED*/
|
||||||
/*#undef PNG_SAVE_INT_32_SUPPORTED*/
|
/*#undef PNG_READ_TRANSFORMS_SUPPORTED*/
|
||||||
/*#undef PNG_sPLT_SUPPORTED*/
|
/*#undef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_USER_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_USER_TRANSFORM_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_bKGD_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_cHRM_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_gAMA_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_hIST_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_iCCP_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_iTXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_oFFs_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_pCAL_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_pHYs_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_sBIT_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_sCAL_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_sPLT_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_sRGB_SUPPORTED*/
|
||||||
/*#undef PNG_READ_tEXt_SUPPORTED*/
|
/*#undef PNG_READ_tEXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_tIME_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_tRNS_SUPPORTED*/
|
||||||
|
/*#undef PNG_READ_zTXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
||||||
|
/*#undef PNG_SAVE_INT_32_SUPPORTED*/
|
||||||
|
/*#undef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_SEQUENTIAL_READ_SUPPORTED*/
|
||||||
|
#define PNG_SETJMP_SUPPORTED
|
||||||
|
/*#undef PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED*/
|
||||||
|
/*#undef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED*/
|
||||||
|
/*#undef PNG_SET_OPTION_SUPPORTED*/
|
||||||
|
/*#undef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_SET_USER_LIMITS_SUPPORTED*/
|
||||||
|
/*#undef PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED*/
|
||||||
|
/*#undef PNG_SIMPLIFIED_READ_BGR_SUPPORTED*/
|
||||||
|
/*#undef PNG_SIMPLIFIED_READ_SUPPORTED*/
|
||||||
|
/*#undef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED*/
|
||||||
|
/*#undef PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED*/
|
||||||
|
/*#undef PNG_SIMPLIFIED_WRITE_SUPPORTED*/
|
||||||
|
#define PNG_STDIO_SUPPORTED
|
||||||
|
/*#undef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED*/
|
||||||
|
#define PNG_TEXT_SUPPORTED
|
||||||
|
/*#undef PNG_TIME_RFC1123_SUPPORTED*/
|
||||||
|
/*#undef PNG_UNKNOWN_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_USER_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_USER_LIMITS_SUPPORTED*/
|
||||||
|
#define PNG_USER_MEM_SUPPORTED
|
||||||
|
/*#undef PNG_USER_TRANSFORM_INFO_SUPPORTED*/
|
||||||
|
/*#undef PNG_USER_TRANSFORM_PTR_SUPPORTED*/
|
||||||
|
/*#undef PNG_WARNINGS_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_16BIT_SUPPORTED*/
|
||||||
|
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||||
|
/*#undef PNG_WRITE_BGR_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_FILLER_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_FILTER_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_FLUSH_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_GET_PALETTE_MAX_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_INTERLACING_SUPPORTED*/
|
||||||
|
#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
|
||||||
|
/*#undef PNG_WRITE_INVERT_ALPHA_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_INVERT_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_PACKSWAP_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_PACK_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_SHIFT_SUPPORTED*/
|
||||||
|
#define PNG_WRITE_SUPPORTED
|
||||||
|
/*#undef PNG_WRITE_SWAP_ALPHA_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_SWAP_SUPPORTED*/
|
||||||
|
#define PNG_WRITE_TEXT_SUPPORTED
|
||||||
|
/*#undef PNG_WRITE_TRANSFORMS_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_USER_TRANSFORM_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_bKGD_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_cHRM_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_gAMA_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_hIST_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_iCCP_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_iTXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_oFFs_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_pCAL_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_pHYs_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_sBIT_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_sCAL_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_sPLT_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_sRGB_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_tEXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_tIME_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_tRNS_SUPPORTED*/
|
||||||
|
/*#undef PNG_WRITE_zTXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_bKGD_SUPPORTED*/
|
||||||
|
/*#undef PNG_cHRM_SUPPORTED*/
|
||||||
/*#undef PNG_gAMA_SUPPORTED*/
|
/*#undef PNG_gAMA_SUPPORTED*/
|
||||||
#define PNG_TEXT_SUPPORTED 1
|
/*#undef PNG_hIST_SUPPORTED*/
|
||||||
|
/*#undef PNG_iCCP_SUPPORTED*/
|
||||||
|
/*#undef PNG_iTXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_oFFs_SUPPORTED*/
|
||||||
|
/*#undef PNG_pCAL_SUPPORTED*/
|
||||||
|
/*#undef PNG_pHYs_SUPPORTED*/
|
||||||
|
/*#undef PNG_sBIT_SUPPORTED*/
|
||||||
|
/*#undef PNG_sCAL_SUPPORTED*/
|
||||||
|
/*#undef PNG_sPLT_SUPPORTED*/
|
||||||
|
/*#undef PNG_sRGB_SUPPORTED*/
|
||||||
/*#undef PNG_tEXt_SUPPORTED*/
|
/*#undef PNG_tEXt_SUPPORTED*/
|
||||||
|
/*#undef PNG_tIME_SUPPORTED*/
|
||||||
|
/*#undef PNG_tRNS_SUPPORTED*/
|
||||||
|
/*#undef PNG_zTXt_SUPPORTED*/
|
||||||
/* end of options */
|
/* end of options */
|
||||||
|
/* settings */
|
||||||
|
#define PNG_API_RULE 0
|
||||||
|
#define PNG_CALLOC_SUPPORTED
|
||||||
|
#define PNG_COST_SHIFT 3
|
||||||
|
#define PNG_DEFAULT_READ_MACROS 1
|
||||||
|
#define PNG_GAMMA_THRESHOLD_FIXED 5000
|
||||||
|
#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
|
||||||
|
#define PNG_INFLATE_BUF_SIZE 1024
|
||||||
|
#define PNG_MAX_GAMMA_8 11
|
||||||
|
#define PNG_QUANTIZE_BLUE_BITS 5
|
||||||
|
#define PNG_QUANTIZE_GREEN_BITS 5
|
||||||
|
#define PNG_QUANTIZE_RED_BITS 5
|
||||||
|
#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1)
|
||||||
|
#define PNG_TEXT_Z_DEFAULT_STRATEGY 0
|
||||||
|
#define PNG_WEIGHT_SHIFT 8
|
||||||
|
#define PNG_ZBUF_SIZE 8192
|
||||||
|
#define PNG_ZLIB_VERNUM 0x1280
|
||||||
|
#define PNG_Z_DEFAULT_COMPRESSION (-1)
|
||||||
|
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
|
||||||
|
#define PNG_Z_DEFAULT_STRATEGY 1
|
||||||
|
#define PNG_sCAL_PRECISION 5
|
||||||
|
#define PNG_sRGB_PROFILE_CHECKS 2
|
||||||
|
/* end of settings */
|
||||||
#endif /* PNGLCONF_H */
|
#endif /* PNGLCONF_H */
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!\defgroup vp8 VP8
|
/*!\defgroup vp8 VP8
|
||||||
* \ingroup codecs
|
* \ingroup codecs
|
||||||
* VP8 is vpx's newest video compression algorithm that uses motion
|
* VP8 is vpx's newest video compression algorithm that uses motion
|
||||||
|
@ -28,42 +27,52 @@
|
||||||
/*!\file
|
/*!\file
|
||||||
* \brief Provides controls common to both the VP8 encoder and decoder.
|
* \brief Provides controls common to both the VP8 encoder and decoder.
|
||||||
*/
|
*/
|
||||||
#ifndef VP8_H
|
#ifndef VPX_VP8_H_
|
||||||
#define VP8_H
|
#define VPX_VP8_H_
|
||||||
#include "vpx_codec_impl_top.h"
|
|
||||||
|
#include "./vpx_codec.h"
|
||||||
|
#include "./vpx_image.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!\brief Control functions
|
/*!\brief Control functions
|
||||||
*
|
*
|
||||||
* The set of macros define the control functions of VP8 interface
|
* The set of macros define the control functions of VP8 interface
|
||||||
*/
|
*/
|
||||||
enum vp8_com_control_id
|
enum vp8_com_control_id {
|
||||||
{
|
VP8_SET_REFERENCE = 1, /**< pass in an external frame into decoder to be used as reference frame */
|
||||||
VP8_SET_REFERENCE = 1, /**< pass in an external frame into decoder to be used as reference frame */
|
VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from the decoder */
|
||||||
VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from the decoder */
|
VP8_SET_POSTPROC = 3, /**< set the decoder's post processing settings */
|
||||||
VP8_SET_POSTPROC = 3, /**< set the decoder's post processing settings */
|
VP8_SET_DBG_COLOR_REF_FRAME = 4, /**< set the reference frames to color for each macroblock */
|
||||||
VP8_SET_DBG_COLOR_REF_FRAME = 4, /**< set the reference frames to color for each macroblock */
|
VP8_SET_DBG_COLOR_MB_MODES = 5, /**< set which macro block modes to color */
|
||||||
VP8_SET_DBG_COLOR_MB_MODES = 5, /**< set which macro block modes to color */
|
VP8_SET_DBG_COLOR_B_MODES = 6, /**< set which blocks modes to color */
|
||||||
VP8_SET_DBG_COLOR_B_MODES = 6, /**< set which blocks modes to color */
|
VP8_SET_DBG_DISPLAY_MV = 7, /**< set which motion vector modes to draw */
|
||||||
VP8_SET_DBG_DISPLAY_MV = 7, /**< set which motion vector modes to draw */
|
|
||||||
VP8_COMMON_CTRL_ID_MAX,
|
/* TODO(jkoleszar): The encoder incorrectly reuses some of these values (5+)
|
||||||
VP8_DECODER_CTRL_ID_START = 256
|
* for its control ids. These should be migrated to something like the
|
||||||
|
* VP8_DECODER_CTRL_ID_START range next time we're ready to break the ABI.
|
||||||
|
*/
|
||||||
|
VP9_GET_REFERENCE = 128, /**< get a pointer to a reference frame */
|
||||||
|
VP8_COMMON_CTRL_ID_MAX,
|
||||||
|
VP8_DECODER_CTRL_ID_START = 256
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!\brief post process flags
|
/*!\brief post process flags
|
||||||
*
|
*
|
||||||
* The set of macros define VP8 decoder post processing flags
|
* The set of macros define VP8 decoder post processing flags
|
||||||
*/
|
*/
|
||||||
enum vp8_postproc_level
|
enum vp8_postproc_level {
|
||||||
{
|
VP8_NOFILTERING = 0,
|
||||||
VP8_NOFILTERING = 0,
|
VP8_DEBLOCK = 1 << 0,
|
||||||
VP8_DEBLOCK = 1<<0,
|
VP8_DEMACROBLOCK = 1 << 1,
|
||||||
VP8_DEMACROBLOCK = 1<<1,
|
VP8_ADDNOISE = 1 << 2,
|
||||||
VP8_ADDNOISE = 1<<2,
|
VP8_DEBUG_TXT_FRAME_INFO = 1 << 3, /**< print frame information */
|
||||||
VP8_DEBUG_TXT_FRAME_INFO = 1<<3, /**< print frame information */
|
VP8_DEBUG_TXT_MBLK_MODES = 1 << 4, /**< print macro block modes over each macro block */
|
||||||
VP8_DEBUG_TXT_MBLK_MODES = 1<<4, /**< print macro block modes over each macro block */
|
VP8_DEBUG_TXT_DC_DIFF = 1 << 5, /**< print dc diff for each macro block */
|
||||||
VP8_DEBUG_TXT_DC_DIFF = 1<<5, /**< print dc diff for each macro block */
|
VP8_DEBUG_TXT_RATE_INFO = 1 << 6, /**< print video rate info (encoder only) */
|
||||||
VP8_DEBUG_TXT_RATE_INFO = 1<<6, /**< print video rate info (encoder only) */
|
VP8_MFQE = 1 << 10
|
||||||
VP8_MFQE = 1<<10
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!\brief post process flags
|
/*!\brief post process flags
|
||||||
|
@ -73,41 +82,44 @@ enum vp8_postproc_level
|
||||||
* to VP8_DEBLOCK and deblocking_level to 1.
|
* to VP8_DEBLOCK and deblocking_level to 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct vp8_postproc_cfg
|
typedef struct vp8_postproc_cfg {
|
||||||
{
|
int post_proc_flag; /**< the types of post processing to be done, should be combination of "vp8_postproc_level" */
|
||||||
int post_proc_flag; /**< the types of post processing to be done, should be combination of "vp8_postproc_level" */
|
int deblocking_level; /**< the strength of deblocking, valid range [0, 16] */
|
||||||
int deblocking_level; /**< the strength of deblocking, valid range [0, 16] */
|
int noise_level; /**< the strength of additive noise, valid range [0, 16] */
|
||||||
int noise_level; /**< the strength of additive noise, valid range [0, 16] */
|
|
||||||
} vp8_postproc_cfg_t;
|
} vp8_postproc_cfg_t;
|
||||||
|
|
||||||
/*!\brief reference frame type
|
/*!\brief reference frame type
|
||||||
*
|
*
|
||||||
* The set of macros define the type of VP8 reference frames
|
* The set of macros define the type of VP8 reference frames
|
||||||
*/
|
*/
|
||||||
typedef enum vpx_ref_frame_type
|
typedef enum vpx_ref_frame_type {
|
||||||
{
|
VP8_LAST_FRAME = 1,
|
||||||
VP8_LAST_FRAME = 1,
|
VP8_GOLD_FRAME = 2,
|
||||||
VP8_GOLD_FRAME = 2,
|
VP8_ALTR_FRAME = 4
|
||||||
VP8_ALTR_FRAME = 4
|
|
||||||
} vpx_ref_frame_type_t;
|
} vpx_ref_frame_type_t;
|
||||||
|
|
||||||
/*!\brief reference frame data struct
|
/*!\brief reference frame data struct
|
||||||
*
|
*
|
||||||
* define the data struct to access vp8 reference frames
|
* Define the data struct to access vp8 reference frames.
|
||||||
*/
|
*/
|
||||||
|
typedef struct vpx_ref_frame {
|
||||||
typedef struct vpx_ref_frame
|
vpx_ref_frame_type_t frame_type; /**< which reference frame */
|
||||||
{
|
vpx_image_t img; /**< reference frame data in image format */
|
||||||
vpx_ref_frame_type_t frame_type; /**< which reference frame */
|
|
||||||
vpx_image_t img; /**< reference frame data in image format */
|
|
||||||
} vpx_ref_frame_t;
|
} vpx_ref_frame_t;
|
||||||
|
|
||||||
|
/*!\brief VP9 specific reference frame data struct
|
||||||
|
*
|
||||||
|
* Define the data struct to access vp9 reference frames.
|
||||||
|
*/
|
||||||
|
typedef struct vp9_ref_frame {
|
||||||
|
int idx; /**< frame index to get (input) */
|
||||||
|
vpx_image_t img; /**< img structure to populate (output) */
|
||||||
|
} vp9_ref_frame_t;
|
||||||
|
|
||||||
/*!\brief vp8 decoder control function parameter type
|
/*!\brief vp8 decoder control function parameter type
|
||||||
*
|
*
|
||||||
* defines the data type for each of VP8 decoder control function requires
|
* defines the data type for each of VP8 decoder control function requires
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *)
|
VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *)
|
||||||
VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *)
|
VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *)
|
||||||
VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *)
|
VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *)
|
||||||
|
@ -115,9 +127,12 @@ VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int)
|
||||||
VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int)
|
VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int)
|
||||||
VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int)
|
VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int)
|
||||||
VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int)
|
VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int)
|
||||||
|
VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *)
|
||||||
|
|
||||||
/*! @} - end defgroup vp8 */
|
/*! @} - end defgroup vp8 */
|
||||||
|
|
||||||
#include "vpx_codec_impl_bottom.h"
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // VPX_VP8_H_
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "vp8.h"
|
|
||||||
|
|
||||||
/*!\defgroup vp8_decoder WebM VP8 Decoder
|
/*!\defgroup vp8_decoder WebM VP8 Decoder
|
||||||
* \ingroup vp8
|
* \ingroup vp8
|
||||||
*
|
*
|
||||||
|
@ -20,9 +18,15 @@
|
||||||
* \brief Provides definitions for using the VP8 algorithm within the vpx Decoder
|
* \brief Provides definitions for using the VP8 algorithm within the vpx Decoder
|
||||||
* interface.
|
* interface.
|
||||||
*/
|
*/
|
||||||
#ifndef VP8DX_H
|
#ifndef VPX_VP8DX_H_
|
||||||
#define VP8DX_H
|
#define VPX_VP8DX_H_
|
||||||
#include "vpx_codec_impl_top.h"
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Include controls common to both the encoder and decoder */
|
||||||
|
#include "./vp8.h"
|
||||||
|
|
||||||
/*!\name Algorithm interface for VP8
|
/*!\name Algorithm interface for VP8
|
||||||
*
|
*
|
||||||
|
@ -31,38 +35,64 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
|
extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
|
||||||
extern vpx_codec_iface_t* vpx_codec_vp8_dx(void);
|
extern vpx_codec_iface_t *vpx_codec_vp8_dx(void);
|
||||||
|
|
||||||
|
/* TODO(jkoleszar): These move to VP9 in a later patch set. */
|
||||||
|
extern vpx_codec_iface_t vpx_codec_vp9_dx_algo;
|
||||||
|
extern vpx_codec_iface_t *vpx_codec_vp9_dx(void);
|
||||||
/*!@} - end algorithm interface member group*/
|
/*!@} - end algorithm interface member group*/
|
||||||
|
|
||||||
/* Include controls common to both the encoder and decoder */
|
|
||||||
#include "vp8.h"
|
|
||||||
|
|
||||||
|
/*!\enum vp8_dec_control_id
|
||||||
/*!\brief VP8 decoder control functions
|
* \brief VP8 decoder control functions
|
||||||
*
|
*
|
||||||
* This set of macros define the control functions available for the VP8
|
* This set of macros define the control functions available for the VP8
|
||||||
* decoder interface.
|
* decoder interface.
|
||||||
*
|
*
|
||||||
* \sa #vpx_codec_control
|
* \sa #vpx_codec_control
|
||||||
*/
|
*/
|
||||||
enum vp8_dec_control_id
|
enum vp8_dec_control_id {
|
||||||
{
|
/** control function to get info on which reference frames were updated
|
||||||
/** control function to get info on which reference frames were updated
|
* by the last decode
|
||||||
* by the last decode
|
*/
|
||||||
|
VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START,
|
||||||
|
|
||||||
|
/** check if the indicated frame is corrupted */
|
||||||
|
VP8D_GET_FRAME_CORRUPTED,
|
||||||
|
|
||||||
|
/** control function to get info on which reference frames were used
|
||||||
|
* by the last decode
|
||||||
|
*/
|
||||||
|
VP8D_GET_LAST_REF_USED,
|
||||||
|
|
||||||
|
/** decryption function to decrypt encoded buffer data immediately
|
||||||
|
* before decoding. Takes a vp8_decrypt_init, which contains
|
||||||
|
* a callback function and opaque context pointer.
|
||||||
|
*/
|
||||||
|
VP8D_SET_DECRYPTOR,
|
||||||
|
|
||||||
|
/** control function to get the display dimensions for the current frame. */
|
||||||
|
VP9D_GET_DISPLAY_SIZE,
|
||||||
|
|
||||||
|
/** For testing. */
|
||||||
|
VP9_INVERT_TILE_DECODE_ORDER,
|
||||||
|
|
||||||
|
VP8_DECODER_CTRL_ID_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
/*!\brief Structure to hold decryption state
|
||||||
|
*
|
||||||
|
* Defines a structure to hold the decryption state and access function.
|
||||||
|
*/
|
||||||
|
typedef struct vp8_decrypt_init {
|
||||||
|
/** Decrypt n bytes of data from input -> output, using the decrypt_state
|
||||||
|
* passed in VP8D_SET_DECRYPTOR.
|
||||||
*/
|
*/
|
||||||
VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START,
|
void (*decrypt_cb)(void *decrypt_state, const unsigned char *input,
|
||||||
|
unsigned char *output, int count);
|
||||||
/** check if the indicated frame is corrupted */
|
/*! Decryption state. */
|
||||||
VP8D_GET_FRAME_CORRUPTED,
|
void *decrypt_state;
|
||||||
|
} vp8_decrypt_init;
|
||||||
/** control function to get info on which reference frames were used
|
|
||||||
* by the last decode
|
|
||||||
*/
|
|
||||||
VP8D_GET_LAST_REF_USED,
|
|
||||||
|
|
||||||
VP8_DECODER_CTRL_ID_MAX
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief VP8 decoder control function parameter type
|
/*!\brief VP8 decoder control function parameter type
|
||||||
*
|
*
|
||||||
|
@ -75,9 +105,14 @@ enum vp8_dec_control_id
|
||||||
VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *)
|
VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *)
|
||||||
VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *)
|
VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *)
|
||||||
VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *)
|
VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *)
|
||||||
|
VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, vp8_decrypt_init *)
|
||||||
|
VPX_CTRL_USE_TYPE(VP9D_GET_DISPLAY_SIZE, int *)
|
||||||
|
VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
|
||||||
|
|
||||||
/*! @} - end defgroup vp8_decoder */
|
/*! @} - end defgroup vp8_decoder */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
#include "vpx_codec_impl_bottom.h"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // VPX_VP8DX_H_
|
||||||
|
|
|
@ -36,16 +36,17 @@
|
||||||
* Once initialized, the instance is manged using other functions from
|
* Once initialized, the instance is manged using other functions from
|
||||||
* the vpx_codec_* family.
|
* the vpx_codec_* family.
|
||||||
*/
|
*/
|
||||||
|
#ifndef VPX_VPX_CODEC_H_
|
||||||
|
#define VPX_VPX_CODEC_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VPX_CODEC_H
|
#include "./vpx_integer.h"
|
||||||
#define VPX_CODEC_H
|
#include "./vpx_image.h"
|
||||||
#include "vpx_integer.h"
|
|
||||||
#include "vpx_image.h"
|
|
||||||
|
|
||||||
/*!\brief Decorator indicating a function is deprecated */
|
/*!\brief Decorator indicating a function is deprecated */
|
||||||
#ifndef DEPRECATED
|
#ifndef DEPRECATED
|
||||||
#if defined(__GNUC__) && __GNUC__
|
#if defined(__GNUC__) && __GNUC__
|
||||||
#define DEPRECATED __attribute__ ((deprecated))
|
#define DEPRECATED __attribute__ ((deprecated))
|
||||||
|
@ -66,7 +67,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif /* DECLSPEC_DEPRECATED */
|
#endif /* DECLSPEC_DEPRECATED */
|
||||||
|
|
||||||
/*!\brief Decorator indicating a function is potentially unused */
|
/*!\brief Decorator indicating a function is potentially unused */
|
||||||
#ifdef UNUSED
|
#ifdef UNUSED
|
||||||
#elif __GNUC__
|
#elif __GNUC__
|
||||||
#define UNUSED __attribute__ ((unused))
|
#define UNUSED __attribute__ ((unused))
|
||||||
|
@ -74,312 +75,310 @@ extern "C" {
|
||||||
#define UNUSED
|
#define UNUSED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!\brief Current ABI version number
|
/*!\brief Current ABI version number
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
* If this file is altered in any way that changes the ABI, this value
|
* If this file is altered in any way that changes the ABI, this value
|
||||||
* must be bumped. Examples include, but are not limited to, changing
|
* must be bumped. Examples include, but are not limited to, changing
|
||||||
* types, removing or reassigning enums, adding/removing/rearranging
|
* types, removing or reassigning enums, adding/removing/rearranging
|
||||||
* fields to structures
|
* fields to structures
|
||||||
*/
|
*/
|
||||||
#define VPX_CODEC_ABI_VERSION (2 + VPX_IMAGE_ABI_VERSION) /**<\hideinitializer*/
|
#define VPX_CODEC_ABI_VERSION (2 + VPX_IMAGE_ABI_VERSION) /**<\hideinitializer*/
|
||||||
|
|
||||||
/*!\brief Algorithm return codes */
|
/*!\brief Algorithm return codes */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/*!\brief Operation completed without error */
|
/*!\brief Operation completed without error */
|
||||||
VPX_CODEC_OK,
|
VPX_CODEC_OK,
|
||||||
|
|
||||||
/*!\brief Unspecified error */
|
/*!\brief Unspecified error */
|
||||||
VPX_CODEC_ERROR,
|
VPX_CODEC_ERROR,
|
||||||
|
|
||||||
/*!\brief Memory operation failed */
|
/*!\brief Memory operation failed */
|
||||||
VPX_CODEC_MEM_ERROR,
|
VPX_CODEC_MEM_ERROR,
|
||||||
|
|
||||||
/*!\brief ABI version mismatch */
|
/*!\brief ABI version mismatch */
|
||||||
VPX_CODEC_ABI_MISMATCH,
|
VPX_CODEC_ABI_MISMATCH,
|
||||||
|
|
||||||
/*!\brief Algorithm does not have required capability */
|
/*!\brief Algorithm does not have required capability */
|
||||||
VPX_CODEC_INCAPABLE,
|
VPX_CODEC_INCAPABLE,
|
||||||
|
|
||||||
/*!\brief The given bitstream is not supported.
|
/*!\brief The given bitstream is not supported.
|
||||||
*
|
|
||||||
* The bitstream was unable to be parsed at the highest level. The decoder
|
|
||||||
* is unable to proceed. This error \ref SHOULD be treated as fatal to the
|
|
||||||
* stream. */
|
|
||||||
VPX_CODEC_UNSUP_BITSTREAM,
|
|
||||||
|
|
||||||
/*!\brief Encoded bitstream uses an unsupported feature
|
|
||||||
*
|
|
||||||
* The decoder does not implement a feature required by the encoder. This
|
|
||||||
* return code should only be used for features that prevent future
|
|
||||||
* pictures from being properly decoded. This error \ref MAY be treated as
|
|
||||||
* fatal to the stream or \ref MAY be treated as fatal to the current GOP.
|
|
||||||
*/
|
|
||||||
VPX_CODEC_UNSUP_FEATURE,
|
|
||||||
|
|
||||||
/*!\brief The coded data for this stream is corrupt or incomplete
|
|
||||||
*
|
|
||||||
* There was a problem decoding the current frame. This return code
|
|
||||||
* should only be used for failures that prevent future pictures from
|
|
||||||
* being properly decoded. This error \ref MAY be treated as fatal to the
|
|
||||||
* stream or \ref MAY be treated as fatal to the current GOP. If decoding
|
|
||||||
* is continued for the current GOP, artifacts may be present.
|
|
||||||
*/
|
|
||||||
VPX_CODEC_CORRUPT_FRAME,
|
|
||||||
|
|
||||||
/*!\brief An application-supplied parameter is not valid.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
VPX_CODEC_INVALID_PARAM,
|
|
||||||
|
|
||||||
/*!\brief An iterator reached the end of list.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
VPX_CODEC_LIST_END
|
|
||||||
|
|
||||||
}
|
|
||||||
vpx_codec_err_t;
|
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Codec capabilities bitfield
|
|
||||||
*
|
*
|
||||||
* Each codec advertises the capabilities it supports as part of its
|
* The bitstream was unable to be parsed at the highest level. The decoder
|
||||||
* ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
|
* is unable to proceed. This error \ref SHOULD be treated as fatal to the
|
||||||
* or functionality, and are not required to be supported.
|
* stream. */
|
||||||
|
VPX_CODEC_UNSUP_BITSTREAM,
|
||||||
|
|
||||||
|
/*!\brief Encoded bitstream uses an unsupported feature
|
||||||
*
|
*
|
||||||
* The available flags are specified by VPX_CODEC_CAP_* defines.
|
* The decoder does not implement a feature required by the encoder. This
|
||||||
|
* return code should only be used for features that prevent future
|
||||||
|
* pictures from being properly decoded. This error \ref MAY be treated as
|
||||||
|
* fatal to the stream or \ref MAY be treated as fatal to the current GOP.
|
||||||
*/
|
*/
|
||||||
typedef long vpx_codec_caps_t;
|
VPX_CODEC_UNSUP_FEATURE,
|
||||||
|
|
||||||
|
/*!\brief The coded data for this stream is corrupt or incomplete
|
||||||
|
*
|
||||||
|
* There was a problem decoding the current frame. This return code
|
||||||
|
* should only be used for failures that prevent future pictures from
|
||||||
|
* being properly decoded. This error \ref MAY be treated as fatal to the
|
||||||
|
* stream or \ref MAY be treated as fatal to the current GOP. If decoding
|
||||||
|
* is continued for the current GOP, artifacts may be present.
|
||||||
|
*/
|
||||||
|
VPX_CODEC_CORRUPT_FRAME,
|
||||||
|
|
||||||
|
/*!\brief An application-supplied parameter is not valid.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
VPX_CODEC_INVALID_PARAM,
|
||||||
|
|
||||||
|
/*!\brief An iterator reached the end of list.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
VPX_CODEC_LIST_END
|
||||||
|
|
||||||
|
}
|
||||||
|
vpx_codec_err_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*! \brief Codec capabilities bitfield
|
||||||
|
*
|
||||||
|
* Each codec advertises the capabilities it supports as part of its
|
||||||
|
* ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
|
||||||
|
* or functionality, and are not required to be supported.
|
||||||
|
*
|
||||||
|
* The available flags are specified by VPX_CODEC_CAP_* defines.
|
||||||
|
*/
|
||||||
|
typedef long vpx_codec_caps_t;
|
||||||
#define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
|
#define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
|
||||||
#define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
|
#define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
|
||||||
#define VPX_CODEC_CAP_XMA 0x4 /**< Supports eXternal Memory Allocation */
|
#define VPX_CODEC_CAP_XMA 0x4 /**< Supports eXternal Memory Allocation */
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Initialization-time Feature Enabling
|
/*! \brief Initialization-time Feature Enabling
|
||||||
*
|
*
|
||||||
* Certain codec features must be known at initialization time, to allow for
|
* Certain codec features must be known at initialization time, to allow for
|
||||||
* proper memory allocation.
|
* proper memory allocation.
|
||||||
*
|
*
|
||||||
* The available flags are specified by VPX_CODEC_USE_* defines.
|
* The available flags are specified by VPX_CODEC_USE_* defines.
|
||||||
*/
|
*/
|
||||||
typedef long vpx_codec_flags_t;
|
typedef long vpx_codec_flags_t;
|
||||||
#define VPX_CODEC_USE_XMA 0x00000001 /**< Use eXternal Memory Allocation mode */
|
#define VPX_CODEC_USE_XMA 0x00000001 /**< Use eXternal Memory Allocation mode */
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Codec interface structure.
|
/*!\brief Codec interface structure.
|
||||||
*
|
*
|
||||||
* Contains function pointers and other data private to the codec
|
* Contains function pointers and other data private to the codec
|
||||||
* implementation. This structure is opaque to the application.
|
* implementation. This structure is opaque to the application.
|
||||||
*/
|
*/
|
||||||
typedef const struct vpx_codec_iface vpx_codec_iface_t;
|
typedef const struct vpx_codec_iface vpx_codec_iface_t;
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Codec private data structure.
|
/*!\brief Codec private data structure.
|
||||||
*
|
*
|
||||||
* Contains data private to the codec implementation. This structure is opaque
|
* Contains data private to the codec implementation. This structure is opaque
|
||||||
* to the application.
|
* to the application.
|
||||||
*/
|
*/
|
||||||
typedef struct vpx_codec_priv vpx_codec_priv_t;
|
typedef struct vpx_codec_priv vpx_codec_priv_t;
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Iterator
|
/*!\brief Iterator
|
||||||
*
|
*
|
||||||
* Opaque storage used for iterating over lists.
|
* Opaque storage used for iterating over lists.
|
||||||
*/
|
*/
|
||||||
typedef const void *vpx_codec_iter_t;
|
typedef const void *vpx_codec_iter_t;
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Codec context structure
|
/*!\brief Codec context structure
|
||||||
*
|
*
|
||||||
* All codecs \ref MUST support this context structure fully. In general,
|
* All codecs \ref MUST support this context structure fully. In general,
|
||||||
* this data should be considered private to the codec algorithm, and
|
* this data should be considered private to the codec algorithm, and
|
||||||
* not be manipulated or examined by the calling application. Applications
|
* not be manipulated or examined by the calling application. Applications
|
||||||
* may reference the 'name' member to get a printable description of the
|
* may reference the 'name' member to get a printable description of the
|
||||||
* algorithm.
|
* algorithm.
|
||||||
*/
|
*/
|
||||||
typedef struct vpx_codec_ctx
|
typedef struct vpx_codec_ctx {
|
||||||
{
|
const char *name; /**< Printable interface name */
|
||||||
const char *name; /**< Printable interface name */
|
vpx_codec_iface_t *iface; /**< Interface pointers */
|
||||||
vpx_codec_iface_t *iface; /**< Interface pointers */
|
vpx_codec_err_t err; /**< Last returned error */
|
||||||
vpx_codec_err_t err; /**< Last returned error */
|
const char *err_detail; /**< Detailed info, if available */
|
||||||
const char *err_detail; /**< Detailed info, if available */
|
vpx_codec_flags_t init_flags; /**< Flags passed at init time */
|
||||||
vpx_codec_flags_t init_flags; /**< Flags passed at init time */
|
union {
|
||||||
union
|
struct vpx_codec_dec_cfg *dec; /**< Decoder Configuration Pointer */
|
||||||
{
|
struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */
|
||||||
struct vpx_codec_dec_cfg *dec; /**< Decoder Configuration Pointer */
|
void *raw;
|
||||||
struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */
|
} config; /**< Configuration pointer aliasing union */
|
||||||
void *raw;
|
vpx_codec_priv_t *priv; /**< Algorithm private storage */
|
||||||
} config; /**< Configuration pointer aliasing union */
|
} vpx_codec_ctx_t;
|
||||||
vpx_codec_priv_t *priv; /**< Algorithm private storage */
|
|
||||||
} vpx_codec_ctx_t;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Library Version Number Interface
|
* Library Version Number Interface
|
||||||
*
|
*
|
||||||
* For example, see the following sample return values:
|
* For example, see the following sample return values:
|
||||||
* vpx_codec_version() (1<<16 | 2<<8 | 3)
|
* vpx_codec_version() (1<<16 | 2<<8 | 3)
|
||||||
* vpx_codec_version_str() "v1.2.3-rc1-16-gec6a1ba"
|
* vpx_codec_version_str() "v1.2.3-rc1-16-gec6a1ba"
|
||||||
* vpx_codec_version_extra_str() "rc1-16-gec6a1ba"
|
* vpx_codec_version_extra_str() "rc1-16-gec6a1ba"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!\brief Return the version information (as an integer)
|
/*!\brief Return the version information (as an integer)
|
||||||
*
|
*
|
||||||
* Returns a packed encoding of the library version number. This will only include
|
* Returns a packed encoding of the library version number. This will only include
|
||||||
* the major.minor.patch component of the version number. Note that this encoded
|
* the major.minor.patch component of the version number. Note that this encoded
|
||||||
* value should be accessed through the macros provided, as the encoding may change
|
* value should be accessed through the macros provided, as the encoding may change
|
||||||
* in the future.
|
* in the future.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int vpx_codec_version(void);
|
int vpx_codec_version(void);
|
||||||
#define VPX_VERSION_MAJOR(v) ((v>>16)&0xff) /**< extract major from packed version */
|
#define VPX_VERSION_MAJOR(v) ((v>>16)&0xff) /**< extract major from packed version */
|
||||||
#define VPX_VERSION_MINOR(v) ((v>>8)&0xff) /**< extract minor from packed version */
|
#define VPX_VERSION_MINOR(v) ((v>>8)&0xff) /**< extract minor from packed version */
|
||||||
#define VPX_VERSION_PATCH(v) ((v>>0)&0xff) /**< extract patch from packed version */
|
#define VPX_VERSION_PATCH(v) ((v>>0)&0xff) /**< extract patch from packed version */
|
||||||
|
|
||||||
/*!\brief Return the version major number */
|
/*!\brief Return the version major number */
|
||||||
#define vpx_codec_version_major() ((vpx_codec_version()>>16)&0xff)
|
#define vpx_codec_version_major() ((vpx_codec_version()>>16)&0xff)
|
||||||
|
|
||||||
/*!\brief Return the version minor number */
|
/*!\brief Return the version minor number */
|
||||||
#define vpx_codec_version_minor() ((vpx_codec_version()>>8)&0xff)
|
#define vpx_codec_version_minor() ((vpx_codec_version()>>8)&0xff)
|
||||||
|
|
||||||
/*!\brief Return the version patch number */
|
/*!\brief Return the version patch number */
|
||||||
#define vpx_codec_version_patch() ((vpx_codec_version()>>0)&0xff)
|
#define vpx_codec_version_patch() ((vpx_codec_version()>>0)&0xff)
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return the version information (as a string)
|
/*!\brief Return the version information (as a string)
|
||||||
*
|
*
|
||||||
* Returns a printable string containing the full library version number. This may
|
* Returns a printable string containing the full library version number. This may
|
||||||
* contain additional text following the three digit version number, as to indicate
|
* contain additional text following the three digit version number, as to indicate
|
||||||
* release candidates, prerelease versions, etc.
|
* release candidates, prerelease versions, etc.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_version_str(void);
|
const char *vpx_codec_version_str(void);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return the version information (as a string)
|
/*!\brief Return the version information (as a string)
|
||||||
*
|
*
|
||||||
* Returns a printable "extra string". This is the component of the string returned
|
* Returns a printable "extra string". This is the component of the string returned
|
||||||
* by vpx_codec_version_str() following the three digit version number.
|
* by vpx_codec_version_str() following the three digit version number.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_version_extra_str(void);
|
const char *vpx_codec_version_extra_str(void);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return the build configuration
|
/*!\brief Return the build configuration
|
||||||
*
|
*
|
||||||
* Returns a printable string containing an encoded version of the build
|
* Returns a printable string containing an encoded version of the build
|
||||||
* configuration. This may be useful to vpx support.
|
* configuration. This may be useful to vpx support.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_build_config(void);
|
const char *vpx_codec_build_config(void);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return the name for a given interface
|
/*!\brief Return the name for a given interface
|
||||||
*
|
*
|
||||||
* Returns a human readable string for name of the given codec interface.
|
* Returns a human readable string for name of the given codec interface.
|
||||||
*
|
*
|
||||||
* \param[in] iface Interface pointer
|
* \param[in] iface Interface pointer
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_iface_name(vpx_codec_iface_t *iface);
|
const char *vpx_codec_iface_name(vpx_codec_iface_t *iface);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Convert error number to printable string
|
/*!\brief Convert error number to printable string
|
||||||
*
|
*
|
||||||
* Returns a human readable string for the last error returned by the
|
* Returns a human readable string for the last error returned by the
|
||||||
* algorithm. The returned error will be one line and will not contain
|
* algorithm. The returned error will be one line and will not contain
|
||||||
* any newline characters.
|
* any newline characters.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \param[in] err Error number.
|
* \param[in] err Error number.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_err_to_string(vpx_codec_err_t err);
|
const char *vpx_codec_err_to_string(vpx_codec_err_t err);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Retrieve error synopsis for codec context
|
/*!\brief Retrieve error synopsis for codec context
|
||||||
*
|
*
|
||||||
* Returns a human readable string for the last error returned by the
|
* Returns a human readable string for the last error returned by the
|
||||||
* algorithm. The returned error will be one line and will not contain
|
* algorithm. The returned error will be one line and will not contain
|
||||||
* any newline characters.
|
* any newline characters.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
* \param[in] ctx Pointer to this instance's context.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_error(vpx_codec_ctx_t *ctx);
|
const char *vpx_codec_error(vpx_codec_ctx_t *ctx);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Retrieve detailed error information for codec context
|
/*!\brief Retrieve detailed error information for codec context
|
||||||
*
|
*
|
||||||
* Returns a human readable string providing detailed information about
|
* Returns a human readable string providing detailed information about
|
||||||
* the last error.
|
* the last error.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
* \param[in] ctx Pointer to this instance's context.
|
||||||
*
|
*
|
||||||
* \retval NULL
|
* \retval NULL
|
||||||
* No detailed information is available.
|
* No detailed information is available.
|
||||||
*/
|
*/
|
||||||
const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx);
|
const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx);
|
||||||
|
|
||||||
|
|
||||||
/* REQUIRED FUNCTIONS
|
/* REQUIRED FUNCTIONS
|
||||||
*
|
*
|
||||||
* The following functions are required to be implemented for all codecs.
|
* The following functions are required to be implemented for all codecs.
|
||||||
* They represent the base case functionality expected of all codecs.
|
* They represent the base case functionality expected of all codecs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!\brief Destroy a codec instance
|
/*!\brief Destroy a codec instance
|
||||||
*
|
*
|
||||||
* Destroys a codec context, freeing any associated memory buffers.
|
* Destroys a codec context, freeing any associated memory buffers.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* The codec algorithm initialized.
|
* The codec algorithm initialized.
|
||||||
* \retval #VPX_CODEC_MEM_ERROR
|
* \retval #VPX_CODEC_MEM_ERROR
|
||||||
* Memory allocation failed.
|
* Memory allocation failed.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx);
|
vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Get the capabilities of an algorithm.
|
/*!\brief Get the capabilities of an algorithm.
|
||||||
*
|
*
|
||||||
* Retrieves the capabilities bitfield from the algorithm's interface.
|
* Retrieves the capabilities bitfield from the algorithm's interface.
|
||||||
*
|
*
|
||||||
* \param[in] iface Pointer to the algorithm interface
|
* \param[in] iface Pointer to the algorithm interface
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface);
|
vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Control algorithm
|
/*!\brief Control algorithm
|
||||||
*
|
*
|
||||||
* This function is used to exchange algorithm specific data with the codec
|
* This function is used to exchange algorithm specific data with the codec
|
||||||
* instance. This can be used to implement features specific to a particular
|
* instance. This can be used to implement features specific to a particular
|
||||||
* algorithm.
|
* algorithm.
|
||||||
*
|
*
|
||||||
* This wrapper function dispatches the request to the helper function
|
* This wrapper function dispatches the request to the helper function
|
||||||
* associated with the given ctrl_id. It tries to call this function
|
* associated with the given ctrl_id. It tries to call this function
|
||||||
* transparently, but will return #VPX_CODEC_ERROR if the request could not
|
* transparently, but will return #VPX_CODEC_ERROR if the request could not
|
||||||
* be dispatched.
|
* be dispatched.
|
||||||
*
|
*
|
||||||
* Note that this function should not be used directly. Call the
|
* Note that this function should not be used directly. Call the
|
||||||
* #vpx_codec_control wrapper macro instead.
|
* #vpx_codec_control wrapper macro instead.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
* \param[in] ctrl_id Algorithm specific control identifier
|
* \param[in] ctrl_id Algorithm specific control identifier
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* The control request was processed.
|
* The control request was processed.
|
||||||
* \retval #VPX_CODEC_ERROR
|
* \retval #VPX_CODEC_ERROR
|
||||||
* The control request was not processed.
|
* The control request was not processed.
|
||||||
* \retval #VPX_CODEC_INVALID_PARAM
|
* \retval #VPX_CODEC_INVALID_PARAM
|
||||||
* The data was not valid.
|
* The data was not valid.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx,
|
||||||
int ctrl_id,
|
int ctrl_id,
|
||||||
...);
|
...);
|
||||||
#if defined(VPX_DISABLE_CTRL_TYPECHECKS) && VPX_DISABLE_CTRL_TYPECHECKS
|
#if defined(VPX_DISABLE_CTRL_TYPECHECKS) && VPX_DISABLE_CTRL_TYPECHECKS
|
||||||
# define vpx_codec_control(ctx,id,data) vpx_codec_control_(ctx,id,data)
|
# define vpx_codec_control(ctx,id,data) vpx_codec_control_(ctx,id,data)
|
||||||
# define VPX_CTRL_USE_TYPE(id, typ)
|
# define VPX_CTRL_USE_TYPE(id, typ)
|
||||||
|
@ -387,175 +386,173 @@ extern "C" {
|
||||||
# define VPX_CTRL_VOID(id, typ)
|
# define VPX_CTRL_VOID(id, typ)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/*!\brief vpx_codec_control wrapper macro
|
/*!\brief vpx_codec_control wrapper macro
|
||||||
*
|
*
|
||||||
* This macro allows for type safe conversions across the variadic parameter
|
* This macro allows for type safe conversions across the variadic parameter
|
||||||
* to vpx_codec_control_().
|
* to vpx_codec_control_().
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
* It works by dispatching the call to the control function through a wrapper
|
* It works by dispatching the call to the control function through a wrapper
|
||||||
* function named with the id parameter.
|
* function named with the id parameter.
|
||||||
*/
|
*/
|
||||||
# define vpx_codec_control(ctx,id,data) vpx_codec_control_##id(ctx,id,data)\
|
# define vpx_codec_control(ctx,id,data) vpx_codec_control_##id(ctx,id,data)\
|
||||||
/**<\hideinitializer*/
|
/**<\hideinitializer*/
|
||||||
|
|
||||||
|
|
||||||
/*!\brief vpx_codec_control type definition macro
|
/*!\brief vpx_codec_control type definition macro
|
||||||
*
|
*
|
||||||
* This macro allows for type safe conversions across the variadic parameter
|
* This macro allows for type safe conversions across the variadic parameter
|
||||||
* to vpx_codec_control_(). It defines the type of the argument for a given
|
* to vpx_codec_control_(). It defines the type of the argument for a given
|
||||||
* control identifier.
|
* control identifier.
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
* It defines a static function with
|
* It defines a static function with
|
||||||
* the correctly typed arguments as a wrapper to the type-unsafe internal
|
* the correctly typed arguments as a wrapper to the type-unsafe internal
|
||||||
* function.
|
* function.
|
||||||
*/
|
*/
|
||||||
# define VPX_CTRL_USE_TYPE(id, typ) \
|
# define VPX_CTRL_USE_TYPE(id, typ) \
|
||||||
static vpx_codec_err_t \
|
static vpx_codec_err_t \
|
||||||
vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) UNUSED;\
|
vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) UNUSED;\
|
||||||
\
|
\
|
||||||
static vpx_codec_err_t \
|
static vpx_codec_err_t \
|
||||||
vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\
|
vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\
|
||||||
return vpx_codec_control_(ctx, ctrl_id, data);\
|
return vpx_codec_control_(ctx, ctrl_id, data);\
|
||||||
} /**<\hideinitializer*/
|
} /**<\hideinitializer*/
|
||||||
|
|
||||||
|
|
||||||
/*!\brief vpx_codec_control deprecated type definition macro
|
/*!\brief vpx_codec_control deprecated type definition macro
|
||||||
*
|
*
|
||||||
* Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is
|
* Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is
|
||||||
* deprecated and should not be used. Consult the documentation for your
|
* deprecated and should not be used. Consult the documentation for your
|
||||||
* codec for more information.
|
* codec for more information.
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
* It defines a static function with the correctly typed arguments as a
|
* It defines a static function with the correctly typed arguments as a
|
||||||
* wrapper to the type-unsafe internal function.
|
* wrapper to the type-unsafe internal function.
|
||||||
*/
|
*/
|
||||||
# define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
|
# define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
|
||||||
DECLSPEC_DEPRECATED static vpx_codec_err_t \
|
DECLSPEC_DEPRECATED static vpx_codec_err_t \
|
||||||
vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) DEPRECATED UNUSED;\
|
vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) DEPRECATED UNUSED;\
|
||||||
\
|
\
|
||||||
DECLSPEC_DEPRECATED static vpx_codec_err_t \
|
DECLSPEC_DEPRECATED static vpx_codec_err_t \
|
||||||
vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\
|
vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\
|
||||||
return vpx_codec_control_(ctx, ctrl_id, data);\
|
return vpx_codec_control_(ctx, ctrl_id, data);\
|
||||||
} /**<\hideinitializer*/
|
} /**<\hideinitializer*/
|
||||||
|
|
||||||
|
|
||||||
/*!\brief vpx_codec_control void type definition macro
|
/*!\brief vpx_codec_control void type definition macro
|
||||||
*
|
*
|
||||||
* This macro allows for type safe conversions across the variadic parameter
|
* This macro allows for type safe conversions across the variadic parameter
|
||||||
* to vpx_codec_control_(). It indicates that a given control identifier takes
|
* to vpx_codec_control_(). It indicates that a given control identifier takes
|
||||||
* no argument.
|
* no argument.
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
* It defines a static function without a data argument as a wrapper to the
|
* It defines a static function without a data argument as a wrapper to the
|
||||||
* type-unsafe internal function.
|
* type-unsafe internal function.
|
||||||
*/
|
*/
|
||||||
# define VPX_CTRL_VOID(id) \
|
# define VPX_CTRL_VOID(id) \
|
||||||
static vpx_codec_err_t \
|
static vpx_codec_err_t \
|
||||||
vpx_codec_control_##id(vpx_codec_ctx_t*, int) UNUSED;\
|
vpx_codec_control_##id(vpx_codec_ctx_t*, int) UNUSED;\
|
||||||
\
|
\
|
||||||
static vpx_codec_err_t \
|
static vpx_codec_err_t \
|
||||||
vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id) {\
|
vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id) {\
|
||||||
return vpx_codec_control_(ctx, ctrl_id);\
|
return vpx_codec_control_(ctx, ctrl_id);\
|
||||||
} /**<\hideinitializer*/
|
} /**<\hideinitializer*/
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*!\defgroup cap_xma External Memory Allocation Functions
|
/*!\defgroup cap_xma External Memory Allocation Functions
|
||||||
*
|
*
|
||||||
* The following functions are required to be implemented for all codecs
|
* The following functions are required to be implemented for all codecs
|
||||||
* that advertise the VPX_CODEC_CAP_XMA capability. Calling these functions
|
* that advertise the VPX_CODEC_CAP_XMA capability. Calling these functions
|
||||||
* for codecs that don't advertise this capability will result in an error
|
* for codecs that don't advertise this capability will result in an error
|
||||||
* code being returned, usually VPX_CODEC_INCAPABLE
|
* code being returned, usually VPX_CODEC_INCAPABLE
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Memory Map Entry
|
/*!\brief Memory Map Entry
|
||||||
*
|
*
|
||||||
* This structure is used to contain the properties of a memory segment. It
|
* This structure is used to contain the properties of a memory segment. It
|
||||||
* is populated by the codec in the request phase, and by the calling
|
* is populated by the codec in the request phase, and by the calling
|
||||||
* application once the requested allocation has been performed.
|
* application once the requested allocation has been performed.
|
||||||
|
*/
|
||||||
|
typedef struct vpx_codec_mmap {
|
||||||
|
/*
|
||||||
|
* The following members are set by the codec when requesting a segment
|
||||||
*/
|
*/
|
||||||
typedef struct vpx_codec_mmap
|
unsigned int id; /**< identifier for the segment's contents */
|
||||||
{
|
unsigned long sz; /**< size of the segment, in bytes */
|
||||||
/*
|
unsigned int align; /**< required alignment of the segment, in bytes */
|
||||||
* The following members are set by the codec when requesting a segment
|
unsigned int flags; /**< bitfield containing segment properties */
|
||||||
*/
|
|
||||||
unsigned int id; /**< identifier for the segment's contents */
|
|
||||||
unsigned long sz; /**< size of the segment, in bytes */
|
|
||||||
unsigned int align; /**< required alignment of the segment, in bytes */
|
|
||||||
unsigned int flags; /**< bitfield containing segment properties */
|
|
||||||
#define VPX_CODEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */
|
#define VPX_CODEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */
|
||||||
#define VPX_CODEC_MEM_WRONLY 0x2 /**< Segment need not be readable */
|
#define VPX_CODEC_MEM_WRONLY 0x2 /**< Segment need not be readable */
|
||||||
#define VPX_CODEC_MEM_FAST 0x4 /**< Place in fast memory, if available */
|
#define VPX_CODEC_MEM_FAST 0x4 /**< Place in fast memory, if available */
|
||||||
|
|
||||||
/* The following members are to be filled in by the allocation function */
|
/* The following members are to be filled in by the allocation function */
|
||||||
void *base; /**< pointer to the allocated segment */
|
void *base; /**< pointer to the allocated segment */
|
||||||
void (*dtor)(struct vpx_codec_mmap *map); /**< destructor to call */
|
void (*dtor)(struct vpx_codec_mmap *map); /**< destructor to call */
|
||||||
void *priv; /**< allocator private storage */
|
void *priv; /**< allocator private storage */
|
||||||
} vpx_codec_mmap_t; /**< alias for struct vpx_codec_mmap */
|
} vpx_codec_mmap_t; /**< alias for struct vpx_codec_mmap */
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Iterate over the list of segments to allocate.
|
/*!\brief Iterate over the list of segments to allocate.
|
||||||
*
|
*
|
||||||
* Iterates over a list of the segments to allocate. The iterator storage
|
* Iterates over a list of the segments to allocate. The iterator storage
|
||||||
* should be initialized to NULL to start the iteration. Iteration is complete
|
* should be initialized to NULL to start the iteration. Iteration is complete
|
||||||
* when this function returns VPX_CODEC_LIST_END. The amount of memory needed to
|
* when this function returns VPX_CODEC_LIST_END. The amount of memory needed to
|
||||||
* allocate is dependent upon the size of the encoded stream. In cases where the
|
* allocate is dependent upon the size of the encoded stream. In cases where the
|
||||||
* stream is not available at allocation time, a fixed size must be requested.
|
* stream is not available at allocation time, a fixed size must be requested.
|
||||||
* The codec will not be able to operate on streams larger than the size used at
|
* The codec will not be able to operate on streams larger than the size used at
|
||||||
* allocation time.
|
* allocation time.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
* \param[in] ctx Pointer to this instance's context.
|
||||||
* \param[out] mmap Pointer to the memory map entry to populate.
|
* \param[out] mmap Pointer to the memory map entry to populate.
|
||||||
* \param[in,out] iter Iterator storage, initialized to NULL
|
* \param[in,out] iter Iterator storage, initialized to NULL
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* The memory map entry was populated.
|
* The memory map entry was populated.
|
||||||
* \retval #VPX_CODEC_ERROR
|
* \retval #VPX_CODEC_ERROR
|
||||||
* Codec does not support XMA mode.
|
* Codec does not support XMA mode.
|
||||||
* \retval #VPX_CODEC_MEM_ERROR
|
* \retval #VPX_CODEC_MEM_ERROR
|
||||||
* Unable to determine segment size from stream info.
|
* Unable to determine segment size from stream info.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_get_mem_map(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_get_mem_map(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_mmap_t *mmap,
|
vpx_codec_mmap_t *mmap,
|
||||||
vpx_codec_iter_t *iter);
|
vpx_codec_iter_t *iter);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Identify allocated segments to codec instance
|
/*!\brief Identify allocated segments to codec instance
|
||||||
*
|
*
|
||||||
* Stores a list of allocated segments in the codec. Segments \ref MUST be
|
* Stores a list of allocated segments in the codec. Segments \ref MUST be
|
||||||
* passed in the order they are read from vpx_codec_get_mem_map(), but may be
|
* passed in the order they are read from vpx_codec_get_mem_map(), but may be
|
||||||
* passed in groups of any size. Segments \ref MUST be set only once. The
|
* passed in groups of any size. Segments \ref MUST be set only once. The
|
||||||
* allocation function \ref MUST ensure that the vpx_codec_mmap_t::base member
|
* allocation function \ref MUST ensure that the vpx_codec_mmap_t::base member
|
||||||
* is non-NULL. If the segment requires cleanup handling (e.g., calling free()
|
* is non-NULL. If the segment requires cleanup handling (e.g., calling free()
|
||||||
* or close()) then the vpx_codec_mmap_t::dtor member \ref MUST be populated.
|
* or close()) then the vpx_codec_mmap_t::dtor member \ref MUST be populated.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
* \param[in] ctx Pointer to this instance's context.
|
||||||
* \param[in] mmaps Pointer to the first memory map entry in the list.
|
* \param[in] mmaps Pointer to the first memory map entry in the list.
|
||||||
* \param[in] num_maps Number of entries being set at this time
|
* \param[in] num_maps Number of entries being set at this time
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* The segment was stored in the codec context.
|
* The segment was stored in the codec context.
|
||||||
* \retval #VPX_CODEC_INCAPABLE
|
* \retval #VPX_CODEC_INCAPABLE
|
||||||
* Codec does not support XMA mode.
|
* Codec does not support XMA mode.
|
||||||
* \retval #VPX_CODEC_MEM_ERROR
|
* \retval #VPX_CODEC_MEM_ERROR
|
||||||
* Segment base address was not set, or segment was already stored.
|
* Segment base address was not set, or segment was already stored.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_set_mem_map(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_set_mem_map(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_mmap_t *mmaps,
|
vpx_codec_mmap_t *mmaps,
|
||||||
unsigned int num_maps);
|
unsigned int num_maps);
|
||||||
|
|
||||||
/*!@} - end defgroup cap_xma*/
|
/*!@} - end defgroup cap_xma*/
|
||||||
/*!@} - end defgroup codec*/
|
/*!@} - end defgroup codec*/
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif // VPX_VPX_CODEC_H_
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is to be included at the bottom of the header files defining the
|
|
||||||
* interface to individual codecs and contains matching blocks to those defined
|
|
||||||
* in vpx_codec_impl_top.h
|
|
||||||
*/
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -1,19 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is to be included at the top of the header files defining the
|
|
||||||
* interface to individual codecs and contains various workarounds common
|
|
||||||
* to all codec implementations.
|
|
||||||
*/
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
|
@ -7,7 +7,8 @@
|
||||||
* in the file PATENTS. All contributing project authors may
|
* in the file PATENTS. All contributing project authors may
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
#ifndef VPX_VPX_DECODER_H_
|
||||||
|
#define VPX_VPX_DECODER_H_
|
||||||
|
|
||||||
/*!\defgroup decoder Decoder Algorithm Interface
|
/*!\defgroup decoder Decoder Algorithm Interface
|
||||||
* \ingroup codec
|
* \ingroup codec
|
||||||
|
@ -28,306 +29,306 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VPX_DECODER_H
|
#include "./vpx_codec.h"
|
||||||
#define VPX_DECODER_H
|
|
||||||
#include "vpx_codec.h"
|
|
||||||
|
|
||||||
/*!\brief Current ABI version number
|
/*!\brief Current ABI version number
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
* If this file is altered in any way that changes the ABI, this value
|
* If this file is altered in any way that changes the ABI, this value
|
||||||
* must be bumped. Examples include, but are not limited to, changing
|
* must be bumped. Examples include, but are not limited to, changing
|
||||||
* types, removing or reassigning enums, adding/removing/rearranging
|
* types, removing or reassigning enums, adding/removing/rearranging
|
||||||
* fields to structures
|
* fields to structures
|
||||||
*/
|
*/
|
||||||
#define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
|
#define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
|
||||||
|
|
||||||
/*! \brief Decoder capabilities bitfield
|
/*! \brief Decoder capabilities bitfield
|
||||||
*
|
*
|
||||||
* Each decoder advertises the capabilities it supports as part of its
|
* Each decoder advertises the capabilities it supports as part of its
|
||||||
* ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
|
* ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
|
||||||
* or functionality, and are not required to be supported by a decoder.
|
* or functionality, and are not required to be supported by a decoder.
|
||||||
*
|
*
|
||||||
* The available flags are specified by VPX_CODEC_CAP_* defines.
|
* The available flags are specified by VPX_CODEC_CAP_* defines.
|
||||||
*/
|
*/
|
||||||
#define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */
|
#define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */
|
||||||
#define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */
|
#define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */
|
||||||
#define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */
|
#define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */
|
||||||
#define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 /**< Can conceal errors due to
|
#define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 /**< Can conceal errors due to
|
||||||
packet loss */
|
packet loss */
|
||||||
#define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000 /**< Can receive encoded frames
|
#define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000 /**< Can receive encoded frames
|
||||||
one fragment at a time */
|
one fragment at a time */
|
||||||
|
|
||||||
|
/*! \brief Initialization-time Feature Enabling
|
||||||
|
*
|
||||||
|
* Certain codec features must be known at initialization time, to allow for
|
||||||
|
* proper memory allocation.
|
||||||
|
*
|
||||||
|
* The available flags are specified by VPX_CODEC_USE_* defines.
|
||||||
|
*/
|
||||||
|
#define VPX_CODEC_CAP_FRAME_THREADING 0x200000 /**< Can support frame-based
|
||||||
|
multi-threading */
|
||||||
|
|
||||||
/*! \brief Initialization-time Feature Enabling
|
|
||||||
*
|
|
||||||
* Certain codec features must be known at initialization time, to allow for
|
|
||||||
* proper memory allocation.
|
|
||||||
*
|
|
||||||
* The available flags are specified by VPX_CODEC_USE_* defines.
|
|
||||||
*/
|
|
||||||
#define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
|
#define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
|
||||||
#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded
|
#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded
|
||||||
frames */
|
frames */
|
||||||
#define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000 /**< The input frame should be
|
#define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000 /**< The input frame should be
|
||||||
passed to the decoder one
|
passed to the decoder one
|
||||||
fragment at a time */
|
fragment at a time */
|
||||||
|
#define VPX_CODEC_USE_FRAME_THREADING 0x80000 /**< Enable frame-based
|
||||||
|
multi-threading */
|
||||||
|
|
||||||
/*!\brief Stream properties
|
/*!\brief Stream properties
|
||||||
*
|
*
|
||||||
* This structure is used to query or set properties of the decoded
|
* This structure is used to query or set properties of the decoded
|
||||||
* stream. Algorithms may extend this structure with data specific
|
* stream. Algorithms may extend this structure with data specific
|
||||||
* to their bitstream by setting the sz member appropriately.
|
* to their bitstream by setting the sz member appropriately.
|
||||||
*/
|
*/
|
||||||
typedef struct vpx_codec_stream_info
|
typedef struct vpx_codec_stream_info {
|
||||||
{
|
unsigned int sz; /**< Size of this structure */
|
||||||
unsigned int sz; /**< Size of this structure */
|
unsigned int w; /**< Width (or 0 for unknown/default) */
|
||||||
unsigned int w; /**< Width (or 0 for unknown/default) */
|
unsigned int h; /**< Height (or 0 for unknown/default) */
|
||||||
unsigned int h; /**< Height (or 0 for unknown/default) */
|
unsigned int is_kf; /**< Current frame is a keyframe */
|
||||||
unsigned int is_kf; /**< Current frame is a keyframe */
|
} vpx_codec_stream_info_t;
|
||||||
} vpx_codec_stream_info_t;
|
|
||||||
|
|
||||||
/* REQUIRED FUNCTIONS
|
/* REQUIRED FUNCTIONS
|
||||||
*
|
*
|
||||||
* The following functions are required to be implemented for all decoders.
|
* The following functions are required to be implemented for all decoders.
|
||||||
* They represent the base case functionality expected of all decoders.
|
* They represent the base case functionality expected of all decoders.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Initialization Configurations
|
/*!\brief Initialization Configurations
|
||||||
*
|
*
|
||||||
* This structure is used to pass init time configuration options to the
|
* This structure is used to pass init time configuration options to the
|
||||||
* decoder.
|
* decoder.
|
||||||
*/
|
*/
|
||||||
typedef struct vpx_codec_dec_cfg
|
typedef struct vpx_codec_dec_cfg {
|
||||||
{
|
unsigned int threads; /**< Maximum number of threads to use, default 1 */
|
||||||
unsigned int threads; /**< Maximum number of threads to use, default 1 */
|
unsigned int w; /**< Width */
|
||||||
unsigned int w; /**< Width */
|
unsigned int h; /**< Height */
|
||||||
unsigned int h; /**< Height */
|
} vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */
|
||||||
} vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Initialize a decoder instance
|
/*!\brief Initialize a decoder instance
|
||||||
*
|
*
|
||||||
* Initializes a decoder context using the given interface. Applications
|
* Initializes a decoder context using the given interface. Applications
|
||||||
* should call the vpx_codec_dec_init convenience macro instead of this
|
* should call the vpx_codec_dec_init convenience macro instead of this
|
||||||
* function directly, to ensure that the ABI version number parameter
|
* function directly, to ensure that the ABI version number parameter
|
||||||
* is properly initialized.
|
* is properly initialized.
|
||||||
*
|
*
|
||||||
* If the library was configured with --disable-multithread, this call
|
* If the library was configured with --disable-multithread, this call
|
||||||
* is not thread safe and should be guarded with a lock if being used
|
* is not thread safe and should be guarded with a lock if being used
|
||||||
* in a multithreaded context.
|
* in a multithreaded context.
|
||||||
*
|
*
|
||||||
* In XMA mode (activated by setting VPX_CODEC_USE_XMA in the flags
|
* In XMA mode (activated by setting VPX_CODEC_USE_XMA in the flags
|
||||||
* parameter), the storage pointed to by the cfg parameter must be
|
* parameter), the storage pointed to by the cfg parameter must be
|
||||||
* kept readable and stable until all memory maps have been set.
|
* kept readable and stable until all memory maps have been set.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
* \param[in] ctx Pointer to this instance's context.
|
||||||
* \param[in] iface Pointer to the algorithm interface to use.
|
* \param[in] iface Pointer to the algorithm interface to use.
|
||||||
* \param[in] cfg Configuration to use, if known. May be NULL.
|
* \param[in] cfg Configuration to use, if known. May be NULL.
|
||||||
* \param[in] flags Bitfield of VPX_CODEC_USE_* flags
|
* \param[in] flags Bitfield of VPX_CODEC_USE_* flags
|
||||||
* \param[in] ver ABI version number. Must be set to
|
* \param[in] ver ABI version number. Must be set to
|
||||||
* VPX_DECODER_ABI_VERSION
|
* VPX_DECODER_ABI_VERSION
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* The decoder algorithm initialized.
|
* The decoder algorithm initialized.
|
||||||
* \retval #VPX_CODEC_MEM_ERROR
|
* \retval #VPX_CODEC_MEM_ERROR
|
||||||
* Memory allocation failed.
|
* Memory allocation failed.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_iface_t *iface,
|
vpx_codec_iface_t *iface,
|
||||||
vpx_codec_dec_cfg_t *cfg,
|
vpx_codec_dec_cfg_t *cfg,
|
||||||
vpx_codec_flags_t flags,
|
vpx_codec_flags_t flags,
|
||||||
int ver);
|
int ver);
|
||||||
|
|
||||||
/*!\brief Convenience macro for vpx_codec_dec_init_ver()
|
/*!\brief Convenience macro for vpx_codec_dec_init_ver()
|
||||||
*
|
*
|
||||||
* Ensures the ABI version parameter is properly set.
|
* Ensures the ABI version parameter is properly set.
|
||||||
*/
|
*/
|
||||||
#define vpx_codec_dec_init(ctx, iface, cfg, flags) \
|
#define vpx_codec_dec_init(ctx, iface, cfg, flags) \
|
||||||
vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION)
|
vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION)
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Parse stream info from a buffer
|
/*!\brief Parse stream info from a buffer
|
||||||
*
|
*
|
||||||
* Performs high level parsing of the bitstream. Construction of a decoder
|
* Performs high level parsing of the bitstream. Construction of a decoder
|
||||||
* context is not necessary. Can be used to determine if the bitstream is
|
* context is not necessary. Can be used to determine if the bitstream is
|
||||||
* of the proper format, and to extract information from the stream.
|
* of the proper format, and to extract information from the stream.
|
||||||
*
|
*
|
||||||
* \param[in] iface Pointer to the algorithm interface
|
* \param[in] iface Pointer to the algorithm interface
|
||||||
* \param[in] data Pointer to a block of data to parse
|
* \param[in] data Pointer to a block of data to parse
|
||||||
* \param[in] data_sz Size of the data buffer
|
* \param[in] data_sz Size of the data buffer
|
||||||
* \param[in,out] si Pointer to stream info to update. The size member
|
* \param[in,out] si Pointer to stream info to update. The size member
|
||||||
* \ref MUST be properly initialized, but \ref MAY be
|
* \ref MUST be properly initialized, but \ref MAY be
|
||||||
* clobbered by the algorithm. This parameter \ref MAY
|
* clobbered by the algorithm. This parameter \ref MAY
|
||||||
* be NULL.
|
* be NULL.
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* Bitstream is parsable and stream information updated
|
* Bitstream is parsable and stream information updated
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
|
vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
|
||||||
const uint8_t *data,
|
const uint8_t *data,
|
||||||
unsigned int data_sz,
|
unsigned int data_sz,
|
||||||
vpx_codec_stream_info_t *si);
|
vpx_codec_stream_info_t *si);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return information about the current stream.
|
/*!\brief Return information about the current stream.
|
||||||
*
|
*
|
||||||
* Returns information about the stream that has been parsed during decoding.
|
* Returns information about the stream that has been parsed during decoding.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
* \param[in,out] si Pointer to stream info to update. The size member
|
* \param[in,out] si Pointer to stream info to update. The size member
|
||||||
* \ref MUST be properly initialized, but \ref MAY be
|
* \ref MUST be properly initialized, but \ref MAY be
|
||||||
* clobbered by the algorithm. This parameter \ref MAY
|
* clobbered by the algorithm. This parameter \ref MAY
|
||||||
* be NULL.
|
* be NULL.
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* Bitstream is parsable and stream information updated
|
* Bitstream is parsable and stream information updated
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_stream_info_t *si);
|
vpx_codec_stream_info_t *si);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Decode data
|
/*!\brief Decode data
|
||||||
*
|
*
|
||||||
* Processes a buffer of coded data. If the processing results in a new
|
* Processes a buffer of coded data. If the processing results in a new
|
||||||
* decoded frame becoming available, PUT_SLICE and PUT_FRAME events may be
|
* decoded frame becoming available, PUT_SLICE and PUT_FRAME events may be
|
||||||
* generated, as appropriate. Encoded data \ref MUST be passed in DTS (decode
|
* generated, as appropriate. Encoded data \ref MUST be passed in DTS (decode
|
||||||
* time stamp) order. Frames produced will always be in PTS (presentation
|
* time stamp) order. Frames produced will always be in PTS (presentation
|
||||||
* time stamp) order.
|
* time stamp) order.
|
||||||
* If the decoder is configured with VPX_CODEC_USE_INPUT_FRAGMENTS enabled,
|
* If the decoder is configured with VPX_CODEC_USE_INPUT_FRAGMENTS enabled,
|
||||||
* data and data_sz can contain a fragment of the encoded frame. Fragment
|
* data and data_sz can contain a fragment of the encoded frame. Fragment
|
||||||
* \#n must contain at least partition \#n, but can also contain subsequent
|
* \#n must contain at least partition \#n, but can also contain subsequent
|
||||||
* partitions (\#n+1 - \#n+i), and if so, fragments \#n+1, .., \#n+i must
|
* partitions (\#n+1 - \#n+i), and if so, fragments \#n+1, .., \#n+i must
|
||||||
* be empty. When no more data is available, this function should be called
|
* be empty. When no more data is available, this function should be called
|
||||||
* with NULL as data and 0 as data_sz. The memory passed to this function
|
* with NULL as data and 0 as data_sz. The memory passed to this function
|
||||||
* must be available until the frame has been decoded.
|
* must be available until the frame has been decoded.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
* \param[in] data Pointer to this block of new coded data. If
|
* \param[in] data Pointer to this block of new coded data. If
|
||||||
* NULL, a VPX_CODEC_CB_PUT_FRAME event is posted
|
* NULL, a VPX_CODEC_CB_PUT_FRAME event is posted
|
||||||
* for the previously decoded frame.
|
* for the previously decoded frame.
|
||||||
* \param[in] data_sz Size of the coded data, in bytes.
|
* \param[in] data_sz Size of the coded data, in bytes.
|
||||||
* \param[in] user_priv Application specific data to associate with
|
* \param[in] user_priv Application specific data to associate with
|
||||||
* this frame.
|
* this frame.
|
||||||
* \param[in] deadline Soft deadline the decoder should attempt to meet,
|
* \param[in] deadline Soft deadline the decoder should attempt to meet,
|
||||||
* in us. Set to zero for unlimited.
|
* in us. Set to zero for unlimited.
|
||||||
*
|
*
|
||||||
* \return Returns #VPX_CODEC_OK if the coded data was processed completely
|
* \return Returns #VPX_CODEC_OK if the coded data was processed completely
|
||||||
* and future pictures can be decoded without error. Otherwise,
|
* and future pictures can be decoded without error. Otherwise,
|
||||||
* see the descriptions of the other error codes in ::vpx_codec_err_t
|
* see the descriptions of the other error codes in ::vpx_codec_err_t
|
||||||
* for recoverability capabilities.
|
* for recoverability capabilities.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx,
|
||||||
const uint8_t *data,
|
const uint8_t *data,
|
||||||
unsigned int data_sz,
|
unsigned int data_sz,
|
||||||
void *user_priv,
|
void *user_priv,
|
||||||
long deadline);
|
long deadline);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Decoded frames iterator
|
/*!\brief Decoded frames iterator
|
||||||
*
|
*
|
||||||
* Iterates over a list of the frames available for display. The iterator
|
* Iterates over a list of the frames available for display. The iterator
|
||||||
* storage should be initialized to NULL to start the iteration. Iteration is
|
* storage should be initialized to NULL to start the iteration. Iteration is
|
||||||
* complete when this function returns NULL.
|
* complete when this function returns NULL.
|
||||||
*
|
*
|
||||||
* The list of available frames becomes valid upon completion of the
|
* The list of available frames becomes valid upon completion of the
|
||||||
* vpx_codec_decode call, and remains valid until the next call to vpx_codec_decode.
|
* vpx_codec_decode call, and remains valid until the next call to vpx_codec_decode.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
* \param[in,out] iter Iterator storage, initialized to NULL
|
* \param[in,out] iter Iterator storage, initialized to NULL
|
||||||
*
|
*
|
||||||
* \return Returns a pointer to an image, if one is ready for display. Frames
|
* \return Returns a pointer to an image, if one is ready for display. Frames
|
||||||
* produced will always be in PTS (presentation time stamp) order.
|
* produced will always be in PTS (presentation time stamp) order.
|
||||||
*/
|
*/
|
||||||
vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx,
|
vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_iter_t *iter);
|
vpx_codec_iter_t *iter);
|
||||||
|
|
||||||
|
|
||||||
/*!\defgroup cap_put_frame Frame-Based Decoding Functions
|
/*!\defgroup cap_put_frame Frame-Based Decoding Functions
|
||||||
*
|
*
|
||||||
* The following functions are required to be implemented for all decoders
|
* The following functions are required to be implemented for all decoders
|
||||||
* that advertise the VPX_CODEC_CAP_PUT_FRAME capability. Calling these functions
|
* that advertise the VPX_CODEC_CAP_PUT_FRAME capability. Calling these functions
|
||||||
* for codecs that don't advertise this capability will result in an error
|
* for codecs that don't advertise this capability will result in an error
|
||||||
* code being returned, usually VPX_CODEC_ERROR
|
* code being returned, usually VPX_CODEC_ERROR
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!\brief put frame callback prototype
|
/*!\brief put frame callback prototype
|
||||||
*
|
*
|
||||||
* This callback is invoked by the decoder to notify the application of
|
* This callback is invoked by the decoder to notify the application of
|
||||||
* the availability of decoded image data.
|
* the availability of decoded image data.
|
||||||
*/
|
*/
|
||||||
typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv,
|
typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv,
|
||||||
const vpx_image_t *img);
|
const vpx_image_t *img);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Register for notification of frame completion.
|
/*!\brief Register for notification of frame completion.
|
||||||
*
|
*
|
||||||
* Registers a given function to be called when a decoded frame is
|
* Registers a given function to be called when a decoded frame is
|
||||||
* available.
|
* available.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
* \param[in] cb Pointer to the callback function
|
* \param[in] cb Pointer to the callback function
|
||||||
* \param[in] user_priv User's private data
|
* \param[in] user_priv User's private data
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* Callback successfully registered.
|
* Callback successfully registered.
|
||||||
* \retval #VPX_CODEC_ERROR
|
* \retval #VPX_CODEC_ERROR
|
||||||
* Decoder context not initialized, or algorithm not capable of
|
* Decoder context not initialized, or algorithm not capable of
|
||||||
* posting slice completion.
|
* posting slice completion.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_put_frame_cb_fn_t cb,
|
vpx_codec_put_frame_cb_fn_t cb,
|
||||||
void *user_priv);
|
void *user_priv);
|
||||||
|
|
||||||
|
|
||||||
/*!@} - end defgroup cap_put_frame */
|
/*!@} - end defgroup cap_put_frame */
|
||||||
|
|
||||||
/*!\defgroup cap_put_slice Slice-Based Decoding Functions
|
/*!\defgroup cap_put_slice Slice-Based Decoding Functions
|
||||||
*
|
*
|
||||||
* The following functions are required to be implemented for all decoders
|
* The following functions are required to be implemented for all decoders
|
||||||
* that advertise the VPX_CODEC_CAP_PUT_SLICE capability. Calling these functions
|
* that advertise the VPX_CODEC_CAP_PUT_SLICE capability. Calling these functions
|
||||||
* for codecs that don't advertise this capability will result in an error
|
* for codecs that don't advertise this capability will result in an error
|
||||||
* code being returned, usually VPX_CODEC_ERROR
|
* code being returned, usually VPX_CODEC_ERROR
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!\brief put slice callback prototype
|
/*!\brief put slice callback prototype
|
||||||
*
|
*
|
||||||
* This callback is invoked by the decoder to notify the application of
|
* This callback is invoked by the decoder to notify the application of
|
||||||
* the availability of partially decoded image data. The
|
* the availability of partially decoded image data. The
|
||||||
*/
|
*/
|
||||||
typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv,
|
typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv,
|
||||||
const vpx_image_t *img,
|
const vpx_image_t *img,
|
||||||
const vpx_image_rect_t *valid,
|
const vpx_image_rect_t *valid,
|
||||||
const vpx_image_rect_t *update);
|
const vpx_image_rect_t *update);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Register for notification of slice completion.
|
/*!\brief Register for notification of slice completion.
|
||||||
*
|
*
|
||||||
* Registers a given function to be called when a decoded slice is
|
* Registers a given function to be called when a decoded slice is
|
||||||
* available.
|
* available.
|
||||||
*
|
*
|
||||||
* \param[in] ctx Pointer to this instance's context
|
* \param[in] ctx Pointer to this instance's context
|
||||||
* \param[in] cb Pointer to the callback function
|
* \param[in] cb Pointer to the callback function
|
||||||
* \param[in] user_priv User's private data
|
* \param[in] user_priv User's private data
|
||||||
*
|
*
|
||||||
* \retval #VPX_CODEC_OK
|
* \retval #VPX_CODEC_OK
|
||||||
* Callback successfully registered.
|
* Callback successfully registered.
|
||||||
* \retval #VPX_CODEC_ERROR
|
* \retval #VPX_CODEC_ERROR
|
||||||
* Decoder context not initialized, or algorithm not capable of
|
* Decoder context not initialized, or algorithm not capable of
|
||||||
* posting slice completion.
|
* posting slice completion.
|
||||||
*/
|
*/
|
||||||
vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx,
|
vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx,
|
||||||
vpx_codec_put_slice_cb_fn_t cb,
|
vpx_codec_put_slice_cb_fn_t cb,
|
||||||
void *user_priv);
|
void *user_priv);
|
||||||
|
|
||||||
|
|
||||||
/*!@} - end defgroup cap_put_slice*/
|
/*!@} - end defgroup cap_put_slice*/
|
||||||
|
|
||||||
/*!@} - end defgroup decoder*/
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
/*!@} - end defgroup decoder*/
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif // VPX_VPX_DECODER_H_
|
||||||
|
|
||||||
|
|
|
@ -1,587 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*!\defgroup decoder Common Decoder Algorithm Interface
|
|
||||||
* This abstraction allows applications using this decoder to easily support
|
|
||||||
* multiple video formats with minimal code duplication. This section describes
|
|
||||||
* the interface common to all codecs.
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!\file
|
|
||||||
* \brief Provides a compatibility layer between version 1 and 2 of this API.
|
|
||||||
*
|
|
||||||
* This interface has been deprecated. Only existing code should make use
|
|
||||||
* of this interface, and therefore, it is only thinly documented. Existing
|
|
||||||
* code should be ported to the vpx_codec_* API.
|
|
||||||
*/
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef VPX_DECODER_COMPAT_H
|
|
||||||
#define VPX_DECODER_COMPAT_H
|
|
||||||
|
|
||||||
/*!\brief Decoder algorithm return codes */
|
|
||||||
typedef enum {
|
|
||||||
/*!\brief Operation completed without error */
|
|
||||||
VPX_DEC_OK = VPX_CODEC_OK,
|
|
||||||
|
|
||||||
/*!\brief Unspecified error */
|
|
||||||
VPX_DEC_ERROR = VPX_CODEC_ERROR,
|
|
||||||
|
|
||||||
/*!\brief Memory operation failed */
|
|
||||||
VPX_DEC_MEM_ERROR = VPX_CODEC_MEM_ERROR,
|
|
||||||
|
|
||||||
/*!\brief ABI version mismatch */
|
|
||||||
VPX_DEC_ABI_MISMATCH = VPX_CODEC_ABI_MISMATCH,
|
|
||||||
|
|
||||||
/*!\brief The given bitstream is not supported.
|
|
||||||
*
|
|
||||||
* The bitstream was unable to be parsed at the highest level. The decoder
|
|
||||||
* is unable to proceed. This error \ref SHOULD be treated as fatal to the
|
|
||||||
* stream. */
|
|
||||||
VPX_DEC_UNSUP_BITSTREAM = VPX_CODEC_UNSUP_BITSTREAM,
|
|
||||||
|
|
||||||
/*!\brief Encoded bitstream uses an unsupported feature
|
|
||||||
*
|
|
||||||
* The decoder does not implement a feature required by the encoder. This
|
|
||||||
* return code should only be used for features that prevent future
|
|
||||||
* pictures from being properly decoded. This error \ref MAY be treated as
|
|
||||||
* fatal to the stream or \ref MAY be treated as fatal to the current GOP.
|
|
||||||
*/
|
|
||||||
VPX_DEC_UNSUP_FEATURE = VPX_CODEC_UNSUP_FEATURE,
|
|
||||||
|
|
||||||
/*!\brief The coded data for this stream is corrupt or incomplete
|
|
||||||
*
|
|
||||||
* There was a problem decoding the current frame. This return code
|
|
||||||
* should only be used for failures that prevent future pictures from
|
|
||||||
* being properly decoded. This error \ref MAY be treated as fatal to the
|
|
||||||
* stream or \ref MAY be treated as fatal to the current GOP. If decoding
|
|
||||||
* is continued for the current GOP, artifacts may be present.
|
|
||||||
*/
|
|
||||||
VPX_DEC_CORRUPT_FRAME = VPX_CODEC_CORRUPT_FRAME,
|
|
||||||
|
|
||||||
/*!\brief An application-supplied parameter is not valid.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
VPX_DEC_INVALID_PARAM = VPX_CODEC_INVALID_PARAM,
|
|
||||||
|
|
||||||
/*!\brief An iterator reached the end of list.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
VPX_DEC_LIST_END = VPX_CODEC_LIST_END
|
|
||||||
|
|
||||||
}
|
|
||||||
vpx_dec_err_t;
|
|
||||||
|
|
||||||
/*! \brief Decoder capabilities bitfield
|
|
||||||
*
|
|
||||||
* Each decoder advertises the capabilities it supports as part of its
|
|
||||||
* ::vpx_dec_iface_t interface structure. Capabilities are extra interfaces
|
|
||||||
* or functionality, and are not required to be supported by a decoder.
|
|
||||||
*
|
|
||||||
* The available flags are specified by VPX_DEC_CAP_* defines.
|
|
||||||
*/
|
|
||||||
typedef int vpx_dec_caps_t;
|
|
||||||
#define VPX_DEC_CAP_PUT_SLICE 0x0001 /**< Will issue put_slice callbacks */
|
|
||||||
#define VPX_DEC_CAP_PUT_FRAME 0x0002 /**< Will issue put_frame callbacks */
|
|
||||||
#define VPX_DEC_CAP_XMA 0x0004 /**< Supports eXternal Memory Allocation */
|
|
||||||
|
|
||||||
/*!\brief Stream properties
|
|
||||||
*
|
|
||||||
* This structure is used to query or set properties of the decoded
|
|
||||||
* stream. Algorithms may extend this structure with data specific
|
|
||||||
* to their bitstream by setting the sz member appropriately.
|
|
||||||
*/
|
|
||||||
#if 1
|
|
||||||
typedef vpx_codec_stream_info_t vpx_dec_stream_info_t;
|
|
||||||
#else
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned int sz; /**< Size of this structure */
|
|
||||||
unsigned int w; /**< Width (or 0 for unknown/default) */
|
|
||||||
unsigned int h; /**< Height (or 0 for unknown/default) */
|
|
||||||
unsigned int is_kf; /**< Current frame is a keyframe */
|
|
||||||
} vpx_dec_stream_info_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Decoder interface structure.
|
|
||||||
*
|
|
||||||
* Contains function pointers and other data private to the decoder
|
|
||||||
* implementation. This structure is opaque to the application.
|
|
||||||
*/
|
|
||||||
typedef const struct vpx_codec_iface vpx_dec_iface_t;
|
|
||||||
typedef struct vpx_codec_priv vpx_dec_priv_t;
|
|
||||||
|
|
||||||
/*!\brief Iterator
|
|
||||||
*
|
|
||||||
* Opaque storage used for iterating over lists.
|
|
||||||
*/
|
|
||||||
typedef vpx_codec_iter_t vpx_dec_iter_t;
|
|
||||||
|
|
||||||
/*!\brief Decoder context structure
|
|
||||||
*
|
|
||||||
* All decoders \ref MUST support this context structure fully. In general,
|
|
||||||
* this data should be considered private to the decoder algorithm, and
|
|
||||||
* not be manipulated or examined by the calling application. Applications
|
|
||||||
* may reference the 'name' member to get a printable description of the
|
|
||||||
* algorithm.
|
|
||||||
*/
|
|
||||||
#if 1
|
|
||||||
typedef vpx_codec_ctx_t vpx_dec_ctx_t;
|
|
||||||
#else
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
const char *name; /**< Printable interface name */
|
|
||||||
vpx_dec_iface_t *iface; /**< Interface pointers */
|
|
||||||
vpx_dec_err_t err; /**< Last returned error */
|
|
||||||
vpx_dec_priv_t *priv; /**< Algorithm private storage */
|
|
||||||
} vpx_dec_ctx_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return the build configuration
|
|
||||||
*
|
|
||||||
* Returns a printable string containing an encoded version of the build
|
|
||||||
* configuration. This may be useful to vpx support.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
const char *vpx_dec_build_config(void) DEPRECATED;
|
|
||||||
|
|
||||||
/*!\brief Return the name for a given interface
|
|
||||||
*
|
|
||||||
* Returns a human readable string for name of the given decoder interface.
|
|
||||||
*
|
|
||||||
* \param[in] iface Interface pointer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
const char *vpx_dec_iface_name(vpx_dec_iface_t *iface) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Convert error number to printable string
|
|
||||||
*
|
|
||||||
* Returns a human readable string for the last error returned by the
|
|
||||||
* algorithm. The returned error will be one line and will not contain
|
|
||||||
* any newline characters.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* \param[in] err Error number.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
const char *vpx_dec_err_to_string(vpx_dec_err_t err) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Retrieve error synopsis for decoder context
|
|
||||||
*
|
|
||||||
* Returns a human readable string for the last error returned by the
|
|
||||||
* algorithm. The returned error will be one line and will not contain
|
|
||||||
* any newline characters.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
const char *vpx_dec_error(vpx_dec_ctx_t *ctx) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Retrieve detailed error information for decoder context
|
|
||||||
*
|
|
||||||
* Returns a human readable string providing detailed information about
|
|
||||||
* the last error.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
|
||||||
*
|
|
||||||
* \retval NULL
|
|
||||||
* No detailed information is available.
|
|
||||||
*/
|
|
||||||
const char *vpx_dec_error_detail(vpx_dec_ctx_t *ctx) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/* REQUIRED FUNCTIONS
|
|
||||||
*
|
|
||||||
* The following functions are required to be implemented for all decoders.
|
|
||||||
* They represent the base case functionality expected of all decoders.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Initialize a decoder instance
|
|
||||||
*
|
|
||||||
* Initializes a decoder context using the given interface. Applications
|
|
||||||
* should call the vpx_dec_init convenience macro instead of this
|
|
||||||
* function directly, to ensure that the ABI version number parameter
|
|
||||||
* is properly initialized.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
|
||||||
* \param[in] iface Pointer to the algorithm interface to use.
|
|
||||||
* \param[in] ver ABI version number. Must be set to
|
|
||||||
* VPX_DECODER_ABI_VERSION
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* The decoder algorithm initialized.
|
|
||||||
* \retval #VPX_DEC_MEM_ERROR
|
|
||||||
* Memory allocation failed.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_init_ver(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_iface_t *iface,
|
|
||||||
int ver) DEPRECATED;
|
|
||||||
#define vpx_dec_init(ctx, iface) \
|
|
||||||
vpx_dec_init_ver(ctx, iface, VPX_DECODER_ABI_VERSION)
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Destroy a decoder instance
|
|
||||||
*
|
|
||||||
* Destroys a decoder context, freeing any associated memory buffers.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* The decoder algorithm initialized.
|
|
||||||
* \retval #VPX_DEC_MEM_ERROR
|
|
||||||
* Memory allocation failed.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_destroy(vpx_dec_ctx_t *ctx) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Get the capabilities of an algorithm.
|
|
||||||
*
|
|
||||||
* Retrieves the capabilities bitfield from the algorithm's interface.
|
|
||||||
*
|
|
||||||
* \param[in] iface Pointer to the algorithm interface
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
vpx_dec_caps_t vpx_dec_get_caps(vpx_dec_iface_t *iface) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Parse stream info from a buffer
|
|
||||||
*
|
|
||||||
* Performs high level parsing of the bitstream. Construction of a decoder
|
|
||||||
* context is not necessary. Can be used to determine if the bitstream is
|
|
||||||
* of the proper format, and to extract information from the stream.
|
|
||||||
*
|
|
||||||
* \param[in] iface Pointer to the algorithm interface
|
|
||||||
* \param[in] data Pointer to a block of data to parse
|
|
||||||
* \param[in] data_sz Size of the data buffer
|
|
||||||
* \param[in,out] si Pointer to stream info to update. The size member
|
|
||||||
* \ref MUST be properly initialized, but \ref MAY be
|
|
||||||
* clobbered by the algorithm. This parameter \ref MAY
|
|
||||||
* be NULL.
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* Bitstream is parsable and stream information updated
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_peek_stream_info(vpx_dec_iface_t *iface,
|
|
||||||
const uint8_t *data,
|
|
||||||
unsigned int data_sz,
|
|
||||||
vpx_dec_stream_info_t *si) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Return information about the current stream.
|
|
||||||
*
|
|
||||||
* Returns information about the stream that has been parsed during decoding.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
* \param[in,out] si Pointer to stream info to update. The size member
|
|
||||||
* \ref MUST be properly initialized, but \ref MAY be
|
|
||||||
* clobbered by the algorithm. This parameter \ref MAY
|
|
||||||
* be NULL.
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* Bitstream is parsable and stream information updated
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_get_stream_info(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_stream_info_t *si) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Control algorithm
|
|
||||||
*
|
|
||||||
* This function is used to exchange algorithm specific data with the decoder
|
|
||||||
* instance. This can be used to implement features specific to a particular
|
|
||||||
* algorithm.
|
|
||||||
*
|
|
||||||
* This wrapper function dispatches the request to the helper function
|
|
||||||
* associated with the given ctrl_id. It tries to call this function
|
|
||||||
* transparently, but will return #VPX_DEC_ERROR if the request could not
|
|
||||||
* be dispatched.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
* \param[in] ctrl_id Algorithm specific control identifier
|
|
||||||
* \param[in,out] data Data to exchange with algorithm instance.
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* The control request was processed.
|
|
||||||
* \retval #VPX_DEC_ERROR
|
|
||||||
* The control request was not processed.
|
|
||||||
* \retval #VPX_DEC_INVALID_PARAM
|
|
||||||
* The data was not valid.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_control(vpx_dec_ctx_t *ctx,
|
|
||||||
int ctrl_id,
|
|
||||||
void *data) DEPRECATED;
|
|
||||||
|
|
||||||
/*!\brief Decode data
|
|
||||||
*
|
|
||||||
* Processes a buffer of coded data. If the processing results in a new
|
|
||||||
* decoded frame becoming available, #VPX_DEC_CB_PUT_SLICE and
|
|
||||||
* #VPX_DEC_CB_PUT_FRAME events may be generated, as appropriate. Encoded data
|
|
||||||
* \ref MUST be passed in DTS (decode time stamp) order. Frames produced will
|
|
||||||
* always be in PTS (presentation time stamp) order.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
* \param[in] data Pointer to this block of new coded data. If
|
|
||||||
* NULL, a VPX_DEC_CB_PUT_FRAME event is posted
|
|
||||||
* for the previously decoded frame.
|
|
||||||
* \param[in] data_sz Size of the coded data, in bytes.
|
|
||||||
* \param[in] user_priv Application specific data to associate with
|
|
||||||
* this frame.
|
|
||||||
* \param[in] rel_pts PTS relative to the previous frame, in us. If
|
|
||||||
* unknown or unavailable, set to zero.
|
|
||||||
*
|
|
||||||
* \return Returns #VPX_DEC_OK if the coded data was processed completely
|
|
||||||
* and future pictures can be decoded without error. Otherwise,
|
|
||||||
* see the descriptions of the other error codes in ::vpx_dec_err_t
|
|
||||||
* for recoverability capabilities.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_decode(vpx_dec_ctx_t *ctx,
|
|
||||||
uint8_t *data,
|
|
||||||
unsigned int data_sz,
|
|
||||||
void *user_priv,
|
|
||||||
int rel_pts) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Decoded frames iterator
|
|
||||||
*
|
|
||||||
* Iterates over a list of the frames available for display. The iterator
|
|
||||||
* storage should be initialized to NULL to start the iteration. Iteration is
|
|
||||||
* complete when this function returns NULL.
|
|
||||||
*
|
|
||||||
* The list of available frames becomes valid upon completion of the
|
|
||||||
* vpx_dec_decode call, and remains valid until the next call to vpx_dec_decode.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
* \param[in out] iter Iterator storage, initialized to NULL
|
|
||||||
*
|
|
||||||
* \return Returns a pointer to an image, if one is ready for display. Frames
|
|
||||||
* produced will always be in PTS (presentation time stamp) order.
|
|
||||||
*/
|
|
||||||
vpx_image_t *vpx_dec_get_frame(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_iter_t *iter) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\defgroup cap_put_frame Frame-Based Decoding Functions
|
|
||||||
*
|
|
||||||
* The following functions are required to be implemented for all decoders
|
|
||||||
* that advertise the VPX_DEC_CAP_PUT_FRAME capability. Calling these functions
|
|
||||||
* for codecs that don't advertise this capability will result in an error
|
|
||||||
* code being returned, usually VPX_DEC_ERROR
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!\brief put frame callback prototype
|
|
||||||
*
|
|
||||||
* This callback is invoked by the decoder to notify the application of
|
|
||||||
* the availability of decoded image data.
|
|
||||||
*/
|
|
||||||
typedef void (*vpx_dec_put_frame_cb_fn_t)(void *user_priv,
|
|
||||||
const vpx_image_t *img);
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Register for notification of frame completion.
|
|
||||||
*
|
|
||||||
* Registers a given function to be called when a decoded frame is
|
|
||||||
* available.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
* \param[in] cb Pointer to the callback function
|
|
||||||
* \param[in] user_priv User's private data
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* Callback successfully registered.
|
|
||||||
* \retval #VPX_DEC_ERROR
|
|
||||||
* Decoder context not initialized, or algorithm not capable of
|
|
||||||
* posting slice completion.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_register_put_frame_cb(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_put_frame_cb_fn_t cb,
|
|
||||||
void *user_priv) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!@} - end defgroup cap_put_frame */
|
|
||||||
|
|
||||||
/*!\defgroup cap_put_slice Slice-Based Decoding Functions
|
|
||||||
*
|
|
||||||
* The following functions are required to be implemented for all decoders
|
|
||||||
* that advertise the VPX_DEC_CAP_PUT_SLICE capability. Calling these functions
|
|
||||||
* for codecs that don't advertise this capability will result in an error
|
|
||||||
* code being returned, usually VPX_DEC_ERROR
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!\brief put slice callback prototype
|
|
||||||
*
|
|
||||||
* This callback is invoked by the decoder to notify the application of
|
|
||||||
* the availability of partially decoded image data. The
|
|
||||||
*/
|
|
||||||
typedef void (*vpx_dec_put_slice_cb_fn_t)(void *user_priv,
|
|
||||||
const vpx_image_t *img,
|
|
||||||
const vpx_image_rect_t *valid,
|
|
||||||
const vpx_image_rect_t *update);
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Register for notification of slice completion.
|
|
||||||
*
|
|
||||||
* Registers a given function to be called when a decoded slice is
|
|
||||||
* available.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context
|
|
||||||
* \param[in] cb Pointer to the callback function
|
|
||||||
* \param[in] user_priv User's private data
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* Callback successfully registered.
|
|
||||||
* \retval #VPX_DEC_ERROR
|
|
||||||
* Decoder context not initialized, or algorithm not capable of
|
|
||||||
* posting slice completion.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_register_put_slice_cb(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_put_slice_cb_fn_t cb,
|
|
||||||
void *user_priv) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!@} - end defgroup cap_put_slice*/
|
|
||||||
|
|
||||||
/*!\defgroup cap_xma External Memory Allocation Functions
|
|
||||||
*
|
|
||||||
* The following functions are required to be implemented for all decoders
|
|
||||||
* that advertise the VPX_DEC_CAP_XMA capability. Calling these functions
|
|
||||||
* for codecs that don't advertise this capability will result in an error
|
|
||||||
* code being returned, usually VPX_DEC_ERROR
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!\brief Memory Map Entry
|
|
||||||
*
|
|
||||||
* This structure is used to contain the properties of a memory segment. It
|
|
||||||
* is populated by the decoder in the request phase, and by the calling
|
|
||||||
* application once the requested allocation has been performed.
|
|
||||||
*/
|
|
||||||
#if 1
|
|
||||||
#define VPX_DEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */
|
|
||||||
#define VPX_DEC_MEM_WRONLY 0x2 /**< Segment need not be readable */
|
|
||||||
#define VPX_DEC_MEM_FAST 0x4 /**< Place in fast memory, if available */
|
|
||||||
typedef struct vpx_codec_mmap vpx_dec_mmap_t;
|
|
||||||
#else
|
|
||||||
typedef struct vpx_dec_mmap
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* The following members are set by the codec when requesting a segment
|
|
||||||
*/
|
|
||||||
unsigned int id; /**< identifier for the segment's contents */
|
|
||||||
unsigned long sz; /**< size of the segment, in bytes */
|
|
||||||
unsigned int align; /**< required alignment of the segment, in bytes */
|
|
||||||
unsigned int flags; /**< bitfield containing segment properties */
|
|
||||||
#define VPX_DEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */
|
|
||||||
#define VPX_DEC_MEM_WRONLY 0x2 /**< Segment need not be readable */
|
|
||||||
#define VPX_DEC_MEM_FAST 0x4 /**< Place in fast memory, if available */
|
|
||||||
|
|
||||||
/* The following members are to be filled in by the allocation function */
|
|
||||||
void *base; /**< pointer to the allocated segment */
|
|
||||||
void (*dtor)(struct vpx_dec_mmap *map); /**< destructor to call */
|
|
||||||
void *priv; /**< allocator private storage */
|
|
||||||
} vpx_dec_mmap_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!\brief Initialize a decoder instance in external allocation mode
|
|
||||||
*
|
|
||||||
* Initializes a decoder context using the given interface. Applications
|
|
||||||
* should call the vpx_dec_xma_init convenience macro instead of this
|
|
||||||
* function directly, to ensure that the ABI version number parameter
|
|
||||||
* is properly initialized.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
|
||||||
* \param[in] iface Pointer to the algorithm interface to use.
|
|
||||||
* \param[in] ver ABI version number. Must be set to
|
|
||||||
* VPX_DECODER_ABI_VERSION
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* The decoder algorithm initialized.
|
|
||||||
* \retval #VPX_DEC_ERROR
|
|
||||||
* Decoder does not support XMA mode.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_xma_init_ver(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_iface_t *iface,
|
|
||||||
int ver) DEPRECATED;
|
|
||||||
#define vpx_dec_xma_init(ctx, iface) \
|
|
||||||
vpx_dec_xma_init_ver(ctx, iface, VPX_DECODER_ABI_VERSION)
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Iterate over the list of segments to allocate.
|
|
||||||
*
|
|
||||||
* Iterates over a list of the segments to allocate. The iterator storage
|
|
||||||
* should be initialized to NULL to start the iteration. Iteration is complete
|
|
||||||
* when this function returns VPX_DEC_LIST_END. The amount of memory needed to
|
|
||||||
* allocate is dependent upon the size of the encoded stream. This means that
|
|
||||||
* the stream info structure must be known at allocation time. It can be
|
|
||||||
* populated with the vpx_dec_peek_stream_info() function. In cases where the
|
|
||||||
* stream to be decoded is not available at allocation time, a fixed size must
|
|
||||||
* be requested. The decoder will not be able to decode streams larger than
|
|
||||||
* the size used at allocation time.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
|
||||||
* \param[out] mmap Pointer to the memory map entry to populate.
|
|
||||||
* \param[in] si Pointer to the stream info.
|
|
||||||
* \param[in out] iter Iterator storage, initialized to NULL
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* The memory map entry was populated.
|
|
||||||
* \retval #VPX_DEC_ERROR
|
|
||||||
* Decoder does not support XMA mode.
|
|
||||||
* \retval #VPX_DEC_MEM_ERROR
|
|
||||||
* Unable to determine segment size from stream info.
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_get_mem_map(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_mmap_t *mmap,
|
|
||||||
const vpx_dec_stream_info_t *si,
|
|
||||||
vpx_dec_iter_t *iter) DEPRECATED;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Identify allocated segments to decoder instance
|
|
||||||
*
|
|
||||||
* Stores a list of allocated segments in the decoder. Segments \ref MUST be
|
|
||||||
* passed in the order they are read from vpx_dec_get_mem_map(), but may be
|
|
||||||
* passed in groups of any size. Segments \ref MUST be set only once. The
|
|
||||||
* allocation function \ref MUST ensure that the vpx_dec_mmap_t::base member
|
|
||||||
* is non-NULL. If the segment requires cleanup handling (e.g., calling free()
|
|
||||||
* or close()) then the vpx_dec_mmap_t::dtor member \ref MUST be populated.
|
|
||||||
*
|
|
||||||
* \param[in] ctx Pointer to this instance's context.
|
|
||||||
* \param[in] mmaps Pointer to the first memory map entry in the list.
|
|
||||||
* \param[in] num_maps Number of entries being set at this time
|
|
||||||
*
|
|
||||||
* \retval #VPX_DEC_OK
|
|
||||||
* The segment was stored in the decoder context.
|
|
||||||
* \retval #VPX_DEC_ERROR
|
|
||||||
* Decoder does not support XMA mode.
|
|
||||||
* \retval #VPX_DEC_MEM_ERROR
|
|
||||||
* Segment base address was not set, or segment was already stored.
|
|
||||||
|
|
||||||
*/
|
|
||||||
vpx_dec_err_t vpx_dec_set_mem_map(vpx_dec_ctx_t *ctx,
|
|
||||||
vpx_dec_mmap_t *mmaps,
|
|
||||||
unsigned int num_maps) DEPRECATED;
|
|
||||||
|
|
||||||
/*!@} - end defgroup cap_xma*/
|
|
||||||
/*!@} - end defgroup decoder*/
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -13,21 +13,21 @@
|
||||||
* \brief Describes the vpx image descriptor and associated operations
|
* \brief Describes the vpx image descriptor and associated operations
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#ifndef VPX_VPX_IMAGE_H_
|
||||||
|
#define VPX_VPX_IMAGE_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VPX_IMAGE_H
|
/*!\brief Current ABI version number
|
||||||
#define VPX_IMAGE_H
|
*
|
||||||
|
* \internal
|
||||||
/*!\brief Current ABI version number
|
* If this file is altered in any way that changes the ABI, this value
|
||||||
*
|
* must be bumped. Examples include, but are not limited to, changing
|
||||||
* \internal
|
* types, removing or reassigning enums, adding/removing/rearranging
|
||||||
* If this file is altered in any way that changes the ABI, this value
|
* fields to structures
|
||||||
* must be bumped. Examples include, but are not limited to, changing
|
*/
|
||||||
* types, removing or reassigning enums, adding/removing/rearranging
|
|
||||||
* fields to structures
|
|
||||||
*/
|
|
||||||
#define VPX_IMAGE_ABI_VERSION (1) /**<\hideinitializer*/
|
#define VPX_IMAGE_ABI_VERSION (1) /**<\hideinitializer*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,41 +36,43 @@ extern "C" {
|
||||||
#define VPX_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel component */
|
#define VPX_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel component */
|
||||||
|
|
||||||
|
|
||||||
/*!\brief List of supported image formats */
|
/*!\brief List of supported image formats */
|
||||||
typedef enum vpx_img_fmt {
|
typedef enum vpx_img_fmt {
|
||||||
VPX_IMG_FMT_NONE,
|
VPX_IMG_FMT_NONE,
|
||||||
VPX_IMG_FMT_RGB24, /**< 24 bit per pixel packed RGB */
|
VPX_IMG_FMT_RGB24, /**< 24 bit per pixel packed RGB */
|
||||||
VPX_IMG_FMT_RGB32, /**< 32 bit per pixel packed 0RGB */
|
VPX_IMG_FMT_RGB32, /**< 32 bit per pixel packed 0RGB */
|
||||||
VPX_IMG_FMT_RGB565, /**< 16 bit per pixel, 565 */
|
VPX_IMG_FMT_RGB565, /**< 16 bit per pixel, 565 */
|
||||||
VPX_IMG_FMT_RGB555, /**< 16 bit per pixel, 555 */
|
VPX_IMG_FMT_RGB555, /**< 16 bit per pixel, 555 */
|
||||||
VPX_IMG_FMT_UYVY, /**< UYVY packed YUV */
|
VPX_IMG_FMT_UYVY, /**< UYVY packed YUV */
|
||||||
VPX_IMG_FMT_YUY2, /**< YUYV packed YUV */
|
VPX_IMG_FMT_YUY2, /**< YUYV packed YUV */
|
||||||
VPX_IMG_FMT_YVYU, /**< YVYU packed YUV */
|
VPX_IMG_FMT_YVYU, /**< YVYU packed YUV */
|
||||||
VPX_IMG_FMT_BGR24, /**< 24 bit per pixel packed BGR */
|
VPX_IMG_FMT_BGR24, /**< 24 bit per pixel packed BGR */
|
||||||
VPX_IMG_FMT_RGB32_LE, /**< 32 bit packed BGR0 */
|
VPX_IMG_FMT_RGB32_LE, /**< 32 bit packed BGR0 */
|
||||||
VPX_IMG_FMT_ARGB, /**< 32 bit packed ARGB, alpha=255 */
|
VPX_IMG_FMT_ARGB, /**< 32 bit packed ARGB, alpha=255 */
|
||||||
VPX_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */
|
VPX_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */
|
||||||
VPX_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */
|
VPX_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */
|
||||||
VPX_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */
|
VPX_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */
|
||||||
VPX_IMG_FMT_YV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */
|
VPX_IMG_FMT_YV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */
|
||||||
VPX_IMG_FMT_I420 = VPX_IMG_FMT_PLANAR | 2,
|
VPX_IMG_FMT_I420 = VPX_IMG_FMT_PLANAR | 2,
|
||||||
VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < planar 4:2:0 format with vpx color space */
|
VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < planar 4:2:0 format with vpx color space */
|
||||||
VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4 /** < planar 4:2:0 format with vpx color space */
|
VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4,
|
||||||
}
|
VPX_IMG_FMT_I422 = VPX_IMG_FMT_PLANAR | 5,
|
||||||
vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */
|
VPX_IMG_FMT_I444 = VPX_IMG_FMT_PLANAR | 6,
|
||||||
|
VPX_IMG_FMT_444A = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_HAS_ALPHA | 7
|
||||||
|
} vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */
|
||||||
|
|
||||||
#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT
|
#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT
|
||||||
#define IMG_FMT_PLANAR VPX_IMG_FMT_PLANAR /**< \deprecated Use #VPX_IMG_FMT_PLANAR */
|
#define IMG_FMT_PLANAR VPX_IMG_FMT_PLANAR /**< \deprecated Use #VPX_IMG_FMT_PLANAR */
|
||||||
#define IMG_FMT_UV_FLIP VPX_IMG_FMT_UV_FLIP /**< \deprecated Use #VPX_IMG_FMT_UV_FLIP */
|
#define IMG_FMT_UV_FLIP VPX_IMG_FMT_UV_FLIP /**< \deprecated Use #VPX_IMG_FMT_UV_FLIP */
|
||||||
#define IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA /**< \deprecated Use #VPX_IMG_FMT_HAS_ALPHA */
|
#define IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA /**< \deprecated Use #VPX_IMG_FMT_HAS_ALPHA */
|
||||||
|
|
||||||
/*!\brief Deprecated list of supported image formats
|
/*!\brief Deprecated list of supported image formats
|
||||||
* \deprecated New code should use #vpx_img_fmt
|
* \deprecated New code should use #vpx_img_fmt
|
||||||
*/
|
*/
|
||||||
#define img_fmt vpx_img_fmt
|
#define img_fmt vpx_img_fmt
|
||||||
/*!\brief alias for enum img_fmt.
|
/*!\brief alias for enum img_fmt.
|
||||||
* \deprecated New code should use #vpx_img_fmt_t
|
* \deprecated New code should use #vpx_img_fmt_t
|
||||||
*/
|
*/
|
||||||
#define img_fmt_t vpx_img_fmt_t
|
#define img_fmt_t vpx_img_fmt_t
|
||||||
|
|
||||||
#define IMG_FMT_NONE VPX_IMG_FMT_NONE /**< \deprecated Use #VPX_IMG_FMT_NONE */
|
#define IMG_FMT_NONE VPX_IMG_FMT_NONE /**< \deprecated Use #VPX_IMG_FMT_NONE */
|
||||||
|
@ -93,24 +95,23 @@ extern "C" {
|
||||||
#define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420 /**< \deprecated Use #VPX_IMG_FMT_VPXI420 */
|
#define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420 /**< \deprecated Use #VPX_IMG_FMT_VPXI420 */
|
||||||
#endif /* VPX_CODEC_DISABLE_COMPAT */
|
#endif /* VPX_CODEC_DISABLE_COMPAT */
|
||||||
|
|
||||||
/**\brief Image Descriptor */
|
/**\brief Image Descriptor */
|
||||||
typedef struct vpx_image
|
typedef struct vpx_image {
|
||||||
{
|
vpx_img_fmt_t fmt; /**< Image Format */
|
||||||
vpx_img_fmt_t fmt; /**< Image Format */
|
|
||||||
|
|
||||||
/* Image storage dimensions */
|
/* Image storage dimensions */
|
||||||
unsigned int w; /**< Stored image width */
|
unsigned int w; /**< Stored image width */
|
||||||
unsigned int h; /**< Stored image height */
|
unsigned int h; /**< Stored image height */
|
||||||
|
|
||||||
/* Image display dimensions */
|
/* Image display dimensions */
|
||||||
unsigned int d_w; /**< Displayed image width */
|
unsigned int d_w; /**< Displayed image width */
|
||||||
unsigned int d_h; /**< Displayed image height */
|
unsigned int d_h; /**< Displayed image height */
|
||||||
|
|
||||||
/* Chroma subsampling info */
|
/* Chroma subsampling info */
|
||||||
unsigned int x_chroma_shift; /**< subsampling order, X */
|
unsigned int x_chroma_shift; /**< subsampling order, X */
|
||||||
unsigned int y_chroma_shift; /**< subsampling order, Y */
|
unsigned int y_chroma_shift; /**< subsampling order, Y */
|
||||||
|
|
||||||
/* Image data pointers. */
|
/* Image data pointers. */
|
||||||
#define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */
|
#define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */
|
||||||
#define VPX_PLANE_Y 0 /**< Y (Luminance) plane */
|
#define VPX_PLANE_Y 0 /**< Y (Luminance) plane */
|
||||||
#define VPX_PLANE_U 1 /**< U (Chroma) plane */
|
#define VPX_PLANE_U 1 /**< U (Chroma) plane */
|
||||||
|
@ -123,121 +124,121 @@ extern "C" {
|
||||||
#define PLANE_V VPX_PLANE_V
|
#define PLANE_V VPX_PLANE_V
|
||||||
#define PLANE_ALPHA VPX_PLANE_ALPHA
|
#define PLANE_ALPHA VPX_PLANE_ALPHA
|
||||||
#endif
|
#endif
|
||||||
unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */
|
unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */
|
||||||
int stride[4]; /**< stride between rows for each plane */
|
int stride[4]; /**< stride between rows for each plane */
|
||||||
|
|
||||||
int bps; /**< bits per sample (for packed formats) */
|
int bps; /**< bits per sample (for packed formats) */
|
||||||
|
|
||||||
/* The following member may be set by the application to associate data
|
/* The following member may be set by the application to associate data
|
||||||
* with this image.
|
* with this image.
|
||||||
*/
|
*/
|
||||||
void *user_priv; /**< may be set by the application to associate data
|
void *user_priv; /**< may be set by the application to associate data
|
||||||
* with this image. */
|
* with this image. */
|
||||||
|
|
||||||
/* The following members should be treated as private. */
|
/* The following members should be treated as private. */
|
||||||
unsigned char *img_data; /**< private */
|
unsigned char *img_data; /**< private */
|
||||||
int img_data_owner; /**< private */
|
int img_data_owner; /**< private */
|
||||||
int self_allocd; /**< private */
|
int self_allocd; /**< private */
|
||||||
} vpx_image_t; /**< alias for struct vpx_image */
|
} vpx_image_t; /**< alias for struct vpx_image */
|
||||||
|
|
||||||
/**\brief Representation of a rectangle on a surface */
|
/**\brief Representation of a rectangle on a surface */
|
||||||
typedef struct vpx_image_rect
|
typedef struct vpx_image_rect {
|
||||||
{
|
unsigned int x; /**< leftmost column */
|
||||||
unsigned int x; /**< leftmost column */
|
unsigned int y; /**< topmost row */
|
||||||
unsigned int y; /**< topmost row */
|
unsigned int w; /**< width */
|
||||||
unsigned int w; /**< width */
|
unsigned int h; /**< height */
|
||||||
unsigned int h; /**< height */
|
} vpx_image_rect_t; /**< alias for struct vpx_image_rect */
|
||||||
} vpx_image_rect_t; /**< alias for struct vpx_image_rect */
|
|
||||||
|
|
||||||
/*!\brief Open a descriptor, allocating storage for the underlying image
|
/*!\brief Open a descriptor, allocating storage for the underlying image
|
||||||
*
|
*
|
||||||
* Returns a descriptor for storing an image of the given format. The
|
* Returns a descriptor for storing an image of the given format. The
|
||||||
* storage for the descriptor is allocated on the heap.
|
* storage for the descriptor is allocated on the heap.
|
||||||
*
|
*
|
||||||
* \param[in] img Pointer to storage for descriptor. If this parameter
|
* \param[in] img Pointer to storage for descriptor. If this parameter
|
||||||
* is NULL, the storage for the descriptor will be
|
* is NULL, the storage for the descriptor will be
|
||||||
* allocated on the heap.
|
* allocated on the heap.
|
||||||
* \param[in] fmt Format for the image
|
* \param[in] fmt Format for the image
|
||||||
* \param[in] d_w Width of the image
|
* \param[in] d_w Width of the image
|
||||||
* \param[in] d_h Height of the image
|
* \param[in] d_h Height of the image
|
||||||
* \param[in] align Alignment, in bytes, of the image buffer and
|
* \param[in] align Alignment, in bytes, of the image buffer and
|
||||||
* each row in the image(stride).
|
* each row in the image(stride).
|
||||||
*
|
*
|
||||||
* \return Returns a pointer to the initialized image descriptor. If the img
|
* \return Returns a pointer to the initialized image descriptor. If the img
|
||||||
* parameter is non-null, the value of the img parameter will be
|
* parameter is non-null, the value of the img parameter will be
|
||||||
* returned.
|
* returned.
|
||||||
*/
|
*/
|
||||||
vpx_image_t *vpx_img_alloc(vpx_image_t *img,
|
vpx_image_t *vpx_img_alloc(vpx_image_t *img,
|
||||||
vpx_img_fmt_t fmt,
|
vpx_img_fmt_t fmt,
|
||||||
unsigned int d_w,
|
unsigned int d_w,
|
||||||
unsigned int d_h,
|
unsigned int d_h,
|
||||||
unsigned int align);
|
unsigned int align);
|
||||||
|
|
||||||
/*!\brief Open a descriptor, using existing storage for the underlying image
|
/*!\brief Open a descriptor, using existing storage for the underlying image
|
||||||
*
|
*
|
||||||
* Returns a descriptor for storing an image of the given format. The
|
* Returns a descriptor for storing an image of the given format. The
|
||||||
* storage for descriptor has been allocated elsewhere, and a descriptor is
|
* storage for descriptor has been allocated elsewhere, and a descriptor is
|
||||||
* desired to "wrap" that storage.
|
* desired to "wrap" that storage.
|
||||||
*
|
*
|
||||||
* \param[in] img Pointer to storage for descriptor. If this parameter
|
* \param[in] img Pointer to storage for descriptor. If this parameter
|
||||||
* is NULL, the storage for the descriptor will be
|
* is NULL, the storage for the descriptor will be
|
||||||
* allocated on the heap.
|
* allocated on the heap.
|
||||||
* \param[in] fmt Format for the image
|
* \param[in] fmt Format for the image
|
||||||
* \param[in] d_w Width of the image
|
* \param[in] d_w Width of the image
|
||||||
* \param[in] d_h Height of the image
|
* \param[in] d_h Height of the image
|
||||||
* \param[in] align Alignment, in bytes, of each row in the image.
|
* \param[in] align Alignment, in bytes, of each row in the image.
|
||||||
* \param[in] img_data Storage to use for the image
|
* \param[in] img_data Storage to use for the image
|
||||||
*
|
*
|
||||||
* \return Returns a pointer to the initialized image descriptor. If the img
|
* \return Returns a pointer to the initialized image descriptor. If the img
|
||||||
* parameter is non-null, the value of the img parameter will be
|
* parameter is non-null, the value of the img parameter will be
|
||||||
* returned.
|
* returned.
|
||||||
*/
|
*/
|
||||||
vpx_image_t *vpx_img_wrap(vpx_image_t *img,
|
vpx_image_t *vpx_img_wrap(vpx_image_t *img,
|
||||||
vpx_img_fmt_t fmt,
|
vpx_img_fmt_t fmt,
|
||||||
unsigned int d_w,
|
unsigned int d_w,
|
||||||
unsigned int d_h,
|
unsigned int d_h,
|
||||||
unsigned int align,
|
unsigned int align,
|
||||||
unsigned char *img_data);
|
unsigned char *img_data);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Set the rectangle identifying the displayed portion of the image
|
/*!\brief Set the rectangle identifying the displayed portion of the image
|
||||||
*
|
*
|
||||||
* Updates the displayed rectangle (aka viewport) on the image surface to
|
* Updates the displayed rectangle (aka viewport) on the image surface to
|
||||||
* match the specified coordinates and size.
|
* match the specified coordinates and size.
|
||||||
*
|
*
|
||||||
* \param[in] img Image descriptor
|
* \param[in] img Image descriptor
|
||||||
* \param[in] x leftmost column
|
* \param[in] x leftmost column
|
||||||
* \param[in] y topmost row
|
* \param[in] y topmost row
|
||||||
* \param[in] w width
|
* \param[in] w width
|
||||||
* \param[in] h height
|
* \param[in] h height
|
||||||
*
|
*
|
||||||
* \return 0 if the requested rectangle is valid, nonzero otherwise.
|
* \return 0 if the requested rectangle is valid, nonzero otherwise.
|
||||||
*/
|
*/
|
||||||
int vpx_img_set_rect(vpx_image_t *img,
|
int vpx_img_set_rect(vpx_image_t *img,
|
||||||
unsigned int x,
|
unsigned int x,
|
||||||
unsigned int y,
|
unsigned int y,
|
||||||
unsigned int w,
|
unsigned int w,
|
||||||
unsigned int h);
|
unsigned int h);
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Flip the image vertically (top for bottom)
|
/*!\brief Flip the image vertically (top for bottom)
|
||||||
*
|
*
|
||||||
* Adjusts the image descriptor's pointers and strides to make the image
|
* Adjusts the image descriptor's pointers and strides to make the image
|
||||||
* be referenced upside-down.
|
* be referenced upside-down.
|
||||||
*
|
*
|
||||||
* \param[in] img Image descriptor
|
* \param[in] img Image descriptor
|
||||||
*/
|
*/
|
||||||
void vpx_img_flip(vpx_image_t *img);
|
void vpx_img_flip(vpx_image_t *img);
|
||||||
|
|
||||||
/*!\brief Close an image descriptor
|
/*!\brief Close an image descriptor
|
||||||
*
|
*
|
||||||
* Frees all allocated storage associated with an image descriptor.
|
* Frees all allocated storage associated with an image descriptor.
|
||||||
*
|
*
|
||||||
* \param[in] img Image descriptor
|
* \param[in] img Image descriptor
|
||||||
*/
|
*/
|
||||||
void vpx_img_free(vpx_image_t *img);
|
void vpx_img_free(vpx_image_t *img);
|
||||||
|
|
||||||
#endif
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // VPX_VPX_IMAGE_H_
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef VPX_INTEGER_H
|
#ifndef VPX_VPX_INTEGER_H_
|
||||||
#define VPX_INTEGER_H
|
#define VPX_VPX_INTEGER_H_
|
||||||
|
|
||||||
/* get ptrdiff_t, size_t, wchar_t, NULL */
|
/* get ptrdiff_t, size_t, wchar_t, NULL */
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
@ -27,6 +27,9 @@ typedef unsigned int uint32_t;
|
||||||
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
|
#if (defined(_MSC_VER) && (_MSC_VER < 1600))
|
||||||
typedef signed __int64 int64_t;
|
typedef signed __int64 int64_t;
|
||||||
typedef unsigned __int64 uint64_t;
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#define INT64_MAX _I64_MAX
|
||||||
|
#define INT16_MAX _I16_MAX
|
||||||
|
#define INT16_MIN _I16_MIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _UINTPTR_T_DEFINED
|
#ifndef _UINTPTR_T_DEFINED
|
||||||
|
@ -51,4 +54,4 @@ typedef size_t uintptr_t;
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // VPX_VPX_INTEGER_H_
|
||||||
|
|
Binary file not shown.
BIN
polymer/eduke32/platform/Windows/lib/32/libcompat-to-msvc.a
Normal file
BIN
polymer/eduke32/platform/Windows/lib/32/libcompat-to-msvc.a
Normal file
Binary file not shown.
Binary file not shown.
BIN
polymer/eduke32/platform/Windows/lib/32/libluajit.a
Normal file
BIN
polymer/eduke32/platform/Windows/lib/32/libluajit.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
polymer/eduke32/platform/Windows/lib/64/libcompat-to-msvc.a
Normal file
BIN
polymer/eduke32/platform/Windows/lib/64/libcompat-to-msvc.a
Normal file
Binary file not shown.
BIN
polymer/eduke32/platform/Windows/lib/64/liblpeg.a
Normal file
BIN
polymer/eduke32/platform/Windows/lib/64/liblpeg.a
Normal file
Binary file not shown.
BIN
polymer/eduke32/platform/Windows/lib/64/libluajit.a
Normal file
BIN
polymer/eduke32/platform/Windows/lib/64/libluajit.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -9,7 +9,7 @@ http://git.xiph.org/?p=flac.git;a=summary
|
||||||
http://zlib.net/
|
http://zlib.net/
|
||||||
http://www.libpng.org/pub/png/libpng.html
|
http://www.libpng.org/pub/png/libpng.html
|
||||||
http://www.webmproject.org/code/
|
http://www.webmproject.org/code/
|
||||||
http://www.libsdl.org/download-1.2.php
|
http://www.libsdl.org/download-2.0.php
|
||||||
http://www.libsdl.org/projects/SDL_mixer/
|
http://www.libsdl.org/projects/SDL_mixer/
|
||||||
|
|
||||||
The build output listed as "Desired Results" is what EDuke32 needs to function.
|
The build output listed as "Desired Results" is what EDuke32 needs to function.
|
||||||
|
@ -35,14 +35,14 @@ http://wiki.eduke32.com/wiki/Working_with_the_Windows_Command_Prompt
|
||||||
|
|
||||||
libogg:
|
libogg:
|
||||||
To build:
|
To build:
|
||||||
[sh ./configure && make]
|
[sh ./configure CFLAGS="-g -O2 -fno-stack-check -fno-stack-protector -mno-stack-arg-probe" && make]
|
||||||
Desired Results:
|
Desired Results:
|
||||||
- headers: ogg\config_types.h ogg\ogg.h ogg\os_types.h
|
- headers: ogg\config_types.h ogg\ogg.h ogg\os_types.h
|
||||||
- libraries: libogg.a
|
- libraries: libogg.a
|
||||||
|
|
||||||
libvorbis:
|
libvorbis:
|
||||||
To build:
|
To build:
|
||||||
[sh ./configure && make]
|
[sh ./configure CFLAGS="-fno-stack-check -fno-stack-protector -mno-stack-arg-probe" && make]
|
||||||
Desired Results:
|
Desired Results:
|
||||||
- headers: vorbis\codec.h vorbis\vorbisfile.h
|
- headers: vorbis\codec.h vorbis\vorbisfile.h
|
||||||
- libraries: libvorbis.a libvorbisfile.a
|
- libraries: libvorbis.a libvorbisfile.a
|
||||||
|
@ -50,7 +50,7 @@ libvorbis depends on the results of libogg to compile.
|
||||||
|
|
||||||
libFLAC:
|
libFLAC:
|
||||||
To build:
|
To build:
|
||||||
[make -f Makefile.lite libFLAC]
|
[make -f Makefile.lite libFLAC USE_LROUND=0 USE_FSEEKO=0 CUSTOM_CFLAGS="-fno-stack-check -fno-stack-protector -mno-stack-arg-probe"]
|
||||||
Desired Results:
|
Desired Results:
|
||||||
- headers: FLAC\all.h FLAC\assert.h FLAC\callback.h FLAC\export.h FLAC\format.h FLAC\metadata.h FLAC\ordinals.h FLAC\stream_decoder.h FLAC\stream_encoder.h
|
- headers: FLAC\all.h FLAC\assert.h FLAC\callback.h FLAC\export.h FLAC\format.h FLAC\metadata.h FLAC\ordinals.h FLAC\stream_decoder.h FLAC\stream_encoder.h
|
||||||
- libraries: libFLAC.a
|
- libraries: libFLAC.a
|
||||||
|
@ -58,7 +58,9 @@ libFLAC depends on the results of libogg to compile.
|
||||||
|
|
||||||
|
|
||||||
zlib:
|
zlib:
|
||||||
You may want to change -O3 to -O2 in win32\Makefile.gcc for stability and possibly performance benefits.
|
Modify win32\Makefile.gcc as follows:
|
||||||
|
- CFLAGS: change -O3 to -O2 for stability and possibly performance benefits.
|
||||||
|
- CFLAGS: add: -fno-stack-check -fno-stack-protector -mno-stack-arg-probe
|
||||||
To build:
|
To build:
|
||||||
[make -f win32\Makefile.gcc]
|
[make -f win32\Makefile.gcc]
|
||||||
[ar rcs libz_mini.a crc32.o deflate.o adler32.o zutil.o trees.o]
|
[ar rcs libz_mini.a crc32.o deflate.o adler32.o zutil.o trees.o]
|
||||||
|
@ -68,7 +70,10 @@ Desired Results:
|
||||||
|
|
||||||
|
|
||||||
libpng:
|
libpng:
|
||||||
Edit scripts\Makefile.gcc so that ZLIBINC and ZLIBLIB point to the directory of zlib from above, or, rename your zlib directory so that, relative to the libpng directory, it is "../zlib". You will get a compile-time error if this is omitted or done incorrectly.
|
Copy *.h from zlib to your compiler's include directory.
|
||||||
|
Modify scripts\Makefile.gcc as follows:
|
||||||
|
- Ensure ZLIBINC and ZLIBLIB point to the directory of zlib from above, or, rename your zlib directory so that, relative to the libpng directory, it is "../zlib". You will get a compile-time error if this is omitted or done incorrectly.
|
||||||
|
- CFLAGS: add: -fno-stack-check -fno-stack-protector -mno-stack-arg-probe
|
||||||
Copy the file "minipng.dfa" to the root of the libpng data.
|
Copy the file "minipng.dfa" to the root of the libpng data.
|
||||||
To build:
|
To build:
|
||||||
[make -f scripts/pnglibconf.mak DFA_XTRA=./minipng.dfa CPP="gcc -E"]
|
[make -f scripts/pnglibconf.mak DFA_XTRA=./minipng.dfa CPP="gcc -E"]
|
||||||
|
@ -84,7 +89,7 @@ Download the binary of yasm (http://yasm.tortall.net/) for your host system arch
|
||||||
The build environment needs pr.exe (https://mingw-lib.googlecode.com/files/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2).
|
The build environment needs pr.exe (https://mingw-lib.googlecode.com/files/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2).
|
||||||
If the configure scripts do not recognize your 64-bit compiler, you may need to [git apply "libvpx with MinGW-w64.patch"].
|
If the configure scripts do not recognize your 64-bit compiler, you may need to [git apply "libvpx with MinGW-w64.patch"].
|
||||||
To build:
|
To build:
|
||||||
[sh ./configure --disable-vp8-encoder --disable-multithread --disable-spatial-resampling --as=yasm && make]
|
[sh ./configure --disable-vp8-encoder --disable-vp9-encoder --disable-multithread --disable-spatial-resampling --as=yasm --extra-cflags="-fno-stack-check -fno-stack-protector -mno-stack-arg-probe" && make]
|
||||||
Desired Results:
|
Desired Results:
|
||||||
- headers: vpx\vp8.h vpx\vp8dx.h vpx\vpx_codec.h vpx\vpx_codec_impl_bottom.h vpx\vpx_codec_impl_top.h vpx\vpx_decoder.h vpx\vpx_decoder_compat.h vpx\vpx_image.h vpx\vpx_integer.h
|
- headers: vpx\vp8.h vpx\vp8dx.h vpx\vpx_codec.h vpx\vpx_codec_impl_bottom.h vpx\vpx_codec_impl_top.h vpx\vpx_decoder.h vpx\vpx_decoder_compat.h vpx\vpx_image.h vpx\vpx_integer.h
|
||||||
- libraries: libvpx.a libvpx_g.a
|
- libraries: libvpx.a libvpx_g.a
|
||||||
|
@ -103,7 +108,7 @@ Download SDL_mixer-devel-<version>-VC.zip.
|
||||||
The library used for linking can be found at these paths:
|
The library used for linking can be found at these paths:
|
||||||
32-bit: SDL_mixer-<version>/lib/x86/SDL_mixer.lib
|
32-bit: SDL_mixer-<version>/lib/x86/SDL_mixer.lib
|
||||||
64-bit: SDL_mixer-<version>/lib/x64/SDL_mixer.lib
|
64-bit: SDL_mixer-<version>/lib/x64/SDL_mixer.lib
|
||||||
Compiling SDL_mixer has not been shown to work with either MinGW. If you would like to try anyway:
|
Compiling SDL_mixer 1.x has not been shown to work with either MinGW. If you would like to try anyway:
|
||||||
To build:
|
To build:
|
||||||
[sh ./configure && make]
|
[sh ./configure && make]
|
||||||
SDL_mixer depends on the results of SDL to compile. Note that the headers must be installed without the "SDL" prefix directory.
|
SDL_mixer depends on the results of SDL to compile. Note that the headers must be installed without the "SDL" prefix directory.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
diff --git a/build/make/configure.sh b/build/make/configure.sh
|
||||||
index c99a01c..0ddbc3f 100755
|
index b5151da..a739468 100755
|
||||||
--- a/build/make/configure.sh
|
--- a/build/make/configure.sh
|
||||||
+++ b/build/make/configure.sh
|
+++ b/build/make/configure.sh
|
||||||
@@ -641,9 +641,14 @@ process_common_toolchain() {
|
@@ -661,9 +661,14 @@ process_common_toolchain() {
|
||||||
tgt_isa=x86_64
|
x86_64*mingw32*)
|
||||||
tgt_os=darwin12
|
tgt_os=win64
|
||||||
;;
|
;;
|
||||||
- *mingw32*|*cygwin*)
|
- *mingw32*|*cygwin*)
|
||||||
+ *mingw32*|*cygwin*|*win32-gcc*)
|
+ *mingw32*|*cygwin*|*win32-gcc*)
|
||||||
|
@ -19,10 +19,10 @@ index c99a01c..0ddbc3f 100755
|
||||||
*linux*|*bsd*)
|
*linux*|*bsd*)
|
||||||
tgt_os=linux
|
tgt_os=linux
|
||||||
diff --git a/configure b/configure
|
diff --git a/configure b/configure
|
||||||
index b3c5fe9..85ef8cf 100755
|
index 9f5a435..93f3d30 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -127,6 +127,7 @@ all_platforms="${all_platforms} x86_64-darwin12-gcc"
|
@@ -137,6 +137,7 @@ all_platforms="${all_platforms} x86_64-darwin13-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-linux-gcc"
|
all_platforms="${all_platforms} x86_64-linux-gcc"
|
||||||
all_platforms="${all_platforms} x86_64-linux-icc"
|
all_platforms="${all_platforms} x86_64-linux-icc"
|
||||||
all_platforms="${all_platforms} x86_64-solaris-gcc"
|
all_platforms="${all_platforms} x86_64-solaris-gcc"
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
o=o
|
||||||
|
|
||||||
|
NAME:=libcompat-from-mingw-w64
|
||||||
|
OBJS:=vsnprintf.$o
|
||||||
|
|
||||||
|
|
||||||
|
%.$o: %.c
|
||||||
|
gcc -Wall -Wextra -O3 -c $< -o $@
|
||||||
|
|
||||||
|
$(NAME).a: $(OBJS)
|
||||||
|
ar r $@ $<
|
||||||
|
ranlib $@
|
||||||
|
|
||||||
|
all : $(NAME).a
|
||||||
|
@ls -l $^
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-rm -f *.a *.o
|
|
@ -0,0 +1,13 @@
|
||||||
|
/**
|
||||||
|
* This file has no copyright assigned and is placed in the Public Domain.
|
||||||
|
* This file is part of the mingw-w64 runtime package.
|
||||||
|
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||||
|
*/
|
||||||
|
#define __CRT__NO_INLINE
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int __cdecl __ms_vsnprintf (char *s,size_t n,const char *format,va_list arg)
|
||||||
|
{
|
||||||
|
return _vsnprintf(s, n, format, arg);
|
||||||
|
}
|
19
polymer/eduke32/platform/Windows/src/compat-to-msvc/Makefile
Normal file
19
polymer/eduke32/platform/Windows/src/compat-to-msvc/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
o=o
|
||||||
|
|
||||||
|
NAME:=libcompat-to-msvc
|
||||||
|
OBJS:=io_math.$o
|
||||||
|
|
||||||
|
|
||||||
|
%.$o: %.c
|
||||||
|
gcc -Wall -Wextra -O3 -c $< -o $@
|
||||||
|
|
||||||
|
$(NAME).a: $(OBJS)
|
||||||
|
ar r $@ $<
|
||||||
|
ranlib $@
|
||||||
|
|
||||||
|
all : $(NAME).a
|
||||||
|
@ls -l $^
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-rm -f *.a *.o
|
|
@ -0,0 +1,43 @@
|
||||||
|
// Some libraries expect these functions, for which Visual Studio (pre-2013) falls down on the job.
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
# include <stdint.h>
|
||||||
|
int64_t _ftelli64(
|
||||||
|
FILE *stream
|
||||||
|
);
|
||||||
|
int _fseeki64(
|
||||||
|
FILE *stream,
|
||||||
|
int64_t offset,
|
||||||
|
int origin
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int fseeko(FILE *fp, off_t offset, int whence)
|
||||||
|
{
|
||||||
|
return _fseeki64(fp, (int64_t)offset, whence);
|
||||||
|
}
|
||||||
|
int fseeko64(FILE *fp, off64_t offset, int whence)
|
||||||
|
{
|
||||||
|
return _fseeki64(fp, (int64_t)offset, whence);
|
||||||
|
}
|
||||||
|
|
||||||
|
off_t ftello(FILE *stream)
|
||||||
|
{
|
||||||
|
return (off_t)_ftelli64(stream);
|
||||||
|
}
|
||||||
|
off64_t ftello64(FILE *stream)
|
||||||
|
{
|
||||||
|
return (off64_t)_ftelli64(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
long lround(double d)
|
||||||
|
{
|
||||||
|
return (long)(d > 0 ? d + 0.5 : ceil(d - 0.5));
|
||||||
|
}
|
||||||
|
long lroundf(float d)
|
||||||
|
{
|
||||||
|
return (long)(d > 0 ? d + 0.5 : ceilf(d - 0.5));
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2000-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2001-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2004-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2000-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2000-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2001-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2000-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -32,10 +33,26 @@
|
||||||
#ifndef FLAC__ORDINALS_H
|
#ifndef FLAC__ORDINALS_H
|
||||||
#define FLAC__ORDINALS_H
|
#define FLAC__ORDINALS_H
|
||||||
|
|
||||||
/* If your compiler does not provide <stdint.h> you should provide a replacement
|
#if defined(_MSC_VER) && _MSC_VER < 1600
|
||||||
* which hss suitable replacements for the following intX_T and uintX_t types.
|
|
||||||
|
/* Microsoft Visual Studio earlier than the 2010 version did not provide
|
||||||
|
* the 1999 ISO C Standard header file <stdint.h>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
typedef __int8 FLAC__int8;
|
||||||
|
typedef unsigned __int8 FLAC__uint8;
|
||||||
|
|
||||||
|
typedef __int16 FLAC__int16;
|
||||||
|
typedef __int32 FLAC__int32;
|
||||||
|
typedef __int64 FLAC__int64;
|
||||||
|
typedef unsigned __int16 FLAC__uint16;
|
||||||
|
typedef unsigned __int32 FLAC__uint32;
|
||||||
|
typedef unsigned __int64 FLAC__uint64;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* For MSVC 2010 and everything else which provides <stdint.h>. */
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef int8_t FLAC__int8;
|
typedef int8_t FLAC__int8;
|
||||||
|
@ -48,10 +65,13 @@ typedef uint16_t FLAC__uint16;
|
||||||
typedef uint32_t FLAC__uint32;
|
typedef uint32_t FLAC__uint32;
|
||||||
typedef uint64_t FLAC__uint64;
|
typedef uint64_t FLAC__uint64;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef int FLAC__bool;
|
typedef int FLAC__bool;
|
||||||
|
|
||||||
typedef FLAC__uint8 FLAC__byte;
|
typedef FLAC__uint8 FLAC__byte;
|
||||||
|
|
||||||
|
|
||||||
#ifdef true
|
#ifdef true
|
||||||
#undef true
|
#undef true
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2000-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* libFLAC - Free Lossless Audio Codec library
|
/* libFLAC - Free Lossless Audio Codec library
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
|
* Copyright (C) 2000-2009 Josh Coalson
|
||||||
|
* Copyright (C) 2011-2013 Xiph.Org Foundation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -128,7 +129,7 @@ extern "C" {
|
||||||
* Unlike the decoders, the stream encoder has many options that can
|
* Unlike the decoders, the stream encoder has many options that can
|
||||||
* affect the speed and compression ratio. When setting these parameters
|
* affect the speed and compression ratio. When setting these parameters
|
||||||
* you should have some basic knowledge of the format (see the
|
* you should have some basic knowledge of the format (see the
|
||||||
* <A HREF="../documentation.html#format">user-level documentation</A>
|
* <A HREF="../documentation_format_overview.html">user-level documentation</A>
|
||||||
* or the <A HREF="../format.html">formal description</A>). The
|
* or the <A HREF="../format.html">formal description</A>). The
|
||||||
* FLAC__stream_encoder_set_*() functions themselves do not validate the
|
* FLAC__stream_encoder_set_*() functions themselves do not validate the
|
||||||
* values as many are interdependent. The FLAC__stream_encoder_init_*()
|
* values as many are interdependent. The FLAC__stream_encoder_init_*()
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef short ogg_int16_t;
|
typedef int16_t ogg_int16_t;
|
||||||
typedef unsigned short ogg_uint16_t;
|
typedef uint16_t ogg_uint16_t;
|
||||||
typedef int ogg_int32_t;
|
typedef int32_t ogg_int32_t;
|
||||||
typedef unsigned int ogg_uint32_t;
|
typedef uint32_t ogg_uint32_t;
|
||||||
typedef long long ogg_int64_t;
|
typedef int64_t ogg_int64_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,4 +12,4 @@ Lunatic depends on the following:
|
||||||
* LPeg 0.12 [http://www.inf.puc-rio.br/~roberto/lpeg], but with our patch
|
* LPeg 0.12 [http://www.inf.puc-rio.br/~roberto/lpeg], but with our patch
|
||||||
"lpeg-lunatic.patch" applied. It will allow to build a statically linked
|
"lpeg-lunatic.patch" applied. It will allow to build a statically linked
|
||||||
library of LPeg, "liblpeg.a". On Windows, liblpeg.a is pre-compiled and
|
library of LPeg, "liblpeg.a". On Windows, liblpeg.a is pre-compiled and
|
||||||
resides in platform/Windows/lib/32 [TODO: 64].
|
resides in platform/Windows/lib/.
|
||||||
|
|
Loading…
Reference in a new issue