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
|
||||||
|
# endif
|
||||||
|
# ifdef PNG_USER_HEIGHT_MAX
|
||||||
|
# undef PNG_USER_HEIGHT_MAX
|
||||||
|
# define PNG_USER_HEIGHT_MAX 1000000L
|
||||||
|
# endif
|
||||||
|
# ifdef PNG_USER_CHUNK_MALLOC_MAX
|
||||||
|
# undef PNG_USER_CHUNK_MALLOC_MAX
|
||||||
|
# define PNG_USER_CHUNK_MALLOC_MAX 4000000L
|
||||||
|
# endif
|
||||||
|
# ifdef PNG_USER_CHUNK_CACHE_MAX
|
||||||
|
# undef PNG_USER_CHUNK_CACHE_MAX
|
||||||
|
# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||||
|
# 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.
|
||||||
*/
|
*/
|
||||||
# ifndef PNG_NO_LIMITS_H
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
# endif
|
#include <stddef.h>
|
||||||
|
|
||||||
/* For the memory copy APIs (i.e. the standard definitions of these),
|
/* Library header files. These header files are all defined by ISOC90; libpng
|
||||||
* because this file defines png_memcpy and so on the base APIs must
|
* expects conformant implementations, however, an ISOC90 conformant system need
|
||||||
* be defined here.
|
* 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 BSD
|
|
||||||
# include <strings.h>
|
|
||||||
# else
|
|
||||||
# include <string.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/* For png_FILE_p - this provides the standard definition of a
|
|
||||||
* FILE
|
|
||||||
*/
|
|
||||||
#ifdef PNG_STDIO_SUPPORTED
|
#ifdef PNG_STDIO_SUPPORTED
|
||||||
|
/* Required for the definition of FILE: */
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_SETJMP_SUPPORTED
|
||||||
|
/* Required for the definition of jmp_buf and the declaration of longjmp: */
|
||||||
|
# include <setjmp.h>
|
||||||
#endif
|
#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
|
||||||
|
|
||||||
# ifdef OF /* zlib prototype munger */
|
|
||||||
# define PNGARG(arglist) OF(arglist)
|
|
||||||
# else
|
|
||||||
|
|
||||||
# ifdef _NO_PROTO
|
|
||||||
# define PNGARG(arglist) ()
|
|
||||||
# else
|
|
||||||
# define PNGARG(arglist) arglist
|
# define PNGARG(arglist) arglist
|
||||||
# endif /* _NO_PROTO */
|
#endif
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -202,6 +221,9 @@
|
||||||
# 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,6 +368,7 @@
|
||||||
# ifndef PNG_NORETURN
|
# ifndef PNG_NORETURN
|
||||||
# define PNG_NORETURN __attribute__((__noreturn__))
|
# define PNG_NORETURN __attribute__((__noreturn__))
|
||||||
# endif
|
# endif
|
||||||
|
# if __GNUC__ >= 3
|
||||||
# ifndef PNG_ALLOCATED
|
# ifndef PNG_ALLOCATED
|
||||||
# define PNG_ALLOCATED __attribute__((__malloc__))
|
# define PNG_ALLOCATED __attribute__((__malloc__))
|
||||||
# endif
|
# endif
|
||||||
|
@ -359,9 +384,14 @@
|
||||||
__attribute__((__deprecated__))
|
__attribute__((__deprecated__))
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif /* __GNUC__ */
|
# 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
|
||||||
|
@ -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
|
|
||||||
# define PNG_CONST const
|
|
||||||
# else
|
|
||||||
# define PNG_CONST
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Some typedefs to get us started. These should be safe on most of the
|
|
||||||
* common platforms. The typedefs should be at least as large as the
|
|
||||||
* numbers suggest (a png_uint_32 must be at least 32 bits long), but they
|
|
||||||
* don't have to be exactly that size. Some compilers dislike passing
|
|
||||||
* 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
|
|
||||||
typedef unsigned long png_uint_32;
|
|
||||||
typedef long png_int_32;
|
|
||||||
#endif
|
|
||||||
typedef unsigned short png_uint_16;
|
|
||||||
typedef short png_int_16;
|
|
||||||
typedef unsigned char png_byte;
|
typedef unsigned char png_byte;
|
||||||
|
|
||||||
#ifdef PNG_NO_SIZE_T
|
|
||||||
typedef unsigned int png_size_t;
|
|
||||||
#else
|
#else
|
||||||
|
# error "libpng requires 8 bit bytes"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if INT_MIN == -32768 && INT_MAX == 32767
|
||||||
|
typedef int png_int_16;
|
||||||
|
#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
|
||||||
|
typedef short png_int_16;
|
||||||
|
#else
|
||||||
|
# error "libpng requires a signed 16 bit type"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UINT_MAX == 65535
|
||||||
|
typedef unsigned int png_uint_16;
|
||||||
|
#elif USHRT_MAX == 65535
|
||||||
|
typedef unsigned short png_uint_16;
|
||||||
|
#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;
|
||||||
|
typedef ptrdiff_t png_ptrdiff_t;
|
||||||
|
|
||||||
|
/* libpng needs to know the maximum value of 'size_t' and this controls the
|
||||||
|
* definition of png_alloc_size_t, below. This maximum value of size_t limits
|
||||||
|
* but does not control the maximum allocations the library makes - there is
|
||||||
|
* direct application control of this through png_set_user_limits().
|
||||||
|
*/
|
||||||
|
#ifndef PNG_SMALL_SIZE_T
|
||||||
|
/* Compiler specific tests for systems where size_t is known to be less than
|
||||||
|
* 32 bits (some of these systems may no longer work because of the lack of
|
||||||
|
* 'far' support; see above.)
|
||||||
|
*/
|
||||||
|
# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\
|
||||||
|
(defined(_MSC_VER) && defined(MAXSEG_64K))
|
||||||
|
# define PNG_SMALL_SIZE_T
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#define png_sizeof(x) (sizeof (x))
|
|
||||||
|
|
||||||
/* The following is needed for medium model support. It cannot be in the
|
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no
|
||||||
* pngpriv.h header. Needs modification for other compilers besides
|
* smaller than png_uint_32. Casts from png_size_t or png_uint_32 to
|
||||||
* MSC. Model independent support declares all arrays and pointers to be
|
* png_alloc_size_t are not necessary; in fact, it is recommended not to use
|
||||||
* large using the far keyword. The zlib version used must also support
|
* them at all so that the compiler can complain when something turns out to be
|
||||||
* model independent data. As of version zlib 1.0.4, the necessary changes
|
* problematic.
|
||||||
* have been made in zlib. The USE_FAR_KEYWORD define triggers other
|
*
|
||||||
* changes that are needed. (Tim Wegner)
|
* 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
|
||||||
/* Separate compiler dependencies (problem here is that zlib.h always
|
typedef png_uint_32 png_alloc_size_t;
|
||||||
* defines FAR. (SJT)
|
|
||||||
*/
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
|
|
||||||
# define LDATA 1
|
|
||||||
#else
|
#else
|
||||||
# define LDATA 0
|
typedef png_size_t png_alloc_size_t;
|
||||||
#endif
|
#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__ */
|
|
||||||
|
|
||||||
|
/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
|
||||||
/* Suggest testing for specific compiler first before testing for
|
* implementations of Intel CPU specific support of user-mode segmented address
|
||||||
* FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
|
* spaces, where 16-bit pointers address more than 65536 bytes of memory using
|
||||||
* making reliance oncertain keywords suspect. (SJT)
|
* 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* MSC Medium model */
|
/* Typedef for floating-point numbers that are converted to fixed-point with a
|
||||||
#ifdef FAR
|
* multiple of 100,000, e.g., gamma
|
||||||
# ifdef M_I86MM
|
|
||||||
# define USE_FAR_KEYWORD
|
|
||||||
# define FARDATA FAR
|
|
||||||
# include <dos.h>
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* SJT: default case */
|
|
||||||
#ifndef FAR
|
|
||||||
# define FAR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* At this point FAR is always defined */
|
|
||||||
#ifndef FARDATA
|
|
||||||
# define FARDATA
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Typedef for floating-point numbers that are converted
|
|
||||||
* to fixed-point with a 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,16 +27,21 @@
|
||||||
/*!\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 */
|
||||||
|
@ -45,6 +49,12 @@ enum vp8_com_control_id
|
||||||
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 */
|
||||||
|
|
||||||
|
/* TODO(jkoleszar): The encoder incorrectly reuses some of these values (5+)
|
||||||
|
* 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_COMMON_CTRL_ID_MAX,
|
||||||
VP8_DECODER_CTRL_ID_START = 256
|
VP8_DECODER_CTRL_ID_START = 256
|
||||||
};
|
};
|
||||||
|
@ -53,8 +63,7 @@ enum vp8_com_control_id
|
||||||
*
|
*
|
||||||
* 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,
|
||||||
|
@ -73,8 +82,7 @@ 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] */
|
||||||
|
@ -84,8 +92,7 @@ typedef struct vp8_postproc_cfg
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -93,21 +100,26 @@ typedef enum vpx_ref_frame_type
|
||||||
|
|
||||||
/*!\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_ref_frame_type_t frame_type; /**< which reference frame */
|
||||||
vpx_image_t img; /**< reference frame data in image format */
|
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
|
||||||
*
|
*
|
||||||
|
@ -32,21 +36,22 @@
|
||||||
*/
|
*/
|
||||||
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
|
||||||
*/
|
*/
|
||||||
|
@ -60,9 +65,34 @@ enum vp8_dec_control_id
|
||||||
*/
|
*/
|
||||||
VP8D_GET_LAST_REF_USED,
|
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
|
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.
|
||||||
|
*/
|
||||||
|
void (*decrypt_cb)(void *decrypt_state, const unsigned char *input,
|
||||||
|
unsigned char *output, int count);
|
||||||
|
/*! Decryption state. */
|
||||||
|
void *decrypt_state;
|
||||||
|
} vp8_decrypt_init;
|
||||||
|
|
||||||
/*!\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,14 +36,15 @@
|
||||||
* 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
|
||||||
|
@ -197,15 +198,13 @@ extern "C" {
|
||||||
* 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_dec_cfg *dec; /**< Decoder Configuration Pointer */
|
||||||
struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */
|
struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */
|
||||||
void *raw;
|
void *raw;
|
||||||
|
@ -480,8 +479,7 @@ extern "C" {
|
||||||
* 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
|
typedef struct vpx_codec_mmap {
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* The following members are set by the codec when requesting a segment
|
* The following members are set by the codec when requesting a segment
|
||||||
*/
|
*/
|
||||||
|
@ -553,9 +551,8 @@ extern "C" {
|
||||||
|
|
||||||
/*!@} - 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,9 +29,7 @@
|
||||||
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
|
||||||
*
|
*
|
||||||
|
@ -65,12 +64,17 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* The available flags are specified by VPX_CODEC_USE_* defines.
|
* The available flags are specified by VPX_CODEC_USE_* defines.
|
||||||
*/
|
*/
|
||||||
|
#define VPX_CODEC_CAP_FRAME_THREADING 0x200000 /**< Can support frame-based
|
||||||
|
multi-threading */
|
||||||
|
|
||||||
#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
|
||||||
*
|
*
|
||||||
|
@ -78,8 +82,7 @@ extern "C" {
|
||||||
* 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) */
|
||||||
|
@ -98,8 +101,7 @@ extern "C" {
|
||||||
* 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 */
|
||||||
|
@ -325,9 +327,8 @@ extern "C" {
|
||||||
/*!@} - end defgroup cap_put_slice*/
|
/*!@} - end defgroup cap_put_slice*/
|
||||||
|
|
||||||
/*!@} - end defgroup decoder*/
|
/*!@} - end defgroup decoder*/
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#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,13 +13,13 @@
|
||||||
* \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
|
|
||||||
#define VPX_IMAGE_H
|
|
||||||
|
|
||||||
/*!\brief Current ABI version number
|
/*!\brief Current ABI version number
|
||||||
*
|
*
|
||||||
* \internal
|
* \internal
|
||||||
|
@ -55,9 +55,11 @@ extern "C" {
|
||||||
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 */
|
||||||
|
@ -94,8 +96,7 @@ extern "C" {
|
||||||
#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 */
|
||||||
|
@ -141,8 +142,7 @@ extern "C" {
|
||||||
} 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 */
|
||||||
|
@ -237,7 +237,8 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
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