Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e7e0005c
Commit
e7e0005c
authored
Jan 27, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove libmpcodecs
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
f422f474
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2 additions
and
1555 deletions
+2
-1555
Changelog
Changelog
+1
-0
LICENSE.md
LICENSE.md
+0
-2
configure
configure
+0
-1
filters.texi
doc/filters.texi
+0
-29
Makefile
libavfilter/Makefile
+0
-4
allfilters.c
libavfilter/allfilters.c
+0
-1
cpudetect.h
libavfilter/libmpcodecs/cpudetect.h
+0
-60
img_format.c
libavfilter/libmpcodecs/img_format.c
+0
-244
img_format.h
libavfilter/libmpcodecs/img_format.h
+0
-309
fastmemcpy.h
libavfilter/libmpcodecs/libvo/fastmemcpy.h
+0
-99
mp_image.c
libavfilter/libmpcodecs/mp_image.c
+0
-257
mp_image.h
libavfilter/libmpcodecs/mp_image.h
+0
-159
mp_msg.h
libavfilter/libmpcodecs/mp_msg.h
+0
-166
vf.h
libavfilter/libmpcodecs/vf.h
+0
-167
vfcap.h
libavfilter/libmpcodecs/vfcap.h
+0
-56
version.h
libavfilter/version.h
+1
-1
No files found.
Changelog
View file @
e7e0005c
...
@@ -18,6 +18,7 @@ version <next>:
...
@@ -18,6 +18,7 @@ version <next>:
- showpalette filter
- showpalette filter
- Twofish symmetric block cipher
- Twofish symmetric block cipher
- Support DNx100 (960x720@8)
- Support DNx100 (960x720@8)
- removed libmpcodecs
version 2.5:
version 2.5:
...
...
LICENSE.md
View file @
e7e0005c
...
@@ -13,7 +13,6 @@ configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
...
@@ -13,7 +13,6 @@ configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
Specifically, the GPL parts of FFmpeg are:
Specifically, the GPL parts of FFmpeg are:
-
libpostproc
-
libpostproc
-
libmpcodecs
-
optional x86 optimizations in the files
-
optional x86 optimizations in the files
libavcodec/x86/flac_dsp_gpl.asm
libavcodec/x86/flac_dsp_gpl.asm
libavcodec/x86/idct_mmx.c
libavcodec/x86/idct_mmx.c
...
@@ -38,7 +37,6 @@ Specifically, the GPL parts of FFmpeg are:
...
@@ -38,7 +37,6 @@ Specifically, the GPL parts of FFmpeg are:
-
vf_interlace.c
-
vf_interlace.c
-
vf_kerndeint.c
-
vf_kerndeint.c
-
vf_mcdeint.c
-
vf_mcdeint.c
-
vf_mp.c
-
vf_mpdecimate.c
-
vf_mpdecimate.c
-
vf_owdenoise.c
-
vf_owdenoise.c
-
vf_perspective.c
-
vf_perspective.c
...
...
configure
View file @
e7e0005c
...
@@ -2597,7 +2597,6 @@ kerndeint_filter_deps="gpl"
...
@@ -2597,7 +2597,6 @@ kerndeint_filter_deps="gpl"
ladspa_filter_deps
=
"ladspa dlopen"
ladspa_filter_deps
=
"ladspa dlopen"
mcdeint_filter_deps
=
"avcodec gpl"
mcdeint_filter_deps
=
"avcodec gpl"
movie_filter_deps
=
"avcodec avformat"
movie_filter_deps
=
"avcodec avformat"
mp_filter_deps
=
"gpl avcodec swscale"
mpdecimate_filter_deps
=
"gpl"
mpdecimate_filter_deps
=
"gpl"
mpdecimate_filter_select
=
"pixelutils"
mpdecimate_filter_select
=
"pixelutils"
mptestsrc_filter_deps
=
"gpl"
mptestsrc_filter_deps
=
"gpl"
...
...
doc/filters.texi
View file @
e7e0005c
...
@@ -6263,35 +6263,6 @@ Higher values should result in a smoother motion vector field but less
...
@@ -6263,35 +6263,6 @@ Higher values should result in a smoother motion vector field but less
optimal individual vectors. Default value is 1.
optimal individual vectors. Default value is 1.
@end table
@end table
@section mp
Apply an MPlayer filter to the input video.
This filter provides a wrapper around some of the filters of
MPlayer/MEncoder.
This wrapper is considered experimental. Some of the wrapped filters
may not work properly and we may drop support for them, as they will
be implemented natively into FFmpeg. Thus you should avoid
depending on them when writing portable scripts.
The filter accepts the parameters:
@var{filter_name}[:=]@var{filter_params}
@var{filter_name} is the name of a supported MPlayer filter,
@var{filter_params} is a string containing the parameters accepted by
the named filter.
The list of the currently supported filters follows:
@table @var
@end table
The parameter syntax and behavior for the listed filters are the same
of the corresponding MPlayer filters. For detailed instructions check
the "VIDEO FILTERS" section in the MPlayer manual.
See also mplayer(1), @url{http://www.mplayerhq.hu/}.
@section mpdecimate
@section mpdecimate
Drop frames that do not differ greatly from the previous frame in
Drop frames that do not differ greatly from the previous frame in
...
...
libavfilter/Makefile
View file @
e7e0005c
...
@@ -149,7 +149,6 @@ OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
...
@@ -149,7 +149,6 @@ OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
OBJS-$(CONFIG_LUTYUV_FILTER)
+=
vf_lut.o
OBJS-$(CONFIG_LUTYUV_FILTER)
+=
vf_lut.o
OBJS-$(CONFIG_MCDEINT_FILTER)
+=
vf_mcdeint.o
OBJS-$(CONFIG_MCDEINT_FILTER)
+=
vf_mcdeint.o
OBJS-$(CONFIG_MERGEPLANES_FILTER)
+=
vf_mergeplanes.o
framesync.o
OBJS-$(CONFIG_MERGEPLANES_FILTER)
+=
vf_mergeplanes.o
framesync.o
OBJS-$(CONFIG_MP_FILTER)
+=
vf_mp.o
OBJS-$(CONFIG_MPDECIMATE_FILTER)
+=
vf_mpdecimate.o
OBJS-$(CONFIG_MPDECIMATE_FILTER)
+=
vf_mpdecimate.o
OBJS-$(CONFIG_NEGATE_FILTER)
+=
vf_lut.o
OBJS-$(CONFIG_NEGATE_FILTER)
+=
vf_lut.o
OBJS-$(CONFIG_NOFORMAT_FILTER)
+=
vf_format.o
OBJS-$(CONFIG_NOFORMAT_FILTER)
+=
vf_format.o
...
@@ -226,9 +225,6 @@ OBJS-$(CONFIG_TESTSRC_FILTER) += vsrc_testsrc.o
...
@@ -226,9 +225,6 @@ OBJS-$(CONFIG_TESTSRC_FILTER) += vsrc_testsrc.o
OBJS-$(CONFIG_NULLSINK_FILTER)
+=
vsink_nullsink.o
OBJS-$(CONFIG_NULLSINK_FILTER)
+=
vsink_nullsink.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/mp_image.o
OBJS-$(CONFIG_MP_FILTER)
+=
libmpcodecs/img_format.o
# multimedia filters
# multimedia filters
OBJS-$(CONFIG_AVECTORSCOPE_FILTER)
+=
avf_avectorscope.o
OBJS-$(CONFIG_AVECTORSCOPE_FILTER)
+=
avf_avectorscope.o
OBJS-$(CONFIG_CONCAT_FILTER)
+=
avf_concat.o
OBJS-$(CONFIG_CONCAT_FILTER)
+=
avf_concat.o
...
...
libavfilter/allfilters.c
View file @
e7e0005c
...
@@ -165,7 +165,6 @@ void avfilter_register_all(void)
...
@@ -165,7 +165,6 @@ void avfilter_register_all(void)
REGISTER_FILTER
(
LUTYUV
,
lutyuv
,
vf
);
REGISTER_FILTER
(
LUTYUV
,
lutyuv
,
vf
);
REGISTER_FILTER
(
MCDEINT
,
mcdeint
,
vf
);
REGISTER_FILTER
(
MCDEINT
,
mcdeint
,
vf
);
REGISTER_FILTER
(
MERGEPLANES
,
mergeplanes
,
vf
);
REGISTER_FILTER
(
MERGEPLANES
,
mergeplanes
,
vf
);
REGISTER_FILTER
(
MP
,
mp
,
vf
);
REGISTER_FILTER
(
MPDECIMATE
,
mpdecimate
,
vf
);
REGISTER_FILTER
(
MPDECIMATE
,
mpdecimate
,
vf
);
REGISTER_FILTER
(
NEGATE
,
negate
,
vf
);
REGISTER_FILTER
(
NEGATE
,
negate
,
vf
);
REGISTER_FILTER
(
NOFORMAT
,
noformat
,
vf
);
REGISTER_FILTER
(
NOFORMAT
,
noformat
,
vf
);
...
...
libavfilter/libmpcodecs/cpudetect.h
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_CPUDETECT_H
#define MPLAYER_CPUDETECT_H
#define CPUTYPE_I386 3
#define CPUTYPE_I486 4
#define CPUTYPE_I586 5
#define CPUTYPE_I686 6
#include "libavutil/x86_cpu.h"
typedef
struct
cpucaps_s
{
int
cpuType
;
int
cpuModel
;
int
cpuStepping
;
int
hasMMX
;
int
hasMMX2
;
int
has3DNow
;
int
has3DNowExt
;
int
hasSSE
;
int
hasSSE2
;
int
hasSSE3
;
int
hasSSSE3
;
int
hasSSE4
;
int
hasSSE42
;
int
hasSSE4a
;
int
hasAVX
;
int
isX86
;
unsigned
cl_size
;
/* size of cache line */
int
hasAltiVec
;
int
hasTSC
;
}
CpuCaps
;
extern
CpuCaps
ff_gCpuCaps
;
void
ff_do_cpuid
(
unsigned
int
ax
,
unsigned
int
*
p
);
void
ff_GetCpuCaps
(
CpuCaps
*
caps
);
/* returned value is malloc()'ed so free() it after use */
char
*
ff_GetCpuFriendlyName
(
unsigned
int
regs
[],
unsigned
int
regs2
[]);
#endif
/* MPLAYER_CPUDETECT_H */
libavfilter/libmpcodecs/img_format.c
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "img_format.h"
#include "stdio.h"
#include "libavutil/bswap.h"
const
char
*
ff_vo_format_name
(
int
format
)
{
static
char
unknown_format
[
20
];
switch
(
format
)
{
case
IMGFMT_RGB1
:
return
"RGB 1-bit"
;
case
IMGFMT_RGB4
:
return
"RGB 4-bit"
;
case
IMGFMT_RG4B
:
return
"RGB 4-bit per byte"
;
case
IMGFMT_RGB8
:
return
"RGB 8-bit"
;
case
IMGFMT_RGB12
:
return
"RGB 12-bit"
;
case
IMGFMT_RGB15
:
return
"RGB 15-bit"
;
case
IMGFMT_RGB16
:
return
"RGB 16-bit"
;
case
IMGFMT_RGB24
:
return
"RGB 24-bit"
;
// case IMGFMT_RGB32: return "RGB 32-bit";
case
IMGFMT_RGB48LE
:
return
"RGB 48-bit LE"
;
case
IMGFMT_RGB48BE
:
return
"RGB 48-bit BE"
;
case
IMGFMT_RGB64LE
:
return
"RGB 64-bit LE"
;
case
IMGFMT_RGB64BE
:
return
"RGB 64-bit BE"
;
case
IMGFMT_BGR1
:
return
"BGR 1-bit"
;
case
IMGFMT_BGR4
:
return
"BGR 4-bit"
;
case
IMGFMT_BG4B
:
return
"BGR 4-bit per byte"
;
case
IMGFMT_BGR8
:
return
"BGR 8-bit"
;
case
IMGFMT_BGR12
:
return
"BGR 12-bit"
;
case
IMGFMT_BGR15
:
return
"BGR 15-bit"
;
case
IMGFMT_BGR16
:
return
"BGR 16-bit"
;
case
IMGFMT_BGR24
:
return
"BGR 24-bit"
;
// case IMGFMT_BGR32: return "BGR 32-bit";
case
IMGFMT_ABGR
:
return
"ABGR"
;
case
IMGFMT_BGRA
:
return
"BGRA"
;
case
IMGFMT_ARGB
:
return
"ARGB"
;
case
IMGFMT_RGBA
:
return
"RGBA"
;
case
IMGFMT_XYZ12LE
:
return
"XYZ 36-bit LE"
;
case
IMGFMT_XYZ12BE
:
return
"XYZ 36-bit BE"
;
case
IMGFMT_GBR24P
:
return
"Planar GBR 24-bit"
;
case
IMGFMT_GBR12P
:
return
"Planar GBR 36-bit"
;
case
IMGFMT_GBR14P
:
return
"Planar GBR 42-bit"
;
case
IMGFMT_YVU9
:
return
"Planar YVU9"
;
case
IMGFMT_IF09
:
return
"Planar IF09"
;
case
IMGFMT_YV12
:
return
"Planar YV12"
;
case
IMGFMT_I420
:
return
"Planar I420"
;
case
IMGFMT_IYUV
:
return
"Planar IYUV"
;
case
IMGFMT_CLPL
:
return
"Planar CLPL"
;
case
IMGFMT_Y800
:
return
"Planar Y800"
;
case
IMGFMT_Y8
:
return
"Planar Y8"
;
case
IMGFMT_Y8A
:
return
"Planar Y8 with alpha"
;
case
IMGFMT_Y16_LE
:
return
"Planar Y16 little-endian"
;
case
IMGFMT_Y16_BE
:
return
"Planar Y16 big-endian"
;
case
IMGFMT_420P16_LE
:
return
"Planar 420P 16-bit little-endian"
;
case
IMGFMT_420P16_BE
:
return
"Planar 420P 16-bit big-endian"
;
case
IMGFMT_420P14_LE
:
return
"Planar 420P 14-bit little-endian"
;
case
IMGFMT_420P14_BE
:
return
"Planar 420P 14-bit big-endian"
;
case
IMGFMT_420P12_LE
:
return
"Planar 420P 12-bit little-endian"
;
case
IMGFMT_420P12_BE
:
return
"Planar 420P 12-bit big-endian"
;
case
IMGFMT_420P10_LE
:
return
"Planar 420P 10-bit little-endian"
;
case
IMGFMT_420P10_BE
:
return
"Planar 420P 10-bit big-endian"
;
case
IMGFMT_420P9_LE
:
return
"Planar 420P 9-bit little-endian"
;
case
IMGFMT_420P9_BE
:
return
"Planar 420P 9-bit big-endian"
;
case
IMGFMT_422P16_LE
:
return
"Planar 422P 16-bit little-endian"
;
case
IMGFMT_422P16_BE
:
return
"Planar 422P 16-bit big-endian"
;
case
IMGFMT_422P14_LE
:
return
"Planar 422P 14-bit little-endian"
;
case
IMGFMT_422P14_BE
:
return
"Planar 422P 14-bit big-endian"
;
case
IMGFMT_422P12_LE
:
return
"Planar 422P 12-bit little-endian"
;
case
IMGFMT_422P12_BE
:
return
"Planar 422P 12-bit big-endian"
;
case
IMGFMT_422P10_LE
:
return
"Planar 422P 10-bit little-endian"
;
case
IMGFMT_422P10_BE
:
return
"Planar 422P 10-bit big-endian"
;
case
IMGFMT_422P9_LE
:
return
"Planar 422P 9-bit little-endian"
;
case
IMGFMT_422P9_BE
:
return
"Planar 422P 9-bit big-endian"
;
case
IMGFMT_444P16_LE
:
return
"Planar 444P 16-bit little-endian"
;
case
IMGFMT_444P16_BE
:
return
"Planar 444P 16-bit big-endian"
;
case
IMGFMT_444P14_LE
:
return
"Planar 444P 14-bit little-endian"
;
case
IMGFMT_444P14_BE
:
return
"Planar 444P 14-bit big-endian"
;
case
IMGFMT_444P12_LE
:
return
"Planar 444P 12-bit little-endian"
;
case
IMGFMT_444P12_BE
:
return
"Planar 444P 12-bit big-endian"
;
case
IMGFMT_444P10_LE
:
return
"Planar 444P 10-bit little-endian"
;
case
IMGFMT_444P10_BE
:
return
"Planar 444P 10-bit big-endian"
;
case
IMGFMT_444P9_LE
:
return
"Planar 444P 9-bit little-endian"
;
case
IMGFMT_444P9_BE
:
return
"Planar 444P 9-bit big-endian"
;
case
IMGFMT_420A
:
return
"Planar 420P with alpha"
;
case
IMGFMT_444P
:
return
"Planar 444P"
;
case
IMGFMT_444A
:
return
"Planar 444P with alpha"
;
case
IMGFMT_422P
:
return
"Planar 422P"
;
case
IMGFMT_422A
:
return
"Planar 422P with alpha"
;
case
IMGFMT_411P
:
return
"Planar 411P"
;
case
IMGFMT_440P
:
return
"Planar 440P"
;
case
IMGFMT_NV12
:
return
"Planar NV12"
;
case
IMGFMT_NV21
:
return
"Planar NV21"
;
case
IMGFMT_HM12
:
return
"Planar NV12 Macroblock"
;
case
IMGFMT_IUYV
:
return
"Packed IUYV"
;
case
IMGFMT_IY41
:
return
"Packed IY41"
;
case
IMGFMT_IYU1
:
return
"Packed IYU1"
;
case
IMGFMT_IYU2
:
return
"Packed IYU2"
;
case
IMGFMT_UYVY
:
return
"Packed UYVY"
;
case
IMGFMT_UYNV
:
return
"Packed UYNV"
;
case
IMGFMT_cyuv
:
return
"Packed CYUV"
;
case
IMGFMT_Y422
:
return
"Packed Y422"
;
case
IMGFMT_YUY2
:
return
"Packed YUY2"
;
case
IMGFMT_YUNV
:
return
"Packed YUNV"
;
case
IMGFMT_YVYU
:
return
"Packed YVYU"
;
case
IMGFMT_Y41P
:
return
"Packed Y41P"
;
case
IMGFMT_Y211
:
return
"Packed Y211"
;
case
IMGFMT_Y41T
:
return
"Packed Y41T"
;
case
IMGFMT_Y42T
:
return
"Packed Y42T"
;
case
IMGFMT_V422
:
return
"Packed V422"
;
case
IMGFMT_V655
:
return
"Packed V655"
;
case
IMGFMT_CLJR
:
return
"Packed CLJR"
;
case
IMGFMT_YUVP
:
return
"Packed YUVP"
;
case
IMGFMT_UYVP
:
return
"Packed UYVP"
;
case
IMGFMT_MPEGPES
:
return
"Mpeg PES"
;
case
IMGFMT_ZRMJPEGNI
:
return
"Zoran MJPEG non-interlaced"
;
case
IMGFMT_ZRMJPEGIT
:
return
"Zoran MJPEG top field first"
;
case
IMGFMT_ZRMJPEGIB
:
return
"Zoran MJPEG bottom field first"
;
case
IMGFMT_XVMC_MOCO_MPEG2
:
return
"MPEG1/2 Motion Compensation"
;
case
IMGFMT_XVMC_IDCT_MPEG2
:
return
"MPEG1/2 Motion Compensation and IDCT"
;
case
IMGFMT_VDPAU_MPEG1
:
return
"MPEG1 VDPAU acceleration"
;
case
IMGFMT_VDPAU_MPEG2
:
return
"MPEG2 VDPAU acceleration"
;
case
IMGFMT_VDPAU_H264
:
return
"H.264 VDPAU acceleration"
;
case
IMGFMT_VDPAU_MPEG4
:
return
"MPEG-4 Part 2 VDPAU acceleration"
;
case
IMGFMT_VDPAU_WMV3
:
return
"WMV3 VDPAU acceleration"
;
case
IMGFMT_VDPAU_VC1
:
return
"VC1 VDPAU acceleration"
;
}
snprintf
(
unknown_format
,
20
,
"Unknown 0x%04x"
,
format
);
return
unknown_format
;
}
int
ff_mp_get_chroma_shift
(
int
format
,
int
*
x_shift
,
int
*
y_shift
,
int
*
component_bits
)
{
int
xs
=
0
,
ys
=
0
;
int
bpp
;
int
err
=
0
;
int
bits
=
8
;
if
((
format
&
0xff0000f0
)
==
0x34000050
)
format
=
av_bswap32
(
format
);
if
((
format
&
0xf00000ff
)
==
0x50000034
)
{
switch
(
format
>>
24
)
{
case
0x50
:
break
;
case
0x51
:
bits
=
16
;
break
;
case
0x52
:
bits
=
10
;
break
;
case
0x53
:
bits
=
9
;
break
;
default:
err
=
1
;
break
;
}
switch
(
format
&
0x00ffffff
)
{
case
0x00343434
:
// 444
xs
=
0
;
ys
=
0
;
break
;
case
0x00323234
:
// 422
xs
=
1
;
ys
=
0
;
break
;
case
0x00303234
:
// 420
xs
=
1
;
ys
=
1
;
break
;
case
0x00313134
:
// 411
xs
=
2
;
ys
=
0
;
break
;
case
0x00303434
:
// 440
xs
=
0
;
ys
=
1
;
break
;
default:
err
=
1
;
break
;
}
}
else
switch
(
format
)
{
case
IMGFMT_444A
:
xs
=
0
;
ys
=
0
;
break
;
case
IMGFMT_422A
:
xs
=
1
;
ys
=
0
;
break
;
case
IMGFMT_420A
:
case
IMGFMT_I420
:
case
IMGFMT_IYUV
:
case
IMGFMT_YV12
:
xs
=
1
;
ys
=
1
;
break
;
case
IMGFMT_IF09
:
case
IMGFMT_YVU9
:
xs
=
2
;
ys
=
2
;
break
;
case
IMGFMT_Y8
:
case
IMGFMT_Y800
:
xs
=
31
;
ys
=
31
;
break
;
case
IMGFMT_NV12
:
case
IMGFMT_NV21
:
xs
=
1
;
ys
=
1
;
// TODO: allowing this though currently breaks
// things all over the place.
err
=
1
;
break
;
default:
err
=
1
;
break
;
}
if
(
x_shift
)
*
x_shift
=
xs
;
if
(
y_shift
)
*
y_shift
=
ys
;
if
(
component_bits
)
*
component_bits
=
bits
;
bpp
=
8
+
((
16
>>
xs
)
>>
ys
);
if
(
format
==
IMGFMT_420A
||
format
==
IMGFMT_422A
||
format
==
IMGFMT_444A
)
bpp
+=
8
;
bpp
*=
(
bits
+
7
)
>>
3
;
return
err
?
0
:
bpp
;
}
libavfilter/libmpcodecs/img_format.h
deleted
100644 → 0
View file @
f422f474
This diff is collapsed.
Click to expand it.
libavfilter/libmpcodecs/libvo/fastmemcpy.h
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with MPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MPLAYER_FASTMEMCPY_H
#define MPLAYER_FASTMEMCPY_H
#include <inttypes.h>
#include <string.h>
#include <stddef.h>
void
*
fast_memcpy
(
void
*
to
,
const
void
*
from
,
size_t
len
);
void
*
mem2agpcpy
(
void
*
to
,
const
void
*
from
,
size_t
len
);
#if ! defined(CONFIG_FASTMEMCPY) || ! (HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW
/* || HAVE_SSE || HAVE_SSE2 */
)
#define mem2agpcpy(a,b,c) memcpy(a,b,c)
#define fast_memcpy(a,b,c) memcpy(a,b,c)
#endif
static
inline
void
*
mem2agpcpy_pic
(
void
*
dst
,
const
void
*
src
,
int
bytesPerLine
,
int
height
,
int
dstStride
,
int
srcStride
)
{
int
i
;
void
*
retval
=
dst
;
if
(
dstStride
==
srcStride
)
{
if
(
srcStride
<
0
)
{
src
=
(
const
uint8_t
*
)
src
+
(
height
-
1
)
*
srcStride
;
dst
=
(
uint8_t
*
)
dst
+
(
height
-
1
)
*
dstStride
;
srcStride
=
-
srcStride
;
}
mem2agpcpy
(
dst
,
src
,
srcStride
*
height
);
}
else
{
for
(
i
=
0
;
i
<
height
;
i
++
)
{
mem2agpcpy
(
dst
,
src
,
bytesPerLine
);
src
=
(
const
uint8_t
*
)
src
+
srcStride
;
dst
=
(
uint8_t
*
)
dst
+
dstStride
;
}
}
return
retval
;
}
#define memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 0)
#define my_memcpy_pic(d, s, b, h, ds, ss) memcpy_pic2(d, s, b, h, ds, ss, 1)
/**
* \param limit2width always skip data between end of line and start of next
* instead of copying the full block when strides are the same
*/
static
inline
void
*
memcpy_pic2
(
void
*
dst
,
const
void
*
src
,
int
bytesPerLine
,
int
height
,
int
dstStride
,
int
srcStride
,
int
limit2width
)
{
int
i
;
void
*
retval
=
dst
;
if
(
!
limit2width
&&
dstStride
==
srcStride
)
{
if
(
srcStride
<
0
)
{
src
=
(
const
uint8_t
*
)
src
+
(
height
-
1
)
*
srcStride
;
dst
=
(
uint8_t
*
)
dst
+
(
height
-
1
)
*
dstStride
;
srcStride
=
-
srcStride
;
}
fast_memcpy
(
dst
,
src
,
srcStride
*
height
);
}
else
{
for
(
i
=
0
;
i
<
height
;
i
++
)
{
fast_memcpy
(
dst
,
src
,
bytesPerLine
);
src
=
(
const
uint8_t
*
)
src
+
srcStride
;
dst
=
(
uint8_t
*
)
dst
+
dstStride
;
}
}
return
retval
;
}
#endif
/* MPLAYER_FASTMEMCPY_H */
libavfilter/libmpcodecs/mp_image.c
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
#include "img_format.h"
#include "mp_image.h"
#include "libvo/fastmemcpy.h"
//#include "libavutil/mem.h"
#include "libavutil/imgutils.h"
void
ff_mp_image_alloc_planes
(
mp_image_t
*
mpi
)
{
uint32_t
temp
[
256
];
if
(
avpriv_set_systematic_pal2
(
temp
,
ff_mp2ff_pix_fmt
(
mpi
->
imgfmt
))
>=
0
)
mpi
->
flags
|=
MP_IMGFLAG_RGB_PALETTE
;
// IF09 - allocate space for 4. plane delta info - unused
if
(
mpi
->
imgfmt
==
IMGFMT_IF09
)
{
mpi
->
planes
[
0
]
=
av_malloc
(
mpi
->
bpp
*
mpi
->
width
*
(
mpi
->
height
+
2
)
/
8
+
mpi
->
chroma_width
*
mpi
->
chroma_height
);
}
else
mpi
->
planes
[
0
]
=
av_malloc
(
mpi
->
bpp
*
mpi
->
width
*
(
mpi
->
height
+
2
)
/
8
);
if
(
mpi
->
flags
&
MP_IMGFLAG_PLANAR
)
{
int
bpp
=
IMGFMT_IS_YUVP16
(
mpi
->
imgfmt
)
?
2
:
1
;
// YV12/I420/YVU9/IF09. feel free to add other planar formats here...
mpi
->
stride
[
0
]
=
mpi
->
stride
[
3
]
=
bpp
*
mpi
->
width
;
if
(
mpi
->
num_planes
>
2
){
mpi
->
stride
[
1
]
=
mpi
->
stride
[
2
]
=
bpp
*
mpi
->
chroma_width
;
if
(
mpi
->
flags
&
MP_IMGFLAG_SWAPPED
){
// I420/IYUV (Y,U,V)
mpi
->
planes
[
1
]
=
mpi
->
planes
[
0
]
+
mpi
->
stride
[
0
]
*
mpi
->
height
;
mpi
->
planes
[
2
]
=
mpi
->
planes
[
1
]
+
mpi
->
stride
[
1
]
*
mpi
->
chroma_height
;
if
(
mpi
->
num_planes
>
3
)
mpi
->
planes
[
3
]
=
mpi
->
planes
[
2
]
+
mpi
->
stride
[
2
]
*
mpi
->
chroma_height
;
}
else
{
// YV12,YVU9,IF09 (Y,V,U)
mpi
->
planes
[
2
]
=
mpi
->
planes
[
0
]
+
mpi
->
stride
[
0
]
*
mpi
->
height
;
mpi
->
planes
[
1
]
=
mpi
->
planes
[
2
]
+
mpi
->
stride
[
1
]
*
mpi
->
chroma_height
;
if
(
mpi
->
num_planes
>
3
)
mpi
->
planes
[
3
]
=
mpi
->
planes
[
1
]
+
mpi
->
stride
[
1
]
*
mpi
->
chroma_height
;
}
}
else
{
// NV12/NV21
mpi
->
stride
[
1
]
=
mpi
->
chroma_width
;
mpi
->
planes
[
1
]
=
mpi
->
planes
[
0
]
+
mpi
->
stride
[
0
]
*
mpi
->
height
;
}
}
else
{
mpi
->
stride
[
0
]
=
mpi
->
width
*
mpi
->
bpp
/
8
;
if
(
mpi
->
flags
&
MP_IMGFLAG_RGB_PALETTE
)
{
mpi
->
planes
[
1
]
=
av_malloc
(
1024
);
memcpy
(
mpi
->
planes
[
1
],
temp
,
1024
);
}
}
mpi
->
flags
|=
MP_IMGFLAG_ALLOCATED
;
}
mp_image_t
*
ff_alloc_mpi
(
int
w
,
int
h
,
unsigned
long
int
fmt
)
{
mp_image_t
*
mpi
=
ff_new_mp_image
(
w
,
h
);
ff_mp_image_setfmt
(
mpi
,
fmt
);
ff_mp_image_alloc_planes
(
mpi
);
return
mpi
;
}
void
ff_copy_mpi
(
mp_image_t
*
dmpi
,
mp_image_t
*
mpi
)
{
if
(
mpi
->
flags
&
MP_IMGFLAG_PLANAR
){
memcpy_pic
(
dmpi
->
planes
[
0
],
mpi
->
planes
[
0
],
mpi
->
w
,
mpi
->
h
,
dmpi
->
stride
[
0
],
mpi
->
stride
[
0
]);
memcpy_pic
(
dmpi
->
planes
[
1
],
mpi
->
planes
[
1
],
mpi
->
chroma_width
,
mpi
->
chroma_height
,
dmpi
->
stride
[
1
],
mpi
->
stride
[
1
]);
memcpy_pic
(
dmpi
->
planes
[
2
],
mpi
->
planes
[
2
],
mpi
->
chroma_width
,
mpi
->
chroma_height
,
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
]);
}
else
{
memcpy_pic
(
dmpi
->
planes
[
0
],
mpi
->
planes
[
0
],
mpi
->
w
*
(
dmpi
->
bpp
/
8
),
mpi
->
h
,
dmpi
->
stride
[
0
],
mpi
->
stride
[
0
]);
}
}
void
ff_mp_image_setfmt
(
mp_image_t
*
mpi
,
unsigned
int
out_fmt
){
mpi
->
flags
&=~
(
MP_IMGFLAG_PLANAR
|
MP_IMGFLAG_YUV
|
MP_IMGFLAG_SWAPPED
);
mpi
->
imgfmt
=
out_fmt
;
// compressed formats
if
(
out_fmt
==
IMGFMT_MPEGPES
||
out_fmt
==
IMGFMT_ZRMJPEGNI
||
out_fmt
==
IMGFMT_ZRMJPEGIT
||
out_fmt
==
IMGFMT_ZRMJPEGIB
||
IMGFMT_IS_HWACCEL
(
out_fmt
)){
mpi
->
bpp
=
0
;
return
;
}
mpi
->
num_planes
=
1
;
if
(
IMGFMT_IS_RGB
(
out_fmt
))
{
if
(
IMGFMT_RGB_DEPTH
(
out_fmt
)
<
8
&&
!
(
out_fmt
&
128
))
mpi
->
bpp
=
IMGFMT_RGB_DEPTH
(
out_fmt
);
else
mpi
->
bpp
=
(
IMGFMT_RGB_DEPTH
(
out_fmt
)
+
7
)
&
(
~
7
);
return
;
}
if
(
IMGFMT_IS_BGR
(
out_fmt
))
{
if
(
IMGFMT_BGR_DEPTH
(
out_fmt
)
<
8
&&
!
(
out_fmt
&
128
))
mpi
->
bpp
=
IMGFMT_BGR_DEPTH
(
out_fmt
);
else
mpi
->
bpp
=
(
IMGFMT_BGR_DEPTH
(
out_fmt
)
+
7
)
&
(
~
7
);
mpi
->
flags
|=
MP_IMGFLAG_SWAPPED
;
return
;
}
if
(
IMGFMT_IS_XYZ
(
out_fmt
))
{
mpi
->
bpp
=
3
*
((
IMGFMT_XYZ_DEPTH
(
out_fmt
)
+
7
)
&
~
7
);
return
;
}
mpi
->
num_planes
=
3
;
if
(
out_fmt
==
IMGFMT_GBR24P
)
{
mpi
->
bpp
=
24
;
mpi
->
flags
|=
MP_IMGFLAG_PLANAR
;
return
;
}
else
if
(
out_fmt
==
IMGFMT_GBR12P
)
{
mpi
->
bpp
=
36
;
mpi
->
flags
|=
MP_IMGFLAG_PLANAR
;
return
;
}
else
if
(
out_fmt
==
IMGFMT_GBR14P
)
{
mpi
->
bpp
=
42
;
mpi
->
flags
|=
MP_IMGFLAG_PLANAR
;
return
;
}
mpi
->
flags
|=
MP_IMGFLAG_YUV
;
if
(
ff_mp_get_chroma_shift
(
out_fmt
,
NULL
,
NULL
,
NULL
))
{
mpi
->
flags
|=
MP_IMGFLAG_PLANAR
;
mpi
->
bpp
=
ff_mp_get_chroma_shift
(
out_fmt
,
&
mpi
->
chroma_x_shift
,
&
mpi
->
chroma_y_shift
,
NULL
);
mpi
->
chroma_width
=
mpi
->
width
>>
mpi
->
chroma_x_shift
;
mpi
->
chroma_height
=
mpi
->
height
>>
mpi
->
chroma_y_shift
;
}
switch
(
out_fmt
){
case
IMGFMT_I420
:
case
IMGFMT_IYUV
:
mpi
->
flags
|=
MP_IMGFLAG_SWAPPED
;
case
IMGFMT_YV12
:
return
;
case
IMGFMT_420A
:
case
IMGFMT_422A
:
case
IMGFMT_444A
:
case
IMGFMT_IF09
:
mpi
->
num_planes
=
4
;
case
IMGFMT_YVU9
:
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
case
IMGFMT_440P
:
case
IMGFMT_444P16_LE
:
case
IMGFMT_444P16_BE
:
case
IMGFMT_444P14_LE
:
case
IMGFMT_444P14_BE
:
case
IMGFMT_444P12_LE
:
case
IMGFMT_444P12_BE
:
case
IMGFMT_444P10_LE
:
case
IMGFMT_444P10_BE
:
case
IMGFMT_444P9_LE
:
case
IMGFMT_444P9_BE
:
case
IMGFMT_422P16_LE
:
case
IMGFMT_422P16_BE
:
case
IMGFMT_422P14_LE
:
case
IMGFMT_422P14_BE
:
case
IMGFMT_422P12_LE
:
case
IMGFMT_422P12_BE
:
case
IMGFMT_422P10_LE
:
case
IMGFMT_422P10_BE
:
case
IMGFMT_422P9_LE
:
case
IMGFMT_422P9_BE
:
case
IMGFMT_420P16_LE
:
case
IMGFMT_420P16_BE
:
case
IMGFMT_420P14_LE
:
case
IMGFMT_420P14_BE
:
case
IMGFMT_420P12_LE
:
case
IMGFMT_420P12_BE
:
case
IMGFMT_420P10_LE
:
case
IMGFMT_420P10_BE
:
case
IMGFMT_420P9_LE
:
case
IMGFMT_420P9_BE
:
return
;
case
IMGFMT_Y16_LE
:
case
IMGFMT_Y16_BE
:
mpi
->
bpp
=
16
;
case
IMGFMT_Y800
:
case
IMGFMT_Y8
:
/* they're planar ones, but for easier handling use them as packed */
mpi
->
flags
&=~
MP_IMGFLAG_PLANAR
;
mpi
->
num_planes
=
1
;
return
;
case
IMGFMT_Y8A
:
mpi
->
num_planes
=
2
;
return
;
case
IMGFMT_UYVY
:
mpi
->
flags
|=
MP_IMGFLAG_SWAPPED
;
case
IMGFMT_YUY2
:
mpi
->
chroma_x_shift
=
1
;
mpi
->
bpp
=
16
;
mpi
->
num_planes
=
1
;
return
;
case
IMGFMT_NV12
:
mpi
->
flags
|=
MP_IMGFLAG_SWAPPED
;
case
IMGFMT_NV21
:
mpi
->
flags
|=
MP_IMGFLAG_PLANAR
;
mpi
->
bpp
=
12
;
mpi
->
num_planes
=
2
;
mpi
->
chroma_width
=
(
mpi
->
width
>>
0
);
mpi
->
chroma_height
=
(
mpi
->
height
>>
1
);
mpi
->
chroma_x_shift
=
0
;
mpi
->
chroma_y_shift
=
1
;
return
;
}
ff_mp_msg
(
MSGT_DECVIDEO
,
MSGL_WARN
,
"mp_image: unknown out_fmt: 0x%X
\n
"
,
out_fmt
);
mpi
->
bpp
=
0
;
}
mp_image_t
*
ff_new_mp_image
(
int
w
,
int
h
){
mp_image_t
*
mpi
=
malloc
(
sizeof
(
mp_image_t
));
if
(
!
mpi
)
return
NULL
;
// error!
memset
(
mpi
,
0
,
sizeof
(
mp_image_t
));
mpi
->
width
=
mpi
->
w
=
w
;
mpi
->
height
=
mpi
->
h
=
h
;
return
mpi
;
}
void
ff_free_mp_image
(
mp_image_t
*
mpi
){
if
(
!
mpi
)
return
;
if
(
mpi
->
flags
&
MP_IMGFLAG_ALLOCATED
){
/* because we allocate the whole image at once */
av_free
(
mpi
->
planes
[
0
]);
if
(
mpi
->
flags
&
MP_IMGFLAG_RGB_PALETTE
)
av_free
(
mpi
->
planes
[
1
]);
}
free
(
mpi
);
}
libavfilter/libmpcodecs/mp_image.h
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_MP_IMAGE_H
#define MPLAYER_MP_IMAGE_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#undef printf //FIXME
#undef fprintf //FIXME
#include "mp_msg.h"
#include "libavutil/avutil.h"
#include "libavutil/avassert.h"
#undef realloc
#undef malloc
#undef free
#undef rand
#undef srand
#undef printf
#undef strncpy
#define ASMALIGN(ZEROBITS) ".p2align " #ZEROBITS "\n\t"
#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC).
enum
AVPixelFormat
ff_mp2ff_pix_fmt
(
int
mp
);
//--------- codec's requirements (filled by the codec/vf) ---------
//--- buffer content restrictions:
// set if buffer content shouldn't be modified:
#define MP_IMGFLAG_PRESERVE 0x01
// set if buffer content will be READ.
// This can be e.g. for next frame's MC: (I/P mpeg frames) -
// then in combination with MP_IMGFLAG_PRESERVE - or it
// can be because a video filter or codec will read a significant
// amount of data while processing that frame (e.g. blending something
// onto the frame, MV based intra prediction).
// A frame marked like this should not be placed in to uncachable
// video RAM for example.
#define MP_IMGFLAG_READABLE 0x02
//--- buffer width/stride/plane restrictions: (used for direct rendering)
// stride _have_to_ be aligned to MB boundary: [for DR restrictions]
#define MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE 0x4
// stride should be aligned to MB boundary: [for buffer allocation]
#define MP_IMGFLAG_PREFER_ALIGNED_STRIDE 0x8
// codec accept any stride (>=width):
#define MP_IMGFLAG_ACCEPT_STRIDE 0x10
// codec accept any width (width*bpp=stride -> stride%bpp==0) (>=width):
#define MP_IMGFLAG_ACCEPT_WIDTH 0x20
//--- for planar formats only:
// uses only stride[0], and stride[1]=stride[2]=stride[0]>>mpi->chroma_x_shift
#define MP_IMGFLAG_COMMON_STRIDE 0x40
// uses only planes[0], and calculates planes[1,2] from width,height,imgfmt
#define MP_IMGFLAG_COMMON_PLANE 0x80
#define MP_IMGFLAGMASK_RESTRICTIONS 0xFF
//--------- color info (filled by ff_mp_image_setfmt() ) -----------
// set if number of planes > 1
#define MP_IMGFLAG_PLANAR 0x100
// set if it's YUV colorspace
#define MP_IMGFLAG_YUV 0x200
// set if it's swapped (BGR or YVU) plane/byteorder
#define MP_IMGFLAG_SWAPPED 0x400
// set if you want memory for palette allocated and managed by ff_vf_get_image etc.
#define MP_IMGFLAG_RGB_PALETTE 0x800
#define MP_IMGFLAGMASK_COLORS 0xF00
// codec uses drawing/rendering callbacks (draw_slice()-like thing, DR method 2)
// [the codec will set this flag if it supports callbacks, and the vo _may_
// clear it in get_image() if draw_slice() not implemented]
#define MP_IMGFLAG_DRAW_CALLBACK 0x1000
// set if it's in video buffer/memory: [set by vo/vf's get_image() !!!]
#define MP_IMGFLAG_DIRECT 0x2000
// set if buffer is allocated (used in destination images):
#define MP_IMGFLAG_ALLOCATED 0x4000
// buffer type was printed (do NOT set this flag - it's for INTERNAL USE!!!)
#define MP_IMGFLAG_TYPE_DISPLAYED 0x8000
// codec doesn't support any form of direct rendering - it has own buffer
// allocation. so we just export its buffer pointers:
#define MP_IMGTYPE_EXPORT 0
// codec requires a static WO buffer, but it does only partial updates later:
#define MP_IMGTYPE_STATIC 1
// codec just needs some WO memory, where it writes/copies the whole frame to:
#define MP_IMGTYPE_TEMP 2
// I+P type, requires 2+ independent static R/W buffers
#define MP_IMGTYPE_IP 3
// I+P+B type, requires 2+ independent static R/W and 1+ temp WO buffers
#define MP_IMGTYPE_IPB 4
// Upper 16 bits give desired buffer number, -1 means get next available
#define MP_IMGTYPE_NUMBERED 5
// Doesn't need any buffer, incomplete image (probably a first field only)
// we need this type to be able to differentiate between half frames and
// all other cases
#define MP_IMGTYPE_INCOMPLETE 6
#define MP_MAX_PLANES 4
#define MP_IMGFIELD_ORDERED 0x01
#define MP_IMGFIELD_TOP_FIRST 0x02
#define MP_IMGFIELD_REPEAT_FIRST 0x04
#define MP_IMGFIELD_TOP 0x08
#define MP_IMGFIELD_BOTTOM 0x10
#define MP_IMGFIELD_INTERLACED 0x20
typedef
struct
mp_image
{
unsigned
int
flags
;
unsigned
char
type
;
int
number
;
unsigned
char
bpp
;
// bits/pixel. NOT depth! for RGB it will be n*8
unsigned
int
imgfmt
;
int
width
,
height
;
// stored dimensions
int
x
,
y
,
w
,
h
;
// visible dimensions
unsigned
char
*
planes
[
MP_MAX_PLANES
];
int
stride
[
MP_MAX_PLANES
];
char
*
qscale
;
int
qstride
;
int
pict_type
;
// 0->unknown, 1->I, 2->P, 3->B
int
fields
;
int
qscale_type
;
// 0->mpeg1/4/h263, 1->mpeg2
int
num_planes
;
/* these are only used by planar formats Y,U(Cb),V(Cr) */
int
chroma_width
;
int
chroma_height
;
int
chroma_x_shift
;
// horizontal
int
chroma_y_shift
;
// vertical
int
usage_count
;
/* for private use by filter or vo driver (to store buffer id or dmpi) */
void
*
priv
;
}
mp_image_t
;
void
ff_mp_image_setfmt
(
mp_image_t
*
mpi
,
unsigned
int
out_fmt
);
mp_image_t
*
ff_new_mp_image
(
int
w
,
int
h
);
void
ff_free_mp_image
(
mp_image_t
*
mpi
);
mp_image_t
*
ff_alloc_mpi
(
int
w
,
int
h
,
unsigned
long
int
fmt
);
void
ff_mp_image_alloc_planes
(
mp_image_t
*
mpi
);
void
ff_copy_mpi
(
mp_image_t
*
dmpi
,
mp_image_t
*
mpi
);
#endif
/* MPLAYER_MP_IMAGE_H */
libavfilter/libmpcodecs/mp_msg.h
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_MP_MSG_H
#define MPLAYER_MP_MSG_H
#include <stdarg.h>
// defined in mplayer.c and mencoder.c
extern
int
verbose
;
// verbosity elevel:
/* Only messages level MSGL_FATAL-MSGL_STATUS should be translated,
* messages level MSGL_V and above should not be translated. */
#define MSGL_FATAL 0 // will exit/abort
#define MSGL_ERR 1 // continues
#define MSGL_WARN 2 // only warning
#define MSGL_HINT 3 // short help message
#define MSGL_INFO 4 // -quiet
#define MSGL_STATUS 5 // v=0
#define MSGL_V 6 // v=1
#define MSGL_DBG2 7 // v=2
#define MSGL_DBG3 8 // v=3
#define MSGL_DBG4 9 // v=4
#define MSGL_DBG5 10 // v=5
#define MSGL_FIXME 1 // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
#define MSGT_FIXME 0 // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness
// code/module:
#define MSGT_GLOBAL 0 // common player stuff errors
#define MSGT_CPLAYER 1 // console player (mplayer.c)
#define MSGT_GPLAYER 2 // gui player
#define MSGT_VO 3 // libvo
#define MSGT_AO 4 // libao
#define MSGT_DEMUXER 5 // demuxer.c (general stuff)
#define MSGT_DS 6 // demux stream (add/read packet etc)
#define MSGT_DEMUX 7 // fileformat-specific stuff (demux_*.c)
#define MSGT_HEADER 8 // fileformat-specific header (*header.c)
#define MSGT_AVSYNC 9 // mplayer.c timer stuff
#define MSGT_AUTOQ 10 // mplayer.c auto-quality stuff
#define MSGT_CFGPARSER 11 // cfgparser.c
#define MSGT_DECAUDIO 12 // av decoder
#define MSGT_DECVIDEO 13
#define MSGT_SEEK 14 // seeking code
#define MSGT_WIN32 15 // win32 dll stuff
#define MSGT_OPEN 16 // open.c (stream opening)
#define MSGT_DVD 17 // open.c (DVD init/read/seek)
#define MSGT_PARSEES 18 // parse_es.c (mpeg stream parser)
#define MSGT_LIRC 19 // lirc_mp.c and input lirc driver
#define MSGT_STREAM 20 // stream.c
#define MSGT_CACHE 21 // cache2.c
#define MSGT_MENCODER 22
#define MSGT_XACODEC 23 // XAnim codecs
#define MSGT_TV 24 // TV input subsystem
#define MSGT_OSDEP 25 // OS-dependent parts
#define MSGT_SPUDEC 26 // spudec.c
#define MSGT_PLAYTREE 27 // Playtree handeling (playtree.c, playtreeparser.c)
#define MSGT_INPUT 28
#define MSGT_VFILTER 29
#define MSGT_OSD 30
#define MSGT_NETWORK 31
#define MSGT_CPUDETECT 32
#define MSGT_CODECCFG 33
#define MSGT_SWS 34
#define MSGT_VOBSUB 35
#define MSGT_SUBREADER 36
#define MSGT_AFILTER 37 // Audio filter messages
#define MSGT_NETST 38 // Netstream
#define MSGT_MUXER 39 // muxer layer
#define MSGT_OSD_MENU 40
#define MSGT_IDENTIFY 41 // -identify output
#define MSGT_RADIO 42
#define MSGT_ASS 43 // libass messages
#define MSGT_LOADER 44 // dll loader messages
#define MSGT_STATUSLINE 45 // playback/encoding status line
#define MSGT_TELETEXT 46 // Teletext decoder
#define MSGT_MAX 64
extern
char
*
ff_mp_msg_charset
;
extern
int
ff_mp_msg_color
;
extern
int
ff_mp_msg_module
;
extern
int
ff_mp_msg_levels
[
MSGT_MAX
];
extern
int
ff_mp_msg_level_all
;
void
ff_mp_msg_init
(
void
);
int
ff_mp_msg_test
(
int
mod
,
int
lev
);
#include "config.h"
void
ff_mp_msg_va
(
int
mod
,
int
lev
,
const
char
*
format
,
va_list
va
);
#ifdef __GNUC__
void
ff_mp_msg
(
int
mod
,
int
lev
,
const
char
*
format
,
...
)
__attribute__
((
format
(
printf
,
3
,
4
)));
# ifdef MP_DEBUG
# define mp_dbg(mod,lev, args... ) ff_mp_msg(mod, lev, ## args )
# else
// only useful for developers, disable but check syntax
# define mp_dbg(mod,lev, args... ) do { if (0) ff_mp_msg(mod, lev, ## args ); } while (0)
# endif
#else // not GNU C
void
ff_mp_msg
(
int
mod
,
int
lev
,
const
char
*
format
,
...
);
# ifdef MP_DEBUG
# define mp_dbg(mod,lev, ... ) ff_mp_msg(mod, lev, __VA_ARGS__)
# else
// only useful for developers, disable but check syntax
# define mp_dbg(mod,lev, ... ) do { if (0) ff_mp_msg(mod, lev, __VA_ARGS__); } while (0)
# endif
#endif
/* __GNUC__ */
const
char
*
ff_filename_recode
(
const
char
*
filename
);
#endif
/* MPLAYER_MP_MSG_H */
libavfilter/libmpcodecs/vf.h
deleted
100644 → 0
View file @
f422f474
/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_VF_H
#define MPLAYER_VF_H
//#include "m_option.h"
#include "mp_image.h"
//extern m_obj_settings_t* vf_settings;
//extern const m_obj_list_t vf_obj_list;
struct
vf_instance
;
struct
vf_priv_s
;
typedef
struct
vf_info_s
{
const
char
*
info
;
const
char
*
name
;
const
char
*
author
;
const
char
*
comment
;
int
(
*
vf_open
)(
struct
vf_instance
*
vf
,
char
*
args
);
// Ptr to a struct dscribing the options
const
void
*
opts
;
}
vf_info_t
;
#define NUM_NUMBERED_MPI 50
typedef
struct
vf_image_context_s
{
mp_image_t
*
static_images
[
2
];
mp_image_t
*
temp_images
[
1
];
mp_image_t
*
export_images
[
1
];
mp_image_t
*
numbered_images
[
NUM_NUMBERED_MPI
];
int
static_idx
;
}
vf_image_context_t
;
typedef
struct
vf_format_context_t
{
int
have_configured
;
int
orig_width
,
orig_height
,
orig_fmt
;
}
vf_format_context_t
;
typedef
struct
vf_instance
{
const
vf_info_t
*
info
;
// funcs:
int
(
*
config
)(
struct
vf_instance
*
vf
,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
);
int
(
*
control
)(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
);
int
(
*
query_format
)(
struct
vf_instance
*
vf
,
unsigned
int
fmt
);
void
(
*
get_image
)(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
);
int
(
*
put_image
)(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
);
void
(
*
start_slice
)(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
);
void
(
*
draw_slice
)(
struct
vf_instance
*
vf
,
unsigned
char
**
src
,
int
*
stride
,
int
w
,
int
h
,
int
x
,
int
y
);
void
(
*
uninit
)(
struct
vf_instance
*
vf
);
int
(
*
continue_buffered_image
)(
struct
vf_instance
*
vf
);
// caps:
unsigned
int
default_caps
;
// used by default query_format()
unsigned
int
default_reqs
;
// used by default config()
// data:
int
w
,
h
;
vf_image_context_t
imgctx
;
vf_format_context_t
fmt
;
struct
vf_instance
*
next
;
mp_image_t
*
dmpi
;
struct
vf_priv_s
*
priv
;
}
vf_instance_t
;
// control codes:
typedef
struct
vf_seteq_s
{
const
char
*
item
;
int
value
;
}
vf_equalizer_t
;
#define VFCTRL_QUERY_MAX_PP_LEVEL 4
/* test for postprocessing support (max level) */
#define VFCTRL_SET_PP_LEVEL 5
/* set postprocessing level */
#define VFCTRL_SET_EQUALIZER 6
/* set color options (brightness,contrast etc) */
#define VFCTRL_GET_EQUALIZER 8
/* gset color options (brightness,contrast etc) */
#define VFCTRL_DRAW_OSD 7
#define VFCTRL_CHANGE_RECTANGLE 9
/* Change the rectangle boundaries */
#define VFCTRL_FLIP_PAGE 10
/* Tell the vo to flip pages */
#define VFCTRL_DUPLICATE_FRAME 11
/* For encoding - encode zero-change frame */
#define VFCTRL_SKIP_NEXT_FRAME 12
/* For encoding - drop the next frame that passes through */
#define VFCTRL_FLUSH_FRAMES 13
/* For encoding - flush delayed frames */
#define VFCTRL_SCREENSHOT 14
/* Make a screenshot */
#define VFCTRL_INIT_EOSD 15
/* Select EOSD renderer */
#define VFCTRL_DRAW_EOSD 16
/* Render EOSD */
#define VFCTRL_GET_PTS 17
/* Return last pts value that reached vf_vo*/
#define VFCTRL_SET_DEINTERLACE 18
/* Set deinterlacing status */
#define VFCTRL_GET_DEINTERLACE 19
/* Get deinterlacing status */
#include "vfcap.h"
//FIXME this should be in a common header, but i dunno which
#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
// functions:
void
ff_vf_mpi_clear
(
mp_image_t
*
mpi
,
int
x0
,
int
y0
,
int
w
,
int
h
);
mp_image_t
*
ff_vf_get_image
(
vf_instance_t
*
vf
,
unsigned
int
outfmt
,
int
mp_imgtype
,
int
mp_imgflag
,
int
w
,
int
h
);
vf_instance_t
*
vf_open_plugin
(
const
vf_info_t
*
const
*
filter_list
,
vf_instance_t
*
next
,
const
char
*
name
,
char
**
args
);
vf_instance_t
*
vf_open_filter
(
vf_instance_t
*
next
,
const
char
*
name
,
char
**
args
);
vf_instance_t
*
ff_vf_add_before_vo
(
vf_instance_t
**
vf
,
char
*
name
,
char
**
args
);
vf_instance_t
*
vf_open_encoder
(
vf_instance_t
*
next
,
const
char
*
name
,
char
*
args
);
unsigned
int
ff_vf_match_csp
(
vf_instance_t
**
vfp
,
const
unsigned
int
*
list
,
unsigned
int
preferred
);
void
ff_vf_clone_mpi_attributes
(
mp_image_t
*
dst
,
mp_image_t
*
src
);
void
ff_vf_queue_frame
(
vf_instance_t
*
vf
,
int
(
*
)(
vf_instance_t
*
));
int
ff_vf_output_queued_frame
(
vf_instance_t
*
vf
);
// default wrappers:
int
ff_vf_next_config
(
struct
vf_instance
*
vf
,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
);
int
ff_vf_next_control
(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
);
void
ff_vf_extra_flip
(
struct
vf_instance
*
vf
);
int
ff_vf_next_query_format
(
struct
vf_instance
*
vf
,
unsigned
int
fmt
);
int
ff_vf_next_put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
);
void
ff_vf_next_draw_slice
(
struct
vf_instance
*
vf
,
unsigned
char
**
src
,
int
*
stride
,
int
w
,
int
h
,
int
x
,
int
y
);
vf_instance_t
*
ff_append_filters
(
vf_instance_t
*
last
);
void
ff_vf_uninit_filter
(
vf_instance_t
*
vf
);
void
ff_vf_uninit_filter_chain
(
vf_instance_t
*
vf
);
int
ff_vf_config_wrapper
(
struct
vf_instance
*
vf
,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
);
static
inline
int
norm_qscale
(
int
qscale
,
int
type
)
{
switch
(
type
)
{
case
0
:
// MPEG-1
return
qscale
;
case
1
:
// MPEG-2
return
qscale
>>
1
;
case
2
:
// H264
return
qscale
>>
2
;
case
3
:
// VP56
return
(
63
-
qscale
+
2
)
>>
2
;
}
return
qscale
;
}
#endif
/* MPLAYER_VF_H */
libavfilter/libmpcodecs/vfcap.h
deleted
100644 → 0
View file @
f422f474
/* VFCAP_* values: they are flags, returned by query_format():
*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPLAYER_VFCAP_H
#define MPLAYER_VFCAP_H
// set, if the given colorspace is supported (with or without conversion)
#define VFCAP_CSP_SUPPORTED 0x1
// set, if the given colorspace is supported _without_ conversion
#define VFCAP_CSP_SUPPORTED_BY_HW 0x2
// set if the driver/filter can draw OSD
#define VFCAP_OSD 0x4
// set if the driver/filter can handle compressed SPU stream
#define VFCAP_SPU 0x8
// scaling up/down by hardware, or software:
#define VFCAP_HWSCALE_UP 0x10
#define VFCAP_HWSCALE_DOWN 0x20
#define VFCAP_SWSCALE 0x40
// driver/filter can do vertical flip (upside-down)
#define VFCAP_FLIP 0x80
// driver/hardware handles timing (blocking)
#define VFCAP_TIMER 0x100
// driver _always_ flip image upside-down (for ve_vfw)
#define VFCAP_FLIPPED 0x200
// vf filter: accepts stride (put_image)
// vo driver: has draw_slice() support for the given csp
#define VFCAP_ACCEPT_STRIDE 0x400
// filter does postprocessing (so you shouldn't scale/filter image before it)
#define VFCAP_POSTPROC 0x800
// filter cannot be reconfigured to different size & format
#define VFCAP_CONSTANT 0x1000
// filter can draw EOSD
#define VFCAP_EOSD 0x2000
// filter will draw EOSD at screen resolution (without scaling)
#define VFCAP_EOSD_UNSCALED 0x4000
// used by libvo and vf_vo, indicates the VO does not support draw_slice for this format
#define VOCAP_NOSLICES 0x8000
#endif
/* MPLAYER_VFCAP_H */
libavfilter/version.h
View file @
e7e0005c
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 9
#define LIBAVFILTER_VERSION_MINOR 9
#define LIBAVFILTER_VERSION_MICRO 10
2
#define LIBAVFILTER_VERSION_MICRO 10
3
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment