Browse code

remove libmpcodecs

Signed-off-by: Paul B Mahol <onemda@gmail.com>

Paul B Mahol authored on 2015/01/27 20:21:50
Showing 16 changed files
... ...
@@ -18,6 +18,7 @@ version <next>:
18 18
 - showpalette filter
19 19
 - Twofish symmetric block cipher
20 20
 - Support DNx100 (960x720@8)
21
+- removed libmpcodecs
21 22
 
22 23
 
23 24
 version 2.5:
... ...
@@ -13,7 +13,6 @@ configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
13 13
 Specifically, the GPL parts of FFmpeg are:
14 14
 
15 15
 - libpostproc
16
-- libmpcodecs
17 16
 - optional x86 optimizations in the files
18 17
   libavcodec/x86/flac_dsp_gpl.asm
19 18
   libavcodec/x86/idct_mmx.c
... ...
@@ -38,7 +37,6 @@ Specifically, the GPL parts of FFmpeg are:
38 38
     - vf_interlace.c
39 39
     - vf_kerndeint.c
40 40
     - vf_mcdeint.c
41
-    - vf_mp.c
42 41
     - vf_mpdecimate.c
43 42
     - vf_owdenoise.c
44 43
     - vf_perspective.c
... ...
@@ -2597,7 +2597,6 @@ kerndeint_filter_deps="gpl"
2597 2597
 ladspa_filter_deps="ladspa dlopen"
2598 2598
 mcdeint_filter_deps="avcodec gpl"
2599 2599
 movie_filter_deps="avcodec avformat"
2600
-mp_filter_deps="gpl avcodec swscale"
2601 2600
 mpdecimate_filter_deps="gpl"
2602 2601
 mpdecimate_filter_select="pixelutils"
2603 2602
 mptestsrc_filter_deps="gpl"
... ...
@@ -6263,35 +6263,6 @@ Higher values should result in a smoother motion vector field but less
6263 6263
 optimal individual vectors. Default value is 1.
6264 6264
 @end table
6265 6265
 
