yading@11
|
1 /*
|
yading@11
|
2 * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at)
|
yading@11
|
3 *
|
yading@11
|
4 * This file is part of FFmpeg.
|
yading@11
|
5 *
|
yading@11
|
6 * FFmpeg is free software; you can redistribute it and/or modify
|
yading@11
|
7 * it under the terms of the GNU General Public License as published by
|
yading@11
|
8 * the Free Software Foundation; either version 2 of the License, or
|
yading@11
|
9 * (at your option) any later version.
|
yading@11
|
10 *
|
yading@11
|
11 * FFmpeg is distributed in the hope that it will be useful,
|
yading@11
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
yading@11
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
yading@11
|
14 * GNU General Public License for more details.
|
yading@11
|
15 *
|
yading@11
|
16 * You should have received a copy of the GNU General Public License
|
yading@11
|
17 * along with FFmpeg; if not, write to the Free Software
|
yading@11
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
yading@11
|
19 */
|
yading@11
|
20
|
yading@11
|
21 #ifndef POSTPROC_POSTPROCESS_H
|
yading@11
|
22 #define POSTPROC_POSTPROCESS_H
|
yading@11
|
23
|
yading@11
|
24 /**
|
yading@11
|
25 * @file
|
yading@11
|
26 * @ingroup lpp
|
yading@11
|
27 * external API header
|
yading@11
|
28 */
|
yading@11
|
29
|
yading@11
|
30 /**
|
yading@11
|
31 * @defgroup lpp Libpostproc
|
yading@11
|
32 * @{
|
yading@11
|
33 */
|
yading@11
|
34
|
yading@11
|
35 #include "libpostproc/version.h"
|
yading@11
|
36
|
yading@11
|
37 /**
|
yading@11
|
38 * Return the LIBPOSTPROC_VERSION_INT constant.
|
yading@11
|
39 */
|
yading@11
|
40 unsigned postproc_version(void);
|
yading@11
|
41
|
yading@11
|
42 /**
|
yading@11
|
43 * Return the libpostproc build-time configuration.
|
yading@11
|
44 */
|
yading@11
|
45 const char *postproc_configuration(void);
|
yading@11
|
46
|
yading@11
|
47 /**
|
yading@11
|
48 * Return the libpostproc license.
|
yading@11
|
49 */
|
yading@11
|
50 const char *postproc_license(void);
|
yading@11
|
51
|
yading@11
|
52 #define PP_QUALITY_MAX 6
|
yading@11
|
53
|
yading@11
|
54 #define QP_STORE_T int8_t
|
yading@11
|
55
|
yading@11
|
56 #include <inttypes.h>
|
yading@11
|
57
|
yading@11
|
58 typedef void pp_context;
|
yading@11
|
59 typedef void pp_mode;
|
yading@11
|
60
|
yading@11
|
61 #if LIBPOSTPROC_VERSION_INT < (52<<16)
|
yading@11
|
62 typedef pp_context pp_context_t;
|
yading@11
|
63 typedef pp_mode pp_mode_t;
|
yading@11
|
64 extern const char *const pp_help; ///< a simple help text
|
yading@11
|
65 #else
|
yading@11
|
66 extern const char pp_help[]; ///< a simple help text
|
yading@11
|
67 #endif
|
yading@11
|
68
|
yading@11
|
69 void pp_postprocess(const uint8_t * src[3], const int srcStride[3],
|
yading@11
|
70 uint8_t * dst[3], const int dstStride[3],
|
yading@11
|
71 int horizontalSize, int verticalSize,
|
yading@11
|
72 const QP_STORE_T *QP_store, int QP_stride,
|
yading@11
|
73 pp_mode *mode, pp_context *ppContext, int pict_type);
|
yading@11
|
74
|
yading@11
|
75
|
yading@11
|
76 /**
|
yading@11
|
77 * Return a pp_mode or NULL if an error occurred.
|
yading@11
|
78 *
|
yading@11
|
79 * @param name the string after "-pp" on the command line
|
yading@11
|
80 * @param quality a number from 0 to PP_QUALITY_MAX
|
yading@11
|
81 */
|
yading@11
|
82 pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality);
|
yading@11
|
83 void pp_free_mode(pp_mode *mode);
|
yading@11
|
84
|
yading@11
|
85 pp_context *pp_get_context(int width, int height, int flags);
|
yading@11
|
86 void pp_free_context(pp_context *ppContext);
|
yading@11
|
87
|
yading@11
|
88 #define PP_CPU_CAPS_MMX 0x80000000
|
yading@11
|
89 #define PP_CPU_CAPS_MMX2 0x20000000
|
yading@11
|
90 #define PP_CPU_CAPS_3DNOW 0x40000000
|
yading@11
|
91 #define PP_CPU_CAPS_ALTIVEC 0x10000000
|
yading@11
|
92 #define PP_CPU_CAPS_AUTO 0x00080000
|
yading@11
|
93
|
yading@11
|
94 #define PP_FORMAT 0x00000008
|
yading@11
|
95 #define PP_FORMAT_420 (0x00000011|PP_FORMAT)
|
yading@11
|
96 #define PP_FORMAT_422 (0x00000001|PP_FORMAT)
|
yading@11
|
97 #define PP_FORMAT_411 (0x00000002|PP_FORMAT)
|
yading@11
|
98 #define PP_FORMAT_444 (0x00000000|PP_FORMAT)
|
yading@11
|
99
|
yading@11
|
100 #define PP_PICT_TYPE_QP2 0x00000010 ///< MPEG2 style QScale
|
yading@11
|
101
|
yading@11
|
102 /**
|
yading@11
|
103 * @}
|
yading@11
|
104 */
|
yading@11
|
105
|
yading@11
|
106 #endif /* POSTPROC_POSTPROCESS_H */
|