comparison avcodec.h @ 12456:a5ddb39627fd libavcodec

Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_ symbols, and move them from libavcodec/avcodec.h to libavutil/cpu.h.
author stefano
date Sat, 04 Sep 2010 09:59:08 +0000
parents 3bca212d6f51
children 4a425a99f543
comparison
equal deleted inserted replaced
12455:14f85520cd02 12456:a5ddb39627fd
26 * external API header 26 * external API header
27 */ 27 */
28 28
29 #include <errno.h> 29 #include <errno.h>
30 #include "libavutil/avutil.h" 30 #include "libavutil/avutil.h"
31 #include "libavutil/cpu.h"
31 32
32 #define LIBAVCODEC_VERSION_MAJOR 52 33 #define LIBAVCODEC_VERSION_MAJOR 52
33 #define LIBAVCODEC_VERSION_MINOR 87 34 #define LIBAVCODEC_VERSION_MINOR 87
34 #define LIBAVCODEC_VERSION_MICRO 0 35 #define LIBAVCODEC_VERSION_MICRO 1
35 36
36 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ 37 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
37 LIBAVCODEC_VERSION_MINOR, \ 38 LIBAVCODEC_VERSION_MINOR, \
38 LIBAVCODEC_VERSION_MICRO) 39 LIBAVCODEC_VERSION_MICRO)
39 #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \ 40 #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
48 * They may change, break or disappear at any time. 49 * They may change, break or disappear at any time.
49 */ 50 */
50 #ifndef FF_API_PALETTE_CONTROL 51 #ifndef FF_API_PALETTE_CONTROL
51 #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54) 52 #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54)
52 #endif 53 #endif
54 #define FF_API_MM_FLAGS (LIBAVCODEC_VERSION_MAJOR < 53)
53 55
54 #define AV_NOPTS_VALUE INT64_C(0x8000000000000000) 56 #define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
55 #define AV_TIME_BASE 1000000 57 #define AV_TIME_BASE 1000000
56 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} 58 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
57 59
1655 * With the FORCE flag you may instead enable given CPU features. 1657 * With the FORCE flag you may instead enable given CPU features.
1656 * (Dangerous: Usable in case of misdetection, improper usage however will 1658 * (Dangerous: Usable in case of misdetection, improper usage however will
1657 * result into program crash.) 1659 * result into program crash.)
1658 */ 1660 */
1659 unsigned dsp_mask; 1661 unsigned dsp_mask;
1660 #define FF_MM_FORCE 0x80000000 /* Force usage of selected flags (OR) */ 1662
1661 /* lower 16 bits - CPU features */ 1663 #if FF_API_MM_FLAGS
1662 #define FF_MM_MMX 0x0001 ///< standard MMX 1664 #define FF_MM_FORCE AV_CPU_FLAG_FORCE
1663 #define FF_MM_3DNOW 0x0004 ///< AMD 3DNOW 1665 #define FF_MM_MMX AV_CPU_FLAG_MMX
1664 #if LIBAVCODEC_VERSION_MAJOR < 53 1666 #define FF_MM_3DNOW AV_CPU_FLAG_3DNOW
1665 #define FF_MM_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext 1667 #define FF_MM_MMXEXT AV_CPU_FLAG_MMX2
1668 #define FF_MM_MMX2 AV_CPU_FLAG_MMX2
1669 #define FF_MM_SSE AV_CPU_FLAG_SSE
1670 #define FF_MM_SSE2 AV_CPU_FLAG_SSE2
1671 #define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW
1672 #define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT
1673 #define FF_MM_SSE3 AV_CPU_FLAG_SSE3
1674 #define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW
1675 #define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3
1676 #define FF_MM_SSE4 AV_CPU_FLAG_SSE4
1677 #define FF_MM_SSE42 AV_CPU_FLAG_SSE42
1678 #define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT
1679 #define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC
1666 #endif 1680 #endif
1667 #define FF_MM_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext
1668 #define FF_MM_SSE 0x0008 ///< SSE functions
1669 #define FF_MM_SSE2 0x0010 ///< PIV SSE2 functions
1670 #define FF_MM_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster
1671 ///< than regular MMX/SSE (e.g. Core1)
1672 #define FF_MM_3DNOWEXT 0x0020 ///< AMD 3DNowExt
1673 #define FF_MM_SSE3 0x0040 ///< Prescott SSE3 functions
1674 #define FF_MM_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster
1675 ///< than regular MMX/SSE (e.g. Core1)
1676 #define FF_MM_SSSE3 0x0080 ///< Conroe SSSE3 functions
1677 #define FF_MM_SSE4 0x0100 ///< Penryn SSE4.1 functions
1678 #define FF_MM_SSE42 0x0200 ///< Nehalem SSE4.2 functions
1679 #define FF_MM_IWMMXT 0x0100 ///< XScale IWMMXT
1680 #define FF_MM_ALTIVEC 0x0001 ///< standard AltiVec
1681 1681
1682 /** 1682 /**
1683 * bits per sample/pixel from the demuxer (needed for huffyuv). 1683 * bits per sample/pixel from the demuxer (needed for huffyuv).
1684 * - encoding: Set by libavcodec. 1684 * - encoding: Set by libavcodec.
1685 * - decoding: Set by user. 1685 * - decoding: Set by user.