6266
-@section mp
6267
-
6268
-Apply an MPlayer filter to the input video.
6269
-
6270
-This filter provides a wrapper around some of the filters of
6271
-MPlayer/MEncoder.
6272
-
6273
-This wrapper is considered experimental. Some of the wrapped filters
6274
-may not work properly and we may drop support for them, as they will
6275
-be implemented natively into FFmpeg. Thus you should avoid
6276
-depending on them when writing portable scripts.
6277
-
6278
-The filter accepts the parameters:
6279
-@var{filter_name}[:=]@var{filter_params}
6280
-
6281
-@var{filter_name} is the name of a supported MPlayer filter,
6282
-@var{filter_params} is a string containing the parameters accepted by
6283
-the named filter.
6284
-
6285
-The list of the currently supported filters follows:
6286
-@table @var
6287
-@end table
6288
-
6289
-The parameter syntax and behavior for the listed filters are the same
6290
-of the corresponding MPlayer filters. For detailed instructions check
6291
-the "VIDEO FILTERS" section in the MPlayer manual.
6292
-
6293
-See also mplayer(1), @url{http://www.mplayerhq.hu/}.
6294
-
6295 6266
 @section mpdecimate
6296 6267
 
6297 6268
 Drop frames that do not differ greatly from the previous frame in
... ...
@@ -149,7 +149,6 @@ OBJS-$(CONFIG_LUTRGB_FILTER)                 += vf_lut.o
149 149
 OBJS-$(CONFIG_LUTYUV_FILTER)                 += vf_lut.o
150 150
 OBJS-$(CONFIG_MCDEINT_FILTER)                += vf_mcdeint.o
151 151
 OBJS-$(CONFIG_MERGEPLANES_FILTER)            += vf_mergeplanes.o framesync.o
152
-OBJS-$(CONFIG_MP_FILTER)                     += vf_mp.o
153 152
 OBJS-$(CONFIG_MPDECIMATE_FILTER)             += vf_mpdecimate.o
154 153
 OBJS-$(CONFIG_NEGATE_FILTER)                 += vf_lut.o
155 154
 OBJS-$(CONFIG_NOFORMAT_FILTER)               += vf_format.o
... ...
@@ -226,9 +225,6 @@ OBJS-$(CONFIG_TESTSRC_FILTER)                += vsrc_testsrc.o
226 226
 
227 227
 OBJS-$(CONFIG_NULLSINK_FILTER)               += vsink_nullsink.o
228 228
 
229
-OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/mp_image.o
230
-OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/img_format.o
231
-
232 229
 # multimedia filters
233 230
 OBJS-$(CONFIG_AVECTORSCOPE_FILTER)           += avf_avectorscope.o
234 231
 OBJS-$(CONFIG_CONCAT_FILTER)                 += avf_concat.o
... ...
@@ -165,7 +165,6 @@ void avfilter_register_all(void)
165 165
     REGISTER_FILTER(LUTYUV,         lutyuv,         vf);
166 166
     REGISTER_FILTER(MCDEINT,        mcdeint,        vf);
167 167
     REGISTER_FILTER(MERGEPLANES,    mergeplanes,    vf);
168
-    REGISTER_FILTER(MP,             mp,             vf);
169 168
     REGISTER_FILTER(MPDECIMATE,     mpdecimate,     vf);
170 169
     REGISTER_FILTER(NEGATE,         negate,         vf);
171 170
     REGISTER_FILTER(NOFORMAT,       noformat,       vf);
172 171
deleted file mode 100644
... ...
@@ -1,60 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#ifndef MPLAYER_CPUDETECT_H
20
-#define MPLAYER_CPUDETECT_H
21
-
22
-#define CPUTYPE_I386    3
23
-#define CPUTYPE_I486    4
24
-#define CPUTYPE_I586    5
25
-#define CPUTYPE_I686    6
26
-
27
-#include "libavutil/x86_cpu.h"
28
-
29
-typedef struct cpucaps_s {
30
-    int cpuType;
31
-    int cpuModel;
32
-    int cpuStepping;
33
-    int hasMMX;
34
-    int hasMMX2;
35
-    int has3DNow;
36
-    int has3DNowExt;
37
-    int hasSSE;
38
-    int hasSSE2;
39
-    int hasSSE3;
40
-    int hasSSSE3;
41
-    int hasSSE4;
42
-    int hasSSE42;
43
-    int hasSSE4a;
44
-    int hasAVX;
45
-    int isX86;
46
-    unsigned cl_size; /* size of cache line */
47
-    int hasAltiVec;
48
-    int hasTSC;
49
-} CpuCaps;
50
-
51
-extern CpuCaps ff_gCpuCaps;
52
-
53
-void ff_do_cpuid(unsigned int ax, unsigned int *p);
54
-
55
-void ff_GetCpuCaps(CpuCaps *caps);
56
-
57
-/* returned value is malloc()'ed so free() it after use */
58
-char *ff_GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]);
59
-
60
-#endif /* MPLAYER_CPUDETECT_H */
61 1
deleted file mode 100644
... ...
@@ -1,244 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#include "config.h"
20
-#include "img_format.h"
21
-#include "stdio.h"
22
-#include "libavutil/bswap.h"
23
-
24
-const char *ff_vo_format_name(int format)
25
-{
26
-    static char unknown_format[20];
27
-    switch(format)
28
-    {
29
-    case IMGFMT_RGB1:    return "RGB 1-bit";
30
-    case IMGFMT_RGB4:    return "RGB 4-bit";
31
-    case IMGFMT_RG4B:    return "RGB 4-bit per byte";
32
-    case IMGFMT_RGB8:    return "RGB 8-bit";
33
-    case IMGFMT_RGB12:   return "RGB 12-bit";
34
-    case IMGFMT_RGB15:   return "RGB 15-bit";
35
-    case IMGFMT_RGB16:   return "RGB 16-bit";
36
-    case IMGFMT_RGB24:   return "RGB 24-bit";
37
-//  case IMGFMT_RGB32:   return "RGB 32-bit";
38
-    case IMGFMT_RGB48LE: return "RGB 48-bit LE";
39
-    case IMGFMT_RGB48BE: return "RGB 48-bit BE";
40
-    case IMGFMT_RGB64LE: return "RGB 64-bit LE";
41
-    case IMGFMT_RGB64BE: return "RGB 64-bit BE";
42
-    case IMGFMT_BGR1:    return "BGR 1-bit";
43
-    case IMGFMT_BGR4:    return "BGR 4-bit";
44
-    case IMGFMT_BG4B:    return "BGR 4-bit per byte";
45
-    case IMGFMT_BGR8:    return "BGR 8-bit";
46
-    case IMGFMT_BGR12:   return "BGR 12-bit";
47
-    case IMGFMT_BGR15:   return "BGR 15-bit";
48
-    case IMGFMT_BGR16:   return "BGR 16-bit";
49
-    case IMGFMT_BGR24:   return "BGR 24-bit";
50
-//  case IMGFMT_BGR32:   return "BGR 32-bit";
51
-    case IMGFMT_ABGR:    return "ABGR";
52
-    case IMGFMT_BGRA:    return "BGRA";
53
-    case IMGFMT_ARGB:    return "ARGB";
54
-    case IMGFMT_RGBA:    return "RGBA";
55
-    case IMGFMT_XYZ12LE: return "XYZ 36-bit LE";
56
-    case IMGFMT_XYZ12BE: return "XYZ 36-bit BE";
57
-    case IMGFMT_GBR24P:  return "Planar GBR 24-bit";
58
-    case IMGFMT_GBR12P:  return "Planar GBR 36-bit";
59
-    case IMGFMT_GBR14P:  return "Planar GBR 42-bit";
60
-    case IMGFMT_YVU9:    return "Planar YVU9";
61
-    case IMGFMT_IF09:    return "Planar IF09";
62
-    case IMGFMT_YV12:    return "Planar YV12";
63
-    case IMGFMT_I420:    return "Planar I420";
64
-    case IMGFMT_IYUV:    return "Planar IYUV";
65
-    case IMGFMT_CLPL:    return "Planar CLPL";
66
-    case IMGFMT_Y800:    return "Planar Y800";
67
-    case IMGFMT_Y8:      return "Planar Y8";
68
-    case IMGFMT_Y8A:     return "Planar Y8 with alpha";
69
-    case IMGFMT_Y16_LE:  return "Planar Y16 little-endian";
70
-    case IMGFMT_Y16_BE:  return "Planar Y16 big-endian";
71
-    case IMGFMT_420P16_LE: return "Planar 420P 16-bit little-endian";
72
-    case IMGFMT_420P16_BE: return "Planar 420P 16-bit big-endian";
73
-    case IMGFMT_420P14_LE: return "Planar 420P 14-bit little-endian";
74
-    case IMGFMT_420P14_BE: return "Planar 420P 14-bit big-endian";
75
-    case IMGFMT_420P12_LE: return "Planar 420P 12-bit little-endian";
76
-    case IMGFMT_420P12_BE: return "Planar 420P 12-bit big-endian";
77
-    case IMGFMT_420P10_LE: return "Planar 420P 10-bit little-endian";
78
-    case IMGFMT_420P10_BE: return "Planar 420P 10-bit big-endian";
79
-    case IMGFMT_420P9_LE:  return "Planar 420P 9-bit little-endian";
80
-    case IMGFMT_420P9_BE:  return "Planar 420P 9-bit big-endian";
81
-    case IMGFMT_422P16_LE: return "Planar 422P 16-bit little-endian";
82
-    case IMGFMT_422P16_BE: return "Planar 422P 16-bit big-endian";
83
-    case IMGFMT_422P14_LE: return "Planar 422P 14-bit little-endian";
84
-    case IMGFMT_422P14_BE: return "Planar 422P 14-bit big-endian";
85
-    case IMGFMT_422P12_LE: return "Planar 422P 12-bit little-endian";
86
-    case IMGFMT_422P12_BE: return "Planar 422P 12-bit big-endian";
87
-    case IMGFMT_422P10_LE: return "Planar 422P 10-bit little-endian";
88
-    case IMGFMT_422P10_BE: return "Planar 422P 10-bit big-endian";
89
-    case IMGFMT_422P9_LE:  return "Planar 422P 9-bit little-endian";
90
-    case IMGFMT_422P9_BE:  return "Planar 422P 9-bit big-endian";
91
-    case IMGFMT_444P16_LE: return "Planar 444P 16-bit little-endian";
92
-    case IMGFMT_444P16_BE: return "Planar 444P 16-bit big-endian";
93
-    case IMGFMT_444P14_LE: return "Planar 444P 14-bit little-endian";
94
-    case IMGFMT_444P14_BE: return "Planar 444P 14-bit big-endian";
95
-    case IMGFMT_444P12_LE: return "Planar 444P 12-bit little-endian";
96
-    case IMGFMT_444P12_BE: return "Planar 444P 12-bit big-endian";
97
-    case IMGFMT_444P10_LE: return "Planar 444P 10-bit little-endian";
98
-    case IMGFMT_444P10_BE: return "Planar 444P 10-bit big-endian";
99
-    case IMGFMT_444P9_LE:  return "Planar 444P 9-bit little-endian";
100
-    case IMGFMT_444P9_BE:  return "Planar 444P 9-bit big-endian";
101
-    case IMGFMT_420A: return "Planar 420P with alpha";
102
-    case IMGFMT_444P: return "Planar 444P";
103
-    case IMGFMT_444A: return "Planar 444P with alpha";
104
-    case IMGFMT_422P: return "Planar 422P";
105
-    case IMGFMT_422A: return "Planar 422P with alpha";
106
-    case IMGFMT_411P: return "Planar 411P";
107
-    case IMGFMT_440P: return "Planar 440P";
108
-    case IMGFMT_NV12: return "Planar NV12";
109
-    case IMGFMT_NV21: return "Planar NV21";
110
-    case IMGFMT_HM12: return "Planar NV12 Macroblock";
111
-    case IMGFMT_IUYV: return "Packed IUYV";
112
-    case IMGFMT_IY41: return "Packed IY41";
113
-    case IMGFMT_IYU1: return "Packed IYU1";
114
-    case IMGFMT_IYU2: return "Packed IYU2";
115
-    case IMGFMT_UYVY: return "Packed UYVY";
116
-    case IMGFMT_UYNV: return "Packed UYNV";
117
-    case IMGFMT_cyuv: return "Packed CYUV";
118
-    case IMGFMT_Y422: return "Packed Y422";
119
-    case IMGFMT_YUY2: return "Packed YUY2";
120
-    case IMGFMT_YUNV: return "Packed YUNV";
121
-    case IMGFMT_YVYU: return "Packed YVYU";
122
-    case IMGFMT_Y41P: return "Packed Y41P";
123
-    case IMGFMT_Y211: return "Packed Y211";
124
-    case IMGFMT_Y41T: return "Packed Y41T";
125
-    case IMGFMT_Y42T: return "Packed Y42T";
126
-    case IMGFMT_V422: return "Packed V422";
127
-    case IMGFMT_V655: return "Packed V655";
128
-    case IMGFMT_CLJR: return "Packed CLJR";
129
-    case IMGFMT_YUVP: return "Packed YUVP";
130
-    case IMGFMT_UYVP: return "Packed UYVP";
131
-    case IMGFMT_MPEGPES:         return "Mpeg PES";
132
-    case IMGFMT_ZRMJPEGNI:       return "Zoran MJPEG non-interlaced";
133
-    case IMGFMT_ZRMJPEGIT:       return "Zoran MJPEG top field first";
134
-    case IMGFMT_ZRMJPEGIB:       return "Zoran MJPEG bottom field first";
135
-    case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation";
136
-    case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT";
137
-    case IMGFMT_VDPAU_MPEG1:     return "MPEG1 VDPAU acceleration";
138
-    case IMGFMT_VDPAU_MPEG2:     return "MPEG2 VDPAU acceleration";
139
-    case IMGFMT_VDPAU_H264:      return "H.264 VDPAU acceleration";
140
-    case IMGFMT_VDPAU_MPEG4:     return "MPEG-4 Part 2 VDPAU acceleration";
141
-    case IMGFMT_VDPAU_WMV3:      return "WMV3 VDPAU acceleration";
142
-    case IMGFMT_VDPAU_VC1:       return "VC1 VDPAU acceleration";
143
-    }
144
-    snprintf(unknown_format,20,"Unknown 0x%04x",format);
145
-    return unknown_format;
146
-}
147
-
148
-int ff_mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits)
149
-{
150
-    int xs = 0, ys = 0;
151
-    int bpp;
152
-    int err = 0;
153
-    int bits = 8;
154
-    if ((format & 0xff0000f0) == 0x34000050)
155
-        format = av_bswap32(format);
156
-    if ((format & 0xf00000ff) == 0x50000034) {
157
-        switch (format >> 24) {
158
-        case 0x50:
159
-            break;
160
-        case 0x51:
161
-            bits = 16;
162
-            break;
163
-        case 0x52:
164
-            bits = 10;
165
-            break;
166
-        case 0x53:
167
-            bits = 9;
168
-            break;
169
-        default:
170
-            err = 1;
171
-            break;
172
-        }
173
-        switch (format & 0x00ffffff) {
174
-        case 0x00343434: // 444
175
-            xs = 0;
176
-            ys = 0;
177
-            break;
178
-        case 0x00323234: // 422
179
-            xs = 1;
180
-            ys = 0;
181
-            break;
182
-        case 0x00303234: // 420
183
-            xs = 1;
184
-            ys = 1;
185
-            break;
186
-        case 0x00313134: // 411
187
-            xs = 2;
188
-            ys = 0;
189
-            break;
190
-        case 0x00303434: // 440
191
-            xs = 0;
192
-            ys = 1;
193
-            break;
194
-        default:
195
-            err = 1;
196
-            break;
197
-        }
198
-    } else switch (format) {
199
-    case IMGFMT_444A:
200
-        xs = 0;
201
-        ys = 0;
202
-        break;
203
-    case IMGFMT_422A:
204
-        xs = 1;
205
-        ys = 0;
206
-        break;
207
-    case IMGFMT_420A:
208
-    case IMGFMT_I420:
209
-    case IMGFMT_IYUV:
210
-    case IMGFMT_YV12:
211
-        xs = 1;
212
-        ys = 1;
213
-        break;
214
-    case IMGFMT_IF09:
215
-    case IMGFMT_YVU9:
216
-        xs = 2;
217
-        ys = 2;
218
-        break;
219
-    case IMGFMT_Y8:
220
-    case IMGFMT_Y800:
221
-        xs = 31;
222
-        ys = 31;
223
-        break;
224
-    case IMGFMT_NV12:
225
-    case IMGFMT_NV21:
226
-        xs = 1;
227
-        ys = 1;
228
-        // TODO: allowing this though currently breaks
229
-        // things all over the place.
230
-        err = 1;
231
-        break;
232
-    default:
233
-        err = 1;
234
-        break;
235
-    }
236
-    if (x_shift) *x_shift = xs;
237
-    if (y_shift) *y_shift = ys;
238
-    if (component_bits) *component_bits = bits;
239
-    bpp = 8 + ((16 >> xs) >> ys);
240
-    if (format == IMGFMT_420A || format == IMGFMT_422A || format == IMGFMT_444A)
241
-        bpp += 8;
242
-    bpp *= (bits + 7) >> 3;
243
-    return err ? 0 : bpp;
244
-}
245 1
deleted file mode 100644
... ...
@@ -1,309 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#ifndef MPLAYER_IMG_FORMAT_H
20
-#define MPLAYER_IMG_FORMAT_H
21
-
22
-#include "config.h"
23
-
24
-/* RGB/BGR Formats */
25
-
26
-#define IMGFMT_RGB_MASK 0xFFFFFF00
27
-#define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8))
28
-#define IMGFMT_RGB1  (IMGFMT_RGB|1)
29
-#define IMGFMT_RGB4  (IMGFMT_RGB|4)
30
-#define IMGFMT_RGB4_CHAR  (IMGFMT_RGB|4|128) // RGB4 with 1 pixel per byte
31
-#define IMGFMT_RGB8  (IMGFMT_RGB|8)
32
-#define IMGFMT_RGB12 (IMGFMT_RGB|12)
33
-#define IMGFMT_RGB15 (IMGFMT_RGB|15)
34
-#define IMGFMT_RGB16 (IMGFMT_RGB|16)
35
-#define IMGFMT_RGB24 (IMGFMT_RGB|24)
36
-#define IMGFMT_RGB32 (IMGFMT_RGB|32)
37
-#define IMGFMT_RGB48LE (IMGFMT_RGB|48)
38
-#define IMGFMT_RGB48BE (IMGFMT_RGB|48|128)
39
-#define IMGFMT_RGB64LE (IMGFMT_RGB|64)
40
-#define IMGFMT_RGB64BE (IMGFMT_RGB|64|128)
41
-
42
-#define IMGFMT_BGR_MASK 0xFFFFFF00
43
-#define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8))
44
-#define IMGFMT_BGR1  (IMGFMT_BGR|1)
45
-#define IMGFMT_BGR4  (IMGFMT_BGR|4)
46
-#define IMGFMT_BGR4_CHAR (IMGFMT_BGR|4|128) // BGR4 with 1 pixel per byte
47
-#define IMGFMT_BGR8  (IMGFMT_BGR|8)
48
-#define IMGFMT_BGR12 (IMGFMT_BGR|12)
49
-#define IMGFMT_BGR15 (IMGFMT_BGR|15)
50
-#define IMGFMT_BGR16 (IMGFMT_BGR|16)
51
-#define IMGFMT_BGR24 (IMGFMT_BGR|24)
52
-#define IMGFMT_BGR32 (IMGFMT_BGR|32)
53
-
54
-#define IMGFMT_XYZ_MASK 0xFFFFFF00
55
-#define IMGFMT_XYZ (('X'<<24)|('Y'<<16)|('Z'<<8))
56
-#define IMGFMT_XYZ12LE (IMGFMT_XYZ|12)
57
-#define IMGFMT_XYZ12BE (IMGFMT_XYZ|12|128)
58
-
59
-#define IMGFMT_GBR24P (('G'<<24)|('B'<<16)|('R'<<8)|24)
60
-#define IMGFMT_GBR12PLE (('G'<<24)|('B'<<16)|('R'<<8)|36)
61
-#define IMGFMT_GBR12PBE (('G'<<24)|('B'<<16)|('R'<<8)|36|128)
62
-#define IMGFMT_GBR14PLE (('G'<<24)|('B'<<16)|('R'<<8)|42)
63
-#define IMGFMT_GBR14PBE (('G'<<24)|('B'<<16)|('R'<<8)|42|128)
64
-
65
-#if HAVE_BIGENDIAN
66
-#define IMGFMT_ABGR    IMGFMT_RGB32
67
-#define IMGFMT_BGRA    (IMGFMT_RGB32|128)
68
-#define IMGFMT_ARGB    IMGFMT_BGR32
69
-#define IMGFMT_RGBA    (IMGFMT_BGR32|128)
70
-#define IMGFMT_RGB64NE IMGFMT_RGB64BE
71
-#define IMGFMT_RGB48NE IMGFMT_RGB48BE
72
-#define IMGFMT_RGB12BE IMGFMT_RGB12
73
-#define IMGFMT_RGB12LE (IMGFMT_RGB12|128)
74
-#define IMGFMT_RGB15BE IMGFMT_RGB15
75
-#define IMGFMT_RGB15LE (IMGFMT_RGB15|128)
76
-#define IMGFMT_RGB16BE IMGFMT_RGB16
77
-#define IMGFMT_RGB16LE (IMGFMT_RGB16|128)
78
-#define IMGFMT_BGR12BE IMGFMT_BGR12
79
-#define IMGFMT_BGR12LE (IMGFMT_BGR12|128)
80
-#define IMGFMT_BGR15BE IMGFMT_BGR15
81
-#define IMGFMT_BGR15LE (IMGFMT_BGR15|128)
82
-#define IMGFMT_BGR16BE IMGFMT_BGR16
83
-#define IMGFMT_BGR16LE (IMGFMT_BGR16|128)
84
-#define IMGFMT_XYZ12  IMGFMT_XYZ12BE
85
-#define IMGFMT_GBR12P IMGFMT_GBR12PBE
86
-#define IMGFMT_GBR14P IMGFMT_GBR14PBE
87
-#else
88
-#define IMGFMT_ABGR (IMGFMT_BGR32|128)
89
-#define IMGFMT_BGRA IMGFMT_BGR32
90
-#define IMGFMT_ARGB (IMGFMT_RGB32|128)
91
-#define IMGFMT_RGBA IMGFMT_RGB32
92
-#define IMGFMT_RGB64NE IMGFMT_RGB64LE
93
-#define IMGFMT_RGB48NE IMGFMT_RGB48LE
94
-#define IMGFMT_RGB12BE (IMGFMT_RGB12|128)
95
-#define IMGFMT_RGB12LE IMGFMT_RGB12
96
-#define IMGFMT_RGB15BE (IMGFMT_RGB15|128)
97
-#define IMGFMT_RGB15LE IMGFMT_RGB15
98
-#define IMGFMT_RGB16BE (IMGFMT_RGB16|128)
99
-#define IMGFMT_RGB16LE IMGFMT_RGB16
100
-#define IMGFMT_BGR12BE (IMGFMT_BGR12|128)
101
-#define IMGFMT_BGR12LE IMGFMT_BGR12
102
-#define IMGFMT_BGR15BE (IMGFMT_BGR15|128)
103
-#define IMGFMT_BGR15LE IMGFMT_BGR15
104
-#define IMGFMT_BGR16BE (IMGFMT_BGR16|128)
105
-#define IMGFMT_BGR16LE IMGFMT_BGR16
106
-#define IMGFMT_XYZ12  IMGFMT_XYZ12LE
107
-#define IMGFMT_GBR12P IMGFMT_GBR12PLE
108
-#define IMGFMT_GBR14P IMGFMT_GBR14PLE
109
-#endif
110
-
111
-/* old names for compatibility */
112
-#define IMGFMT_RG4B  IMGFMT_RGB4_CHAR
113
-#define IMGFMT_BG4B  IMGFMT_BGR4_CHAR
114
-
115
-#define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
116
-#define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
117
-#define IMGFMT_IS_XYZ(fmt) (((fmt)&IMGFMT_XYZ_MASK)==IMGFMT_XYZ)
118
-
119
-#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x7F)
120
-#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x7F)
121
-#define IMGFMT_XYZ_DEPTH(fmt) ((fmt)&0x7F)
122
-
123
-
124
-/* Planar YUV Formats */
125
-
126
-#define IMGFMT_YVU9 0x39555659
127
-#define IMGFMT_IF09 0x39304649
128
-#define IMGFMT_YV12 0x32315659
129
-#define IMGFMT_I420 0x30323449
130
-#define IMGFMT_IYUV 0x56555949
131
-#define IMGFMT_CLPL 0x4C504C43
132
-#define IMGFMT_Y800 0x30303859
133
-#define IMGFMT_Y8   0x20203859
134
-#define IMGFMT_NV12 0x3231564E
135
-#define IMGFMT_NV21 0x3132564E
136
-#define IMGFMT_Y16_LE 0x20363159
137
-
138
-/* unofficial Planar Formats, FIXME if official 4CC exists */
139
-#define IMGFMT_444P 0x50343434
140
-#define IMGFMT_422P 0x50323234
141
-#define IMGFMT_411P 0x50313134
142
-#define IMGFMT_440P 0x50303434
143
-#define IMGFMT_HM12 0x32314D48
144
-#define IMGFMT_Y16_BE 0x59313620
145
-
146
-// Gray with alpha
147
-#define IMGFMT_Y8A 0x59320008
148
-// 4:2:0 planar with alpha
149
-#define IMGFMT_420A 0x41303234
150
-// 4:2:2 planar with alpha
151
-#define IMGFMT_422A 0x41323234
152
-// 4:4:4 planar with alpha
153
-#define IMGFMT_444A 0x41343434
154
-
155
-#define IMGFMT_444P16_LE 0x51343434
156
-#define IMGFMT_444P16_BE 0x34343451
157
-#define IMGFMT_444P14_LE 0x54343434
158
-#define IMGFMT_444P14_BE 0x34343454
159
-#define IMGFMT_444P12_LE 0x55343434
160
-#define IMGFMT_444P12_BE 0x34343455
161
-#define IMGFMT_444P10_LE 0x52343434
162
-#define IMGFMT_444P10_BE 0x34343452
163
-#define IMGFMT_444P9_LE  0x53343434
164
-#define IMGFMT_444P9_BE  0x34343453
165
-#define IMGFMT_422P16_LE 0x51323234
166
-#define IMGFMT_422P16_BE 0x34323251
167
-#define IMGFMT_422P14_LE 0x54323234
168
-#define IMGFMT_422P14_BE 0x34323254
169
-#define IMGFMT_422P12_LE 0x55323234
170
-#define IMGFMT_422P12_BE 0x34323255
171
-#define IMGFMT_422P10_LE 0x52323234
172
-#define IMGFMT_422P10_BE 0x34323252
173
-#define IMGFMT_422P9_LE  0x53323234
174
-#define IMGFMT_422P9_BE  0x34323253
175
-#define IMGFMT_420P16_LE 0x51303234
176
-#define IMGFMT_420P16_BE 0x34323051
177
-#define IMGFMT_420P14_LE 0x54303234
178
-#define IMGFMT_420P14_BE 0x34323054
179
-#define IMGFMT_420P12_LE 0x55303234
180
-#define IMGFMT_420P12_BE 0x34323055
181
-#define IMGFMT_420P10_LE 0x52303234
182
-#define IMGFMT_420P10_BE 0x34323052
183
-#define IMGFMT_420P9_LE  0x53303234
184
-#define IMGFMT_420P9_BE  0x34323053
185
-#if HAVE_BIGENDIAN
186
-#define IMGFMT_444P16 IMGFMT_444P16_BE
187
-#define IMGFMT_444P14 IMGFMT_444P14_BE
188
-#define IMGFMT_444P12 IMGFMT_444P12_BE
189
-#define IMGFMT_444P10 IMGFMT_444P10_BE
190
-#define IMGFMT_444P9  IMGFMT_444P9_BE
191
-#define IMGFMT_422P16 IMGFMT_422P16_BE
192
-#define IMGFMT_422P14 IMGFMT_422P14_BE
193
-#define IMGFMT_422P12 IMGFMT_422P12_BE
194
-#define IMGFMT_422P10 IMGFMT_422P10_BE
195
-#define IMGFMT_422P9  IMGFMT_422P9_BE
196
-#define IMGFMT_420P16 IMGFMT_420P16_BE
197
-#define IMGFMT_420P14 IMGFMT_420P14_BE
198
-#define IMGFMT_420P12 IMGFMT_420P12_BE
199
-#define IMGFMT_420P10 IMGFMT_420P10_BE
200
-#define IMGFMT_420P9  IMGFMT_420P9_BE
201
-#define IMGFMT_Y16    IMGFMT_Y16_BE
202
-#define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_BE(fmt)
203
-#else
204
-#define IMGFMT_444P16 IMGFMT_444P16_LE
205
-#define IMGFMT_444P14 IMGFMT_444P14_LE
206
-#define IMGFMT_444P12 IMGFMT_444P12_LE
207
-#define IMGFMT_444P10 IMGFMT_444P10_LE
208
-#define IMGFMT_444P9  IMGFMT_444P9_LE
209
-#define IMGFMT_422P16 IMGFMT_422P16_LE
210
-#define IMGFMT_422P14 IMGFMT_422P14_LE
211
-#define IMGFMT_422P12 IMGFMT_422P12_LE
212
-#define IMGFMT_422P10 IMGFMT_422P10_LE
213
-#define IMGFMT_422P9  IMGFMT_422P9_LE
214
-#define IMGFMT_420P16 IMGFMT_420P16_LE
215
-#define IMGFMT_420P14 IMGFMT_420P14_LE
216
-#define IMGFMT_420P12 IMGFMT_420P12_LE
217
-#define IMGFMT_420P10 IMGFMT_420P10_LE
218
-#define IMGFMT_420P9  IMGFMT_420P9_LE
219
-#define IMGFMT_Y16    IMGFMT_Y16_LE
220
-#define IMGFMT_IS_YUVP16_NE(fmt) IMGFMT_IS_YUVP16_LE(fmt)
221
-#endif
222
-
223
-#define IMGFMT_IS_YUVP16_LE(fmt) (((fmt - 0x51000034) & 0xfc0000ff) == 0)
224
-#define IMGFMT_IS_YUVP16_BE(fmt) (((fmt - 0x34000051) & 0xff0000fc) == 0)
225
-#define IMGFMT_IS_YUVP16(fmt)    (IMGFMT_IS_YUVP16_LE(fmt) || IMGFMT_IS_YUVP16_BE(fmt))
226
-
227
-/**
228
- * \brief Find the corresponding full 16 bit format, i.e. IMGFMT_420P10_LE -> IMGFMT_420P16_LE
229
- * \return normalized format ID or 0 if none exists.
230
- */
231
-static inline int normalize_yuvp16(int fmt) {
232
-    if (IMGFMT_IS_YUVP16_LE(fmt))
233
-        return (fmt & 0x00ffffff) | 0x51000000;
234
-    if (IMGFMT_IS_YUVP16_BE(fmt))
235
-        return (fmt & 0xffffff00) | 0x00000051;
236
-    return 0;
237
-}
238
-
239
-/* Packed YUV Formats */
240
-
241
-#define IMGFMT_IUYV 0x56595549 // Interlaced UYVY
242
-#define IMGFMT_IY41 0x31435949 // Interlaced Y41P
243
-#define IMGFMT_IYU1 0x31555949
244
-#define IMGFMT_IYU2 0x32555949
245
-#define IMGFMT_UYVY 0x59565955
246
-#define IMGFMT_UYNV 0x564E5955 // Exactly same as UYVY
247
-#define IMGFMT_cyuv 0x76757963 // upside-down UYVY
248
-#define IMGFMT_Y422 0x32323459 // Exactly same as UYVY
249
-#define IMGFMT_YUY2 0x32595559
250
-#define IMGFMT_YUNV 0x564E5559 // Exactly same as YUY2
251
-#define IMGFMT_YVYU 0x55595659
252
-#define IMGFMT_Y41P 0x50313459
253
-#define IMGFMT_Y211 0x31313259
254
-#define IMGFMT_Y41T 0x54313459 // Y41P, Y lsb = transparency
255
-#define IMGFMT_Y42T 0x54323459 // UYVY, Y lsb = transparency
256
-#define IMGFMT_V422 0x32323456 // upside-down UYVY?
257
-#define IMGFMT_V655 0x35353656
258
-#define IMGFMT_CLJR 0x524A4C43
259
-#define IMGFMT_YUVP 0x50565559 // 10-bit YUYV
260
-#define IMGFMT_UYVP 0x50565955 // 10-bit UYVY
261
-
262
-/* Compressed Formats */
263
-#define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S'))
264
-#define IMGFMT_MJPEG (('M')|('J'<<8)|('P'<<16)|('G'<<24))
265
-/* Formats that are understood by zoran chips, we include
266
- * non-interlaced, interlaced top-first, interlaced bottom-first */
267
-#define IMGFMT_ZRMJPEGNI  (('Z'<<24)|('R'<<16)|('N'<<8)|('I'))
268
-#define IMGFMT_ZRMJPEGIT (('Z'<<24)|('R'<<16)|('I'<<8)|('T'))
269
-#define IMGFMT_ZRMJPEGIB (('Z'<<24)|('R'<<16)|('I'<<8)|('B'))
270
-
271
-// I think that this code could not be used by any other codec/format
272
-#define IMGFMT_XVMC 0x1DC70000
273
-#define IMGFMT_XVMC_MASK 0xFFFF0000
274
-#define IMGFMT_IS_XVMC(fmt) (((fmt)&IMGFMT_XVMC_MASK)==IMGFMT_XVMC)
275
-//these are chroma420
276
-#define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02)
277
-#define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82)
278
-
279
-// VDPAU specific format.
280
-#define IMGFMT_VDPAU               0x1DC80000
281
-#define IMGFMT_VDPAU_MASK          0xFFFF0000
282
-#define IMGFMT_IS_VDPAU(fmt)       (((fmt)&IMGFMT_VDPAU_MASK)==IMGFMT_VDPAU)
283
-#define IMGFMT_VDPAU_MPEG1         (IMGFMT_VDPAU|0x01)
284
-#define IMGFMT_VDPAU_MPEG2         (IMGFMT_VDPAU|0x02)
285
-#define IMGFMT_VDPAU_H264          (IMGFMT_VDPAU|0x03)
286
-#define IMGFMT_VDPAU_WMV3          (IMGFMT_VDPAU|0x04)
287
-#define IMGFMT_VDPAU_VC1           (IMGFMT_VDPAU|0x05)
288
-#define IMGFMT_VDPAU_MPEG4         (IMGFMT_VDPAU|0x06)
289
-
290
-#define IMGFMT_IS_HWACCEL(fmt) (IMGFMT_IS_VDPAU(fmt) || IMGFMT_IS_XVMC(fmt))
291
-
292
-typedef struct {
293
-    void* data;
294
-    int size;
295
-    int id;        // stream id. usually 0x1E0
296
-    int timestamp; // pts, 90000 Hz counter based
297
-} vo_mpegpes_t;
298
-
299
-const char *ff_vo_format_name(int format);
300
-
301
-/**
302
- * Calculates the scale shifts for the chroma planes for planar YUV
303
- *
304
- * \param component_bits bits per component
305
- * \return bits-per-pixel for format if successful (i.e. format is 3 or 4-planes planar YUV), 0 otherwise
306
- */
307
-int ff_mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits);
308
-
309
-#endif /* MPLAYER_IMG_FORMAT_H */
310 1
deleted file mode 100644
... ...
@@ -1,99 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU Lesser General Public
6
- * License as published by the Free Software Foundation; either
7
- * version 2.1 of the License, or (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
- * Lesser General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU Lesser General Public
15
- * License along with MPlayer; if not, write to the Free Software
16
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
- */
18
-
19
-#ifndef MPLAYER_FASTMEMCPY_H
20
-#define MPLAYER_FASTMEMCPY_H
21
-
22
-#include <inttypes.h>
23
-#include <string.h>
24
-#include <stddef.h>
25
-
26
-void * fast_memcpy(void * to, const void * from, size_t len);
27
-void * mem2agpcpy(void * to, const void * from, size_t len);
28
-
29
-#if ! defined(CONFIG_FASTMEMCPY) || ! (HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW /* || HAVE_SSE || HAVE_SSE2 */)
30
-#define mem2agpcpy(a,b,c) memcpy(a,b,c)
31
-#define fast_memcpy(a,b,c) memcpy(a,b,c)
32
-#endif
33
-
34
-static inline void * mem2agpcpy_pic(void * dst, const void * src, int bytesPerLine, int height, int dstStride, int srcStride)
35
-{
36
-    int i;
37
-    void *retval=dst;
38
-
39
-    if(dstStride == srcStride)
40
-    {
41
-        if (srcStride < 0) {
42
-                src = (const uint8_t*)src + (height-1)*srcStride;
43
-                dst = (uint8_t*)dst + (height-1)*dstStride;
44
-                srcStride = -srcStride;
45
-        }
46
-
47
-        mem2agpcpy(dst, src, srcStride*height);
48
-    }
49
-    else
50
-    {
51
-        for(i=0; i<height; i++)
52
-        {
53
-            mem2agpcpy(dst, src, bytesPerLine);
54
-            src = (const uint8_t*)src + srcStride;
55
-            dst = (uint8_t*)dst + dstStride;
56
-        }
57
-    }
58
-
59
-    return retval;
60
-}
61
-
62
-#define memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 0)
63
-#define my_memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 1)
64
-
65
-/**
66
- * \param limit2width always skip data between end of line and start of next
67
- *                    instead of copying the full block when strides are the same
68
- */
69
-static inline void * memcpy_pic2(void * dst, const void * src,
70
-                                 int bytesPerLine, int height,
71
-                                 int dstStride, int srcStride, int limit2width)
72
-{
73
-    int i;
74
-    void *retval=dst;
75
-
76
-    if(!limit2width && dstStride == srcStride)
77
-    {
78
-        if (srcStride < 0) {
79
-                src = (const uint8_t*)src + (height-1)*srcStride;
80
-                dst = (uint8_t*)dst + (height-1)*dstStride;
81
-                srcStride = -srcStride;
82
-        }
83
-
84
-        fast_memcpy(dst, src, srcStride*height);
85
-    }
86
-    else
87
-    {
88
-        for(i=0; i<height; i++)
89
-        {
90
-            fast_memcpy(dst, src, bytesPerLine);
91
-            src = (const uint8_t*)src + srcStride;
92
-            dst = (uint8_t*)dst + dstStride;
93
-        }
94
-    }
95
-
96
-    return retval;
97
-}
98
-
99
-#endif /* MPLAYER_FASTMEMCPY_H */
100 1
deleted file mode 100644
... ...
@@ -1,257 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#include "config.h"
20
-
21
-#include <stdio.h>
22
-#include <stdlib.h>
23
-#include <string.h>
24
-
25
-#if HAVE_MALLOC_H
26
-#include <malloc.h>
27
-#endif
28
-
29
-#include "img_format.h"
30
-#include "mp_image.h"
31
-
32
-#include "libvo/fastmemcpy.h"
33
-//#include "libavutil/mem.h"
34
-#include "libavutil/imgutils.h"
35
-
36
-void ff_mp_image_alloc_planes(mp_image_t *mpi) {
37
-    uint32_t temp[256];
38
-    if (avpriv_set_systematic_pal2(temp, ff_mp2ff_pix_fmt(mpi->imgfmt)) >= 0)
39
-        mpi->flags |= MP_IMGFLAG_RGB_PALETTE;
40
-
41
-  // IF09 - allocate space for 4. plane delta info - unused
42
-  if (mpi->imgfmt == IMGFMT_IF09) {
43
-    mpi->planes[0]=av_malloc(mpi->bpp*mpi->width*(mpi->height+2)/8+
44
-                            mpi->chroma_width*mpi->chroma_height);
45
-  } else
46
-    mpi->planes[0]=av_malloc(mpi->bpp*mpi->width*(mpi->height+2)/8);
47
-  if (mpi->flags&MP_IMGFLAG_PLANAR) {
48
-    int bpp = IMGFMT_IS_YUVP16(mpi->imgfmt)? 2 : 1;
49
-    // YV12/I420/YVU9/IF09. feel free to add other planar formats here...
50
-    mpi->stride[0]=mpi->stride[3]=bpp*mpi->width;
51
-    if(mpi->num_planes > 2){
52
-      mpi->stride[1]=mpi->stride[2]=bpp*mpi->chroma_width;
53
-      if(mpi->flags&MP_IMGFLAG_SWAPPED){
54
-        // I420/IYUV  (Y,U,V)
55
-        mpi->planes[1]=mpi->planes[0]+mpi->stride[0]*mpi->height;
56
-        mpi->planes[2]=mpi->planes[1]+mpi->stride[1]*mpi->chroma_height;
57
-        if (mpi->num_planes > 3)
58
-            mpi->planes[3]=mpi->planes[2]+mpi->stride[2]*mpi->chroma_height;
59
-      } else {
60
-        // YV12,YVU9,IF09  (Y,V,U)
61
-        mpi->planes[2]=mpi->planes[0]+mpi->stride[0]*mpi->height;
62
-        mpi->planes[1]=mpi->planes[2]+mpi->stride[1]*mpi->chroma_height;
63
-        if (mpi->num_planes > 3)
64
-            mpi->planes[3]=mpi->planes[1]+mpi->stride[1]*mpi->chroma_height;
65
-      }
66
-    } else {
67
-      // NV12/NV21
68
-      mpi->stride[1]=mpi->chroma_width;
69
-      mpi->planes[1]=mpi->planes[0]+mpi->stride[0]*mpi->height;
70
-    }
71
-  } else {
72
-    mpi->stride[0]=mpi->width*mpi->bpp/8;
73
-    if (mpi->flags & MP_IMGFLAG_RGB_PALETTE) {
74
-      mpi->planes[1] = av_malloc(1024);
75
-      memcpy(mpi->planes[1], temp, 1024);
76
-    }
77
-  }
78
-  mpi->flags|=MP_IMGFLAG_ALLOCATED;
79
-}
80
-
81
-mp_image_t* ff_alloc_mpi(int w, int h, unsigned long int fmt) {
82
-  mp_image_t* mpi = ff_new_mp_image(w,h);
83
-
84
-  ff_mp_image_setfmt(mpi,fmt);
85
-  ff_mp_image_alloc_planes(mpi);
86
-
87
-  return mpi;
88
-}
89
-
90
-void ff_copy_mpi(mp_image_t *dmpi, mp_image_t *mpi) {
91
-  if(mpi->flags&MP_IMGFLAG_PLANAR){
92
-    memcpy_pic(dmpi->planes[0],mpi->planes[0], mpi->w, mpi->h,
93
-               dmpi->stride[0],mpi->stride[0]);
94
-    memcpy_pic(dmpi->planes[1],mpi->planes[1], mpi->chroma_width, mpi->chroma_height,
95
-               dmpi->stride[1],mpi->stride[1]);
96
-    memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->chroma_width, mpi->chroma_height,
97
-               dmpi->stride[2],mpi->stride[2]);
98
-  } else {
99
-    memcpy_pic(dmpi->planes[0],mpi->planes[0],
100
-               mpi->w*(dmpi->bpp/8), mpi->h,
101
-               dmpi->stride[0],mpi->stride[0]);
102
-  }
103
-}
104
-
105
-void ff_mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
106
-    mpi->flags&=~(MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV|MP_IMGFLAG_SWAPPED);
107
-    mpi->imgfmt=out_fmt;
108
-    // compressed formats
109
-    if(out_fmt == IMGFMT_MPEGPES ||
110
-       out_fmt == IMGFMT_ZRMJPEGNI || out_fmt == IMGFMT_ZRMJPEGIT || out_fmt == IMGFMT_ZRMJPEGIB ||
111
-       IMGFMT_IS_HWACCEL(out_fmt)){
112
-        mpi->bpp=0;
113
-        return;
114
-    }
115
-    mpi->num_planes=1;
116
-    if (IMGFMT_IS_RGB(out_fmt)) {
117
-        if (IMGFMT_RGB_DEPTH(out_fmt) < 8 && !(out_fmt&128))
118
-            mpi->bpp = IMGFMT_RGB_DEPTH(out_fmt);
119
-        else
120
-            mpi->bpp=(IMGFMT_RGB_DEPTH(out_fmt)+7)&(~7);
121
-        return;
122
-    }
123
-    if (IMGFMT_IS_BGR(out_fmt)) {
124
-        if (IMGFMT_BGR_DEPTH(out_fmt) < 8 && !(out_fmt&128))
125
-            mpi->bpp = IMGFMT_BGR_DEPTH(out_fmt);
126
-        else
127
-            mpi->bpp=(IMGFMT_BGR_DEPTH(out_fmt)+7)&(~7);
128
-        mpi->flags|=MP_IMGFLAG_SWAPPED;
129
-        return;
130
-    }
131
-    if (IMGFMT_IS_XYZ(out_fmt)) {
132
-        mpi->bpp=3*((IMGFMT_XYZ_DEPTH(out_fmt) + 7) & ~7);
133
-        return;
134
-    }
135
-    mpi->num_planes=3;
136
-    if (out_fmt == IMGFMT_GBR24P) {
137
-        mpi->bpp=24;
138
-        mpi->flags|=MP_IMGFLAG_PLANAR;
139
-        return;
140
-    } else if (out_fmt == IMGFMT_GBR12P) {
141
-        mpi->bpp=36;
142
-        mpi->flags|=MP_IMGFLAG_PLANAR;
143
-        return;
144
-    } else if (out_fmt == IMGFMT_GBR14P) {
145
-        mpi->bpp=42;
146
-        mpi->flags|=MP_IMGFLAG_PLANAR;
147
-        return;
148
-    }
149
-    mpi->flags|=MP_IMGFLAG_YUV;
150
-    if (ff_mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) {
151
-        mpi->flags|=MP_IMGFLAG_PLANAR;
152
-        mpi->bpp = ff_mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL);
153
-        mpi->chroma_width  = mpi->width  >> mpi->chroma_x_shift;
154
-        mpi->chroma_height = mpi->height >> mpi->chroma_y_shift;
155
-    }
156
-    switch(out_fmt){
157
-    case IMGFMT_I420:
158
-    case IMGFMT_IYUV:
159
-        mpi->flags|=MP_IMGFLAG_SWAPPED;
160
-    case IMGFMT_YV12:
161
-        return;
162
-    case IMGFMT_420A:
163
-    case IMGFMT_422A:
164
-    case IMGFMT_444A:
165
-    case IMGFMT_IF09:
166
-        mpi->num_planes=4;
167
-    case IMGFMT_YVU9:
168
-    case IMGFMT_444P:
169
-    case IMGFMT_422P:
170
-    case IMGFMT_411P:
171
-    case IMGFMT_440P:
172
-    case IMGFMT_444P16_LE:
173
-    case IMGFMT_444P16_BE:
174
-    case IMGFMT_444P14_LE:
175
-    case IMGFMT_444P14_BE:
176
-    case IMGFMT_444P12_LE:
177
-    case IMGFMT_444P12_BE:
178
-    case IMGFMT_444P10_LE:
179
-    case IMGFMT_444P10_BE:
180
-    case IMGFMT_444P9_LE:
181
-    case IMGFMT_444P9_BE:
182
-    case IMGFMT_422P16_LE:
183
-    case IMGFMT_422P16_BE:
184
-    case IMGFMT_422P14_LE:
185
-    case IMGFMT_422P14_BE:
186
-    case IMGFMT_422P12_LE:
187
-    case IMGFMT_422P12_BE:
188
-    case IMGFMT_422P10_LE:
189
-    case IMGFMT_422P10_BE:
190
-    case IMGFMT_422P9_LE:
191
-    case IMGFMT_422P9_BE:
192
-    case IMGFMT_420P16_LE:
193
-    case IMGFMT_420P16_BE:
194
-    case IMGFMT_420P14_LE:
195
-    case IMGFMT_420P14_BE:
196
-    case IMGFMT_420P12_LE:
197
-    case IMGFMT_420P12_BE:
198
-    case IMGFMT_420P10_LE:
199
-    case IMGFMT_420P10_BE:
200
-    case IMGFMT_420P9_LE:
201
-    case IMGFMT_420P9_BE:
202
-        return;
203
-    case IMGFMT_Y16_LE:
204
-    case IMGFMT_Y16_BE:
205
-        mpi->bpp=16;
206
-    case IMGFMT_Y800:
207
-    case IMGFMT_Y8:
208
-        /* they're planar ones, but for easier handling use them as packed */
209
-        mpi->flags&=~MP_IMGFLAG_PLANAR;
210
-        mpi->num_planes=1;
211
-        return;
212
-    case IMGFMT_Y8A:
213
-        mpi->num_planes=2;
214
-        return;
215
-    case IMGFMT_UYVY:
216
-        mpi->flags|=MP_IMGFLAG_SWAPPED;
217
-    case IMGFMT_YUY2:
218
-        mpi->chroma_x_shift = 1;
219
-        mpi->bpp=16;
220
-        mpi->num_planes=1;
221
-        return;
222
-    case IMGFMT_NV12:
223
-        mpi->flags|=MP_IMGFLAG_SWAPPED;
224
-    case IMGFMT_NV21:
225
-        mpi->flags|=MP_IMGFLAG_PLANAR;
226
-        mpi->bpp=12;
227
-        mpi->num_planes=2;
228
-        mpi->chroma_width=(mpi->width>>0);
229
-        mpi->chroma_height=(mpi->height>>1);
230
-        mpi->chroma_x_shift=0;
231
-        mpi->chroma_y_shift=1;
232
-        return;
233
-    }
234
-    ff_mp_msg(MSGT_DECVIDEO,MSGL_WARN,"mp_image: unknown out_fmt: 0x%X\n",out_fmt);
235
-    mpi->bpp=0;
236
-}
237
-
238
-mp_image_t* ff_new_mp_image(int w,int h){
239
-    mp_image_t* mpi = malloc(sizeof(mp_image_t));
240
-    if(!mpi) return NULL; // error!
241
-    memset(mpi,0,sizeof(mp_image_t));
242
-    mpi->width=mpi->w=w;
243
-    mpi->height=mpi->h=h;
244
-    return mpi;
245
-}
246
-
247
-void ff_free_mp_image(mp_image_t* mpi){
248
-    if(!mpi) return;
249
-    if(mpi->flags&MP_IMGFLAG_ALLOCATED){
250
-        /* because we allocate the whole image at once */
251
-        av_free(mpi->planes[0]);
252
-        if (mpi->flags & MP_IMGFLAG_RGB_PALETTE)
253
-            av_free(mpi->planes[1]);
254
-    }
255
-    free(mpi);
256
-}
257
-
258 1
deleted file mode 100644
... ...
@@ -1,159 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#ifndef MPLAYER_MP_IMAGE_H
20
-#define MPLAYER_MP_IMAGE_H
21
-
22
-#include <stdio.h>
23
-#include <stdlib.h>
24
-#include <string.h>
25
-#undef printf //FIXME
26
-#undef fprintf //FIXME
27
-#include "mp_msg.h"
28
-#include "libavutil/avutil.h"
29
-#include "libavutil/avassert.h"
30
-#undef realloc
31
-#undef malloc
32
-#undef free
33
-#undef rand
34
-#undef srand
35
-#undef printf
36
-#undef strncpy
37
-#define ASMALIGN(ZEROBITS) ".p2align " #ZEROBITS "\n\t"
38
-#define CODEC_FLAG2_MEMC_ONLY     0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC).
39
-
40
-enum AVPixelFormat ff_mp2ff_pix_fmt(int mp);
41
-
42
-//--------- codec's requirements (filled by the codec/vf) ---------
43
-
44
-//--- buffer content restrictions:
45
-// set if buffer content shouldn't be modified:
46
-#define MP_IMGFLAG_PRESERVE 0x01
47
-// set if buffer content will be READ.
48
-// This can be e.g. for next frame's MC: (I/P mpeg frames) -
49
-// then in combination with MP_IMGFLAG_PRESERVE - or it
50
-// can be because a video filter or codec will read a significant
51
-// amount of data while processing that frame (e.g. blending something
52
-// onto the frame, MV based intra prediction).
53
-// A frame marked like this should not be placed in to uncachable
54
-// video RAM for example.
55
-#define MP_IMGFLAG_READABLE 0x02
56
-
57
-//--- buffer width/stride/plane restrictions: (used for direct rendering)
58
-// stride _have_to_ be aligned to MB boundary:  [for DR restrictions]
59
-#define MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE 0x4
60
-// stride should be aligned to MB boundary:     [for buffer allocation]
61
-#define MP_IMGFLAG_PREFER_ALIGNED_STRIDE 0x8
62
-// codec accept any stride (>=width):
63
-#define MP_IMGFLAG_ACCEPT_STRIDE 0x10
64
-// codec accept any width (width*bpp=stride -> stride%bpp==0) (>=width):
65
-#define MP_IMGFLAG_ACCEPT_WIDTH 0x20
66
-//--- for planar formats only:
67
-// uses only stride[0], and stride[1]=stride[2]=stride[0]>>mpi->chroma_x_shift
68
-#define MP_IMGFLAG_COMMON_STRIDE 0x40
69
-// uses only planes[0], and calculates planes[1,2] from width,height,imgfmt
70
-#define MP_IMGFLAG_COMMON_PLANE 0x80
71
-
72
-#define MP_IMGFLAGMASK_RESTRICTIONS 0xFF
73
-
74
-//--------- color info (filled by ff_mp_image_setfmt() ) -----------
75
-// set if number of planes > 1
76
-#define MP_IMGFLAG_PLANAR 0x100
77
-// set if it's YUV colorspace
78
-#define MP_IMGFLAG_YUV 0x200
79
-// set if it's swapped (BGR or YVU) plane/byteorder
80
-#define MP_IMGFLAG_SWAPPED 0x400
81
-// set if you want memory for palette allocated and managed by ff_vf_get_image etc.
82
-#define MP_IMGFLAG_RGB_PALETTE 0x800
83
-
84
-#define MP_IMGFLAGMASK_COLORS 0xF00
85
-
86
-// codec uses drawing/rendering callbacks (draw_slice()-like thing, DR method 2)
87
-// [the codec will set this flag if it supports callbacks, and the vo _may_
88
-//  clear it in get_image() if draw_slice() not implemented]
89
-#define MP_IMGFLAG_DRAW_CALLBACK 0x1000
90
-// set if it's in video buffer/memory: [set by vo/vf's get_image() !!!]
91
-#define MP_IMGFLAG_DIRECT 0x2000
92
-// set if buffer is allocated (used in destination images):
93
-#define MP_IMGFLAG_ALLOCATED 0x4000
94
-
95
-// buffer type was printed (do NOT set this flag - it's for INTERNAL USE!!!)
96
-#define MP_IMGFLAG_TYPE_DISPLAYED 0x8000
97
-
98
-// codec doesn't support any form of direct rendering - it has own buffer
99
-// allocation. so we just export its buffer pointers:
100
-#define MP_IMGTYPE_EXPORT 0
101
-// codec requires a static WO buffer, but it does only partial updates later:
102
-#define MP_IMGTYPE_STATIC 1
103
-// codec just needs some WO memory, where it writes/copies the whole frame to:
104
-#define MP_IMGTYPE_TEMP 2
105
-// I+P type, requires 2+ independent static R/W buffers
106
-#define MP_IMGTYPE_IP 3
107
-// I+P+B type, requires 2+ independent static R/W and 1+ temp WO buffers
108
-#define MP_IMGTYPE_IPB 4
109
-// Upper 16 bits give desired buffer number, -1 means get next available
110
-#define MP_IMGTYPE_NUMBERED 5
111
-// Doesn't need any buffer, incomplete image (probably a first field only)
112
-// we need this type to be able to differentiate between half frames and
113
-// all other cases
114
-#define MP_IMGTYPE_INCOMPLETE 6
115
-
116
-#define MP_MAX_PLANES 4
117
-
118
-#define MP_IMGFIELD_ORDERED 0x01
119
-#define MP_IMGFIELD_TOP_FIRST 0x02
120
-#define MP_IMGFIELD_REPEAT_FIRST 0x04
121
-#define MP_IMGFIELD_TOP 0x08
122
-#define MP_IMGFIELD_BOTTOM 0x10
123
-#define MP_IMGFIELD_INTERLACED 0x20
124
-
125
-typedef struct mp_image {
126
-    unsigned int flags;
127
-    unsigned char type;
128
-    int number;
129
-    unsigned char bpp;  // bits/pixel. NOT depth! for RGB it will be n*8
130
-    unsigned int imgfmt;
131
-    int width,height;  // stored dimensions
132
-    int x,y,w,h;  // visible dimensions
133
-    unsigned char* planes[MP_MAX_PLANES];
134
-    int stride[MP_MAX_PLANES];
135
-    char * qscale;
136
-    int qstride;
137
-    int pict_type; // 0->unknown, 1->I, 2->P, 3->B
138
-    int fields;
139
-    int qscale_type; // 0->mpeg1/4/h263, 1->mpeg2
140
-    int num_planes;
141
-    /* these are only used by planar formats Y,U(Cb),V(Cr) */
142
-    int chroma_width;
143
-    int chroma_height;
144
-    int chroma_x_shift; // horizontal
145
-    int chroma_y_shift; // vertical
146
-    int usage_count;
147
-    /* for private use by filter or vo driver (to store buffer id or dmpi) */
148
-    void* priv;
149
-} mp_image_t;
150
-
151
-void ff_mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt);
152
-mp_image_t* ff_new_mp_image(int w,int h);
153
-void ff_free_mp_image(mp_image_t* mpi);
154
-
155
-mp_image_t* ff_alloc_mpi(int w, int h, unsigned long int fmt);
156
-void ff_mp_image_alloc_planes(mp_image_t *mpi);
157
-void ff_copy_mpi(mp_image_t *dmpi, mp_image_t *mpi);
158
-
159
-#endif /* MPLAYER_MP_IMAGE_H */
160 1
deleted file mode 100644
... ...
@@ -1,166 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#ifndef MPLAYER_MP_MSG_H
20
-#define MPLAYER_MP_MSG_H
21
-
22
-#include <stdarg.h>
23
-
24
-// defined in mplayer.c and mencoder.c
25
-extern int verbose;
26
-
27
-// verbosity elevel:
28
-
29
-/* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
30
- * messages level MSGL_V and above should not be translated. */
31
-
32
-#define MSGL_FATAL 0  // will exit/abort
33
-#define MSGL_ERR 1    // continues
34
-#define MSGL_WARN 2   // only warning
35
-#define MSGL_HINT 3   // short help message
36
-#define MSGL_INFO 4   // -quiet
37
-#define MSGL_STATUS 5 // v=0
38
-#define MSGL_V 6      // v=1
39
-#define MSGL_DBG2 7   // v=2
40
-#define MSGL_DBG3 8   // v=3
41
-#define MSGL_DBG4 9   // v=4
42
-#define MSGL_DBG5 10  // v=5
43
-
44
-#define MSGL_FIXME 1  // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
45
-#define MSGT_FIXME 0  // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
46
-
47
-// code/module:
48
-
49
-#define MSGT_GLOBAL 0        // common player stuff errors
50
-#define MSGT_CPLAYER 1       // console player (mplayer.c)
51
-#define MSGT_GPLAYER 2       // gui player
52
-
53
-#define MSGT_VO 3       // libvo
54
-#define MSGT_AO 4       // libao
55
-
56
-#define MSGT_DEMUXER 5    // demuxer.c (general stuff)
57
-#define MSGT_DS 6         // demux stream (add/read packet etc)
58
-#define MSGT_DEMUX 7      // fileformat-specific stuff (demux_*.c)
59
-#define MSGT_HEADER 8     // fileformat-specific header (*header.c)
60
-
61
-#define MSGT_AVSYNC 9     // mplayer.c timer stuff
62
-#define MSGT_AUTOQ 10     // mplayer.c auto-quality stuff
63
-
64
-#define MSGT_CFGPARSER 11 // cfgparser.c
65
-
66
-#define MSGT_DECAUDIO 12  // av decoder
67
-#define MSGT_DECVIDEO 13
68
-
69
-#define MSGT_SEEK 14    // seeking code
70
-#define MSGT_WIN32 15   // win32 dll stuff
71
-#define MSGT_OPEN 16    // open.c (stream opening)
72
-#define MSGT_DVD 17     // open.c (DVD init/read/seek)
73
-
74
-#define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
75
-#define MSGT_LIRC 19    // lirc_mp.c and input lirc driver
76
-
77
-#define MSGT_STREAM 20  // stream.c
78
-#define MSGT_CACHE 21   // cache2.c
79
-
80
-#define MSGT_MENCODER 22
81
-
82
-#define MSGT_XACODEC 23 // XAnim codecs
83
-
84
-#define MSGT_TV 24      // TV input subsystem
85
-
86
-#define MSGT_OSDEP 25  // OS-dependent parts
87
-
88
-#define MSGT_SPUDEC 26 // spudec.c
89
-
90
-#define MSGT_PLAYTREE 27    // Playtree handeling (playtree.c, playtreeparser.c)
91
-
92
-#define MSGT_INPUT 28
93
-
94
-#define MSGT_VFILTER 29
95
-
96
-#define MSGT_OSD 30
97
-
98
-#define MSGT_NETWORK 31
99
-
100
-#define MSGT_CPUDETECT 32
101
-
102
-#define MSGT_CODECCFG 33
103
-
104
-#define MSGT_SWS 34
105
-
106
-#define MSGT_VOBSUB 35
107
-#define MSGT_SUBREADER 36
108
-
109
-#define MSGT_AFILTER 37  // Audio filter messages
110
-
111
-#define MSGT_NETST 38 // Netstream
112
-
113
-#define MSGT_MUXER 39 // muxer layer
114
-
115
-#define MSGT_OSD_MENU 40
116
-
117
-#define MSGT_IDENTIFY 41  // -identify output
118
-
119
-#define MSGT_RADIO 42
120
-
121
-#define MSGT_ASS 43 // libass messages
122
-
123
-#define MSGT_LOADER 44 // dll loader messages
124
-
125
-#define MSGT_STATUSLINE 45 // playback/encoding status line
126
-
127
-#define MSGT_TELETEXT 46       // Teletext decoder
128
-
129
-#define MSGT_MAX 64
130
-
131
-
132
-extern char *ff_mp_msg_charset;
133
-extern int ff_mp_msg_color;
134
-extern int ff_mp_msg_module;
135
-
136
-extern int ff_mp_msg_levels[MSGT_MAX];
137
-extern int ff_mp_msg_level_all;
138
-
139
-
140
-void ff_mp_msg_init(void);
141
-int ff_mp_msg_test(int mod, int lev);
142
-
143
-#include "config.h"
144
-
145
-void ff_mp_msg_va(int mod, int lev, const char *format, va_list va);
146
-#ifdef __GNUC__
147
-void ff_mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4)));
148
-#   ifdef MP_DEBUG
149
-#      define mp_dbg(mod,lev, args... ) ff_mp_msg(mod, lev, ## args )
150
-#   else
151
-       // only useful for developers, disable but check syntax
152
-#      define mp_dbg(mod,lev, args... ) do { if (0) ff_mp_msg(mod, lev, ## args ); } while (0)
153
-#   endif
154
-#else // not GNU C
155
-void ff_mp_msg(int mod, int lev, const char *format, ... );
156
-#   ifdef MP_DEBUG
157
-#      define mp_dbg(mod,lev, ... ) ff_mp_msg(mod, lev, __VA_ARGS__)
158
-#   else
159
-       // only useful for developers, disable but check syntax
160
-#      define mp_dbg(mod,lev, ... ) do { if (0) ff_mp_msg(mod, lev, __VA_ARGS__); } while (0)
161
-#   endif
162
-#endif /* __GNUC__ */
163
-
164
-const char* ff_filename_recode(const char* filename);
165
-
166
-#endif /* MPLAYER_MP_MSG_H */
167 1
deleted file mode 100644
... ...
@@ -1,167 +0,0 @@
1
-/*
2
- * This file is part of MPlayer.
3
- *
4
- * MPlayer is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * MPlayer is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along
15
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
- */
18
-
19
-#ifndef MPLAYER_VF_H
20
-#define MPLAYER_VF_H
21
-
22
-//#include "m_option.h"
23
-#include "mp_image.h"
24
-
25
-//extern m_obj_settings_t* vf_settings;
26
-//extern const m_obj_list_t vf_obj_list;
27
-
28
-struct vf_instance;
29
-struct vf_priv_s;
30
-
31
-typedef struct vf_info_s {
32
-    const char *info;
33
-    const char *name;
34
-    const char *author;
35
-    const char *comment;
36
-    int (*vf_open)(struct vf_instance *vf,char* args);
37
-    // Ptr to a struct dscribing the options
38
-    const void* opts;
39
-} vf_info_t;
40
-
41
-#define NUM_NUMBERED_MPI 50
42
-
43
-typedef struct vf_image_context_s {
44
-    mp_image_t* static_images[2];
45
-    mp_image_t* temp_images[1];
46
-    mp_image_t* export_images[1];
47
-    mp_image_t* numbered_images[NUM_NUMBERED_MPI];
48
-    int static_idx;
49
-} vf_image_context_t;
50
-
51
-typedef struct vf_format_context_t {
52
-    int have_configured;
53
-    int orig_width, orig_height, orig_fmt;
54
-} vf_format_context_t;
55
-
56
-typedef struct vf_instance {
57
-    const vf_info_t* info;
58
-    // funcs:
59
-    int (*config)(struct vf_instance *vf,
60
-        int width, int height, int d_width, int d_height,
61
-        unsigned int flags, unsigned int outfmt);
62
-    int (*control)(struct vf_instance *vf,
63
-        int request, void* data);
64
-    int (*query_format)(struct vf_instance *vf,
65
-        unsigned int fmt);
66
-    void (*get_image)(struct vf_instance *vf,
67
-        mp_image_t *mpi);
68
-    int (*put_image)(struct vf_instance *vf,
69
-        mp_image_t *mpi, double pts);
70
-    void (*start_slice)(struct vf_instance *vf,
71
-        mp_image_t *mpi);
72
-    void (*draw_slice)(struct vf_instance *vf,
73
-        unsigned char** src, int* stride, int w,int h, int x, int y);
74
-    void (*uninit)(struct vf_instance *vf);
75
-
76
-    int (*continue_buffered_image)(struct vf_instance *vf);
77
-    // caps:
78
-    unsigned int default_caps; // used by default query_format()
79
-    unsigned int default_reqs; // used by default config()
80
-    // data:
81
-    int w, h;
82
-    vf_image_context_t imgctx;
83
-    vf_format_context_t fmt;
84
-    struct vf_instance *next;
85
-    mp_image_t *dmpi;
86
-    struct vf_priv_s* priv;
87
-} vf_instance_t;
88
-
89
-// control codes:
90
-typedef struct vf_seteq_s
91
-{
92
-    const char *item;
93
-    int value;
94
-} vf_equalizer_t;
95
-
96
-#define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
97
-#define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
98
-#define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
99
-#define VFCTRL_GET_EQUALIZER 8 /* gset color options (brightness,contrast etc) */
100
-#define VFCTRL_DRAW_OSD 7
101
-#define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */
102
-#define VFCTRL_FLIP_PAGE 10 /* Tell the vo to flip pages */
103
-#define VFCTRL_DUPLICATE_FRAME 11 /* For encoding - encode zero-change frame */
104
-#define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes through */
105
-#define VFCTRL_FLUSH_FRAMES    13 /* For encoding - flush delayed frames */
106
-#define VFCTRL_SCREENSHOT      14 /* Make a screenshot */
107
-#define VFCTRL_INIT_EOSD       15 /* Select EOSD renderer */
108
-#define VFCTRL_DRAW_EOSD       16 /* Render EOSD */
109
-#define VFCTRL_GET_PTS         17 /* Return last pts value that reached vf_vo*/
110
-#define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */
111
-#define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */
112
-
113
-#include "vfcap.h"
114
-
115
-//FIXME this should be in a common header, but i dunno which
116
-#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
117
-
118
-
119
-// functions:
120
-void ff_vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
121
-mp_image_t* ff_vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
122
-
123
-vf_instance_t* vf_open_plugin(const vf_info_t* const* filter_list, vf_instance_t* next, const char *name, char **args);
124
-vf_instance_t* vf_open_filter(vf_instance_t* next, const char *name, char **args);
125
-vf_instance_t* ff_vf_add_before_vo(vf_instance_t **vf, char *name, char **args);
126
-vf_instance_t* vf_open_encoder(vf_instance_t* next, const char *name, char *args);
127
-
128
-unsigned int ff_vf_match_csp(vf_instance_t** vfp,const unsigned int* list,unsigned int preferred);
129
-void ff_vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src);
130
-void ff_vf_queue_frame(vf_instance_t *vf, int (*)(vf_instance_t *));
131
-int ff_vf_output_queued_frame(vf_instance_t *vf);
132
-
133
-// default wrappers:
134
-int ff_vf_next_config(struct vf_instance *vf,
135
-        int width, int height, int d_width, int d_height,
136
-        unsigned int flags, unsigned int outfmt);
137
-int ff_vf_next_control(struct vf_instance *vf, int request, void* data);
138
-void ff_vf_extra_flip(struct vf_instance *vf);
139
-int ff_vf_next_query_format(struct vf_instance *vf, unsigned int fmt);
140
-int ff_vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts);
141
-void ff_vf_next_draw_slice (struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y);
142
-
143
-vf_instance_t* ff_append_filters(vf_instance_t* last);
144
-
145
-void ff_vf_uninit_filter(vf_instance_t* vf);
146
-void ff_vf_uninit_filter_chain(vf_instance_t* vf);
147
-
148
-int ff_vf_config_wrapper(struct vf_instance *vf,
149
-                      int width, int height, int d_width, int d_height,
150
-                      unsigned int flags, unsigned int outfmt);
151
-
152
-static inline int norm_qscale(int qscale, int type)
153
-{
154
-    switch (type) {
155
-    case 0: // MPEG-1
156
-        return qscale;
157
-    case 1: // MPEG-2
158
-        return qscale >> 1;
159
-    case 2: // H264
160
-        return qscale >> 2;
161
-    case 3: // VP56
162
-        return (63 - qscale + 2) >> 2;
163
-    }
164
-    return qscale;
165
-}
166
-
167
-#endif /* MPLAYER_VF_H */
168 1
deleted file mode 100644
... ...
@@ -1,56 +0,0 @@
1
-/* VFCAP_* values: they are flags, returned by query_format():
2
- *
3
- * This file is part of MPlayer.
4
- *
5
- * MPlayer is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * MPlayer is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along
16
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
17
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
- */
19
-
20
-#ifndef MPLAYER_VFCAP_H
21
-#define MPLAYER_VFCAP_H
22
-
23
-// set, if the given colorspace is supported (with or without conversion)
24
-#define VFCAP_CSP_SUPPORTED 0x1
25
-// set, if the given colorspace is supported _without_ conversion
26
-#define VFCAP_CSP_SUPPORTED_BY_HW 0x2
27
-// set if the driver/filter can draw OSD
28
-#define VFCAP_OSD 0x4
29
-// set if the driver/filter can handle compressed SPU stream
30
-#define VFCAP_SPU 0x8
31
-// scaling up/down by hardware, or software:
32
-#define VFCAP_HWSCALE_UP 0x10
33
-#define VFCAP_HWSCALE_DOWN 0x20
34
-#define VFCAP_SWSCALE 0x40
35
-// driver/filter can do vertical flip (upside-down)
36
-#define VFCAP_FLIP 0x80
37
-
38
-// driver/hardware handles timing (blocking)
39
-#define VFCAP_TIMER 0x100
40
-// driver _always_ flip image upside-down (for ve_vfw)
41
-#define VFCAP_FLIPPED 0x200
42
-// vf filter: accepts stride (put_image)
43
-// vo driver: has draw_slice() support for the given csp
44
-#define VFCAP_ACCEPT_STRIDE 0x400
45
-// filter does postprocessing (so you shouldn't scale/filter image before it)
46
-#define VFCAP_POSTPROC 0x800
47
-// filter cannot be reconfigured to different size & format
48
-#define VFCAP_CONSTANT 0x1000
49
-// filter can draw EOSD
50
-#define VFCAP_EOSD 0x2000
51
-// filter will draw EOSD at screen resolution (without scaling)
52
-#define VFCAP_EOSD_UNSCALED 0x4000
53
-// used by libvo and vf_vo, indicates the VO does not support draw_slice for this format
54
-#define VOCAP_NOSLICES 0x8000
55
-
56
-#endif /* MPLAYER_VFCAP_H */
... ...
@@ -31,7 +31,7 @@
31 31
 
32 32
 #define LIBAVFILTER_VERSION_MAJOR  5
33 33
 #define LIBAVFILTER_VERSION_MINOR  9
34
-#define LIBAVFILTER_VERSION_MICRO 102
34
+#define LIBAVFILTER_VERSION_MICRO 103
35 35
 
36 36
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
37 37
                                                LIBAVFILTER_VERSION_MINOR, \