Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
de42d2a3
Commit
de42d2a3
authored
Dec 04, 2012
by
anonymous
Committed by
Clément Bœsch
Dec 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/mp: add ff_ prefix to exported symbols
parent
0f65d560
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
444 additions
and
444 deletions
+444
-444
cpudetect.h
libavfilter/libmpcodecs/cpudetect.h
+4
-4
img_format.c
libavfilter/libmpcodecs/img_format.c
+2
-2
img_format.h
libavfilter/libmpcodecs/img_format.h
+2
-2
mp_image.c
libavfilter/libmpcodecs/mp_image.c
+12
-12
mp_image.h
libavfilter/libmpcodecs/mp_image.h
+8
-8
mp_msg.h
libavfilter/libmpcodecs/mp_msg.h
+13
-13
pullup.c
libavfilter/libmpcodecs/pullup.c
+26
-26
pullup.h
libavfilter/libmpcodecs/pullup.h
+12
-12
vd_ffmpeg.h
libavfilter/libmpcodecs/vd_ffmpeg.h
+1
-1
vf.h
libavfilter/libmpcodecs/vf.h
+17
-17
vf_denoise3d.c
libavfilter/libmpcodecs/vf_denoise3d.c
+5
-5
vf_detc.c
libavfilter/libmpcodecs/vf_detc.c
+18
-18
vf_dint.c
libavfilter/libmpcodecs/vf_dint.c
+8
-8
vf_divtc.c
libavfilter/libmpcodecs/vf_divtc.c
+27
-27
vf_down3dright.c
libavfilter/libmpcodecs/vf_down3dright.c
+5
-5
vf_dsize.c
libavfilter/libmpcodecs/vf_dsize.c
+4
-4
vf_eq.c
libavfilter/libmpcodecs/vf_eq.c
+6
-6
vf_eq2.c
libavfilter/libmpcodecs/vf_eq2.c
+7
-7
vf_fil.c
libavfilter/libmpcodecs/vf_fil.c
+5
-5
vf_filmdint.c
libavfilter/libmpcodecs/vf_filmdint.c
+19
-19
vf_fspp.c
libavfilter/libmpcodecs/vf_fspp.c
+11
-11
vf_harddup.c
libavfilter/libmpcodecs/vf_harddup.c
+4
-4
vf_il.c
libavfilter/libmpcodecs/vf_il.c
+3
-3
vf_ilpack.c
libavfilter/libmpcodecs/vf_ilpack.c
+7
-7
vf_ivtc.c
libavfilter/libmpcodecs/vf_ivtc.c
+12
-12
vf_kerndeint.c
libavfilter/libmpcodecs/vf_kerndeint.c
+8
-8
vf_mcdeint.c
libavfilter/libmpcodecs/vf_mcdeint.c
+8
-8
vf_noise.c
libavfilter/libmpcodecs/vf_noise.c
+13
-13
vf_ow.c
libavfilter/libmpcodecs/vf_ow.c
+7
-7
vf_perspective.c
libavfilter/libmpcodecs/vf_perspective.c
+5
-5
vf_phase.c
libavfilter/libmpcodecs/vf_phase.c
+9
-9
vf_pp.c
libavfilter/libmpcodecs/vf_pp.c
+8
-8
vf_pp7.c
libavfilter/libmpcodecs/vf_pp7.c
+12
-12
vf_pullup.c
libavfilter/libmpcodecs/vf_pullup.c
+35
-35
vf_qp.c
libavfilter/libmpcodecs/vf_qp.c
+7
-7
vf_sab.c
libavfilter/libmpcodecs/vf_sab.c
+5
-5
vf_scale.h
libavfilter/libmpcodecs/vf_scale.h
+8
-8
vf_softpulldown.c
libavfilter/libmpcodecs/vf_softpulldown.c
+8
-8
vf_softskip.c
libavfilter/libmpcodecs/vf_softskip.c
+6
-6
vf_spp.c
libavfilter/libmpcodecs/vf_spp.c
+12
-12
vf_stereo3d.c
libavfilter/libmpcodecs/vf_stereo3d.c
+11
-11
vf_telecine.c
libavfilter/libmpcodecs/vf_telecine.c
+7
-7
vf_tinterlace.c
libavfilter/libmpcodecs/vf_tinterlace.c
+13
-13
vf_unsharp.c
libavfilter/libmpcodecs/vf_unsharp.c
+12
-12
vf_uspp.c
libavfilter/libmpcodecs/vf_uspp.c
+12
-12
vf_mp.c
libavfilter/vf_mp.c
+0
-0
No files found.
libavfilter/libmpcodecs/cpudetect.h
View file @
de42d2a3
...
...
@@ -47,13 +47,13 @@ typedef struct cpucaps_s {
int
hasTSC
;
}
CpuCaps
;
extern
CpuCaps
gCpuCaps
;
extern
CpuCaps
ff_
gCpuCaps
;
void
do_cpuid
(
unsigned
int
ax
,
unsigned
int
*
p
);
void
ff_
do_cpuid
(
unsigned
int
ax
,
unsigned
int
*
p
);
void
GetCpuCaps
(
CpuCaps
*
caps
);
void
ff_
GetCpuCaps
(
CpuCaps
*
caps
);
/* returned value is malloc()'ed so free() it after use */
char
*
GetCpuFriendlyName
(
unsigned
int
regs
[],
unsigned
int
regs2
[]);
char
*
ff_
GetCpuFriendlyName
(
unsigned
int
regs
[],
unsigned
int
regs2
[]);
#endif
/* MPLAYER_CPUDETECT_H */
libavfilter/libmpcodecs/img_format.c
View file @
de42d2a3
...
...
@@ -20,7 +20,7 @@
#include "img_format.h"
#include "stdio.h"
const
char
*
vo_format_name
(
int
format
)
const
char
*
ff_
vo_format_name
(
int
format
)
{
static
char
unknown_format
[
20
];
switch
(
format
)
...
...
@@ -107,7 +107,7 @@ const char *vo_format_name(int format)
return
unknown_format
;
}
int
mp_get_chroma_shift
(
int
format
,
int
*
x_shift
,
int
*
y_shift
)
int
ff_
mp_get_chroma_shift
(
int
format
,
int
*
x_shift
,
int
*
y_shift
)
{
int
xs
=
0
,
ys
=
0
;
int
bpp
;
...
...
libavfilter/libmpcodecs/img_format.h
View file @
de42d2a3
...
...
@@ -202,13 +202,13 @@ typedef struct {
int
timestamp
;
// pts, 90000 Hz counter based
}
vo_mpegpes_t
;
const
char
*
vo_format_name
(
int
format
);
const
char
*
ff_
vo_format_name
(
int
format
);
/**
* Calculates the scale shifts for the chroma planes for planar YUV
*
* \return bits-per-pixel for format if successful (i.e. format is 3 or 4-planes planar YUV), 0 otherwise
*/
int
mp_get_chroma_shift
(
int
format
,
int
*
x_shift
,
int
*
y_shift
);
int
ff_
mp_get_chroma_shift
(
int
format
,
int
*
x_shift
,
int
*
y_shift
);
#endif
/* MPLAYER_IMG_FORMAT_H */
libavfilter/libmpcodecs/mp_image.c
View file @
de42d2a3
...
...
@@ -32,7 +32,7 @@
#include "libvo/fastmemcpy.h"
//#include "libavutil/mem.h"
void
mp_image_alloc_planes
(
mp_image_t
*
mpi
)
{
void
ff_
mp_image_alloc_planes
(
mp_image_t
*
mpi
)
{
// 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
+
...
...
@@ -71,16 +71,16 @@ void mp_image_alloc_planes(mp_image_t *mpi) {
mpi
->
flags
|=
MP_IMGFLAG_ALLOCATED
;
}
mp_image_t
*
alloc_mpi
(
int
w
,
int
h
,
unsigned
long
int
fmt
)
{
mp_image_t
*
mpi
=
new_mp_image
(
w
,
h
);
mp_image_t
*
ff_
alloc_mpi
(
int
w
,
int
h
,
unsigned
long
int
fmt
)
{
mp_image_t
*
mpi
=
ff_
new_mp_image
(
w
,
h
);
mp_image_setfmt
(
mpi
,
fmt
);
mp_image_alloc_planes
(
mpi
);
ff_
mp_image_setfmt
(
mpi
,
fmt
);
ff_
mp_image_alloc_planes
(
mpi
);
return
mpi
;
}
void
copy_mpi
(
mp_image_t
*
dmpi
,
mp_image_t
*
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
]);
...
...
@@ -95,7 +95,7 @@ void copy_mpi(mp_image_t *dmpi, mp_image_t *mpi) {
}
}
void
mp_image_setfmt
(
mp_image_t
*
mpi
,
unsigned
int
out_fmt
){
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
...
...
@@ -123,9 +123,9 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
}
mpi
->
flags
|=
MP_IMGFLAG_YUV
;
mpi
->
num_planes
=
3
;
if
(
mp_get_chroma_shift
(
out_fmt
,
NULL
,
NULL
))
{
if
(
ff_
mp_get_chroma_shift
(
out_fmt
,
NULL
,
NULL
))
{
mpi
->
flags
|=
MP_IMGFLAG_PLANAR
;
mpi
->
bpp
=
mp_get_chroma_shift
(
out_fmt
,
&
mpi
->
chroma_x_shift
,
&
mpi
->
chroma_y_shift
);
mpi
->
bpp
=
ff_
mp_get_chroma_shift
(
out_fmt
,
&
mpi
->
chroma_x_shift
,
&
mpi
->
chroma_y_shift
);
mpi
->
chroma_width
=
mpi
->
width
>>
mpi
->
chroma_x_shift
;
mpi
->
chroma_height
=
mpi
->
height
>>
mpi
->
chroma_y_shift
;
}
...
...
@@ -174,11 +174,11 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
mpi
->
chroma_y_shift
=
1
;
return
;
}
mp_msg
(
MSGT_DECVIDEO
,
MSGL_WARN
,
"mp_image: unknown out_fmt: 0x%X
\n
"
,
out_fmt
);
ff_
mp_msg
(
MSGT_DECVIDEO
,
MSGL_WARN
,
"mp_image: unknown out_fmt: 0x%X
\n
"
,
out_fmt
);
mpi
->
bpp
=
0
;
}
mp_image_t
*
new_mp_image
(
int
w
,
int
h
){
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
));
...
...
@@ -187,7 +187,7 @@ mp_image_t* new_mp_image(int w,int h){
return
mpi
;
}
void
free_mp_image
(
mp_image_t
*
mpi
){
void
f
f_f
ree_mp_image
(
mp_image_t
*
mpi
){
if
(
!
mpi
)
return
;
if
(
mpi
->
flags
&
MP_IMGFLAG_ALLOCATED
){
/* becouse we allocate the whole image in once */
...
...
libavfilter/libmpcodecs/mp_image.h
View file @
de42d2a3
...
...
@@ -62,14 +62,14 @@
#define MP_IMGFLAGMASK_RESTRICTIONS 0xFF
//--------- color info (filled by mp_image_setfmt() ) -----------
//--------- 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 vf_get_image etc.
// 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
...
...
@@ -139,12 +139,12 @@ typedef struct mp_image {
void
*
priv
;
}
mp_image_t
;
void
mp_image_setfmt
(
mp_image_t
*
mpi
,
unsigned
int
out_fmt
);
mp_image_t
*
new_mp_image
(
int
w
,
int
h
);
void
free_mp_image
(
mp_image_t
*
mpi
);
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
f
f_f
ree_mp_image
(
mp_image_t
*
mpi
);
mp_image_t
*
alloc_mpi
(
int
w
,
int
h
,
unsigned
long
int
fmt
);
void
mp_image_alloc_planes
(
mp_image_t
*
mpi
);
void
copy_mpi
(
mp_image_t
*
dmpi
,
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
View file @
de42d2a3
...
...
@@ -129,36 +129,36 @@ extern int verbose;
#define MSGT_MAX 64
extern
char
*
mp_msg_charset
;
extern
int
mp_msg_color
;
extern
int
mp_msg_module
;
extern
char
*
ff_
mp_msg_charset
;
extern
int
ff_
mp_msg_color
;
extern
int
ff_
mp_msg_module
;
extern
int
mp_msg_levels
[
MSGT_MAX
];
extern
int
mp_msg_level_all
;
extern
int
ff_
mp_msg_levels
[
MSGT_MAX
];
extern
int
ff_
mp_msg_level_all
;
void
mp_msg_init
(
void
);
int
mp_msg_test
(
int
mod
,
int
lev
);
void
ff_
mp_msg_init
(
void
);
int
ff_
mp_msg_test
(
int
mod
,
int
lev
);
#include "config.h"
void
mp_msg_va
(
int
mod
,
int
lev
,
const
char
*
format
,
va_list
va
);
void
ff_
mp_msg_va
(
int
mod
,
int
lev
,
const
char
*
format
,
va_list
va
);
#ifdef __GNUC__
void
mp_msg
(
int
mod
,
int
lev
,
const
char
*
format
,
...
)
__attribute__
((
format
(
printf
,
3
,
4
)));
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... ) mp_msg(mod, lev, ## args )
# define mp_dbg(mod,lev, args... )
ff_
mp_msg(mod, lev, ## args )
# else
# define mp_dbg(mod,lev, args... )
/* only useful for developers */
# endif
#else // not GNU C
void
mp_msg
(
int
mod
,
int
lev
,
const
char
*
format
,
...
);
void
ff_
mp_msg
(
int
mod
,
int
lev
,
const
char
*
format
,
...
);
# ifdef MP_DEBUG
# define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__)
# define mp_dbg(mod,lev, ... )
ff_
mp_msg(mod, lev, __VA_ARGS__)
# else
# define mp_dbg(mod,lev, ... )
/* only useful for developers */
# endif
#endif
/* __GNUC__ */
const
char
*
filename_recode
(
const
char
*
filename
);
const
char
*
f
f_f
ilename_recode
(
const
char
*
filename
);
#endif
/* MPLAYER_MP_MSG_H */
libavfilter/libmpcodecs/pullup.c
View file @
de42d2a3
...
...
@@ -288,7 +288,7 @@ static void alloc_buffer(struct pullup_context *c, struct pullup_buffer *b)
}
}
struct
pullup_buffer
*
pullup_lock_buffer
(
struct
pullup_buffer
*
b
,
int
parity
)
struct
pullup_buffer
*
ff_
pullup_lock_buffer
(
struct
pullup_buffer
*
b
,
int
parity
)
{
if
(
!
b
)
return
0
;
if
((
parity
+
1
)
&
1
)
b
->
lock
[
0
]
++
;
...
...
@@ -296,14 +296,14 @@ struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity)
return
b
;
}
void
pullup_release_buffer
(
struct
pullup_buffer
*
b
,
int
parity
)
void
ff_
pullup_release_buffer
(
struct
pullup_buffer
*
b
,
int
parity
)
{
if
(
!
b
)
return
;
if
((
parity
+
1
)
&
1
)
b
->
lock
[
0
]
--
;
if
((
parity
+
1
)
&
2
)
b
->
lock
[
1
]
--
;
}
struct
pullup_buffer
*
pullup_get_buffer
(
struct
pullup_context
*
c
,
int
parity
)
struct
pullup_buffer
*
ff_
pullup_get_buffer
(
struct
pullup_context
*
c
,
int
parity
)
{
int
i
;
...
...
@@ -311,7 +311,7 @@ struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity)
if
(
parity
<
2
&&
c
->
last
&&
parity
!=
c
->
last
->
parity
&&
!
c
->
last
->
buffer
->
lock
[
parity
])
{
alloc_buffer
(
c
,
c
->
last
->
buffer
);
return
pullup_lock_buffer
(
c
->
last
->
buffer
,
parity
);
return
ff_
pullup_lock_buffer
(
c
->
last
->
buffer
,
parity
);
}
/* Prefer a buffer with both fields open */
...
...
@@ -319,7 +319,7 @@ struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity)
if
(
c
->
buffers
[
i
].
lock
[
0
])
continue
;
if
(
c
->
buffers
[
i
].
lock
[
1
])
continue
;
alloc_buffer
(
c
,
&
c
->
buffers
[
i
]);
return
pullup_lock_buffer
(
&
c
->
buffers
[
i
],
parity
);
return
ff_
pullup_lock_buffer
(
&
c
->
buffers
[
i
],
parity
);
}
if
(
parity
==
2
)
return
0
;
...
...
@@ -329,7 +329,7 @@ struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity)
if
(((
parity
+
1
)
&
1
)
&&
c
->
buffers
[
i
].
lock
[
0
])
continue
;
if
(((
parity
+
1
)
&
2
)
&&
c
->
buffers
[
i
].
lock
[
1
])
continue
;
alloc_buffer
(
c
,
&
c
->
buffers
[
i
]);
return
pullup_lock_buffer
(
&
c
->
buffers
[
i
],
parity
);
return
ff_
pullup_lock_buffer
(
&
c
->
buffers
[
i
],
parity
);
}
return
0
;
...
...
@@ -412,7 +412,7 @@ static void check_field_queue(struct pullup_context *c)
}
}
void
pullup_submit_field
(
struct
pullup_context
*
c
,
struct
pullup_buffer
*
b
,
int
parity
)
void
ff_
pullup_submit_field
(
struct
pullup_context
*
c
,
struct
pullup_buffer
*
b
,
int
parity
)
{
struct
pullup_field
*
f
;
...
...
@@ -424,7 +424,7 @@ void pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int
f
=
c
->
head
;
f
->
parity
=
parity
;
f
->
buffer
=
pullup_lock_buffer
(
b
,
parity
);
f
->
buffer
=
ff_
pullup_lock_buffer
(
b
,
parity
);
f
->
flags
=
0
;
f
->
breaks
=
0
;
f
->
affinity
=
0
;
...
...
@@ -439,12 +439,12 @@ void pullup_submit_field(struct pullup_context *c, struct pullup_buffer *b, int
c
->
head
=
c
->
head
->
next
;
}
void
pullup_flush_fields
(
struct
pullup_context
*
c
)
void
ff_
pullup_flush_fields
(
struct
pullup_context
*
c
)
{
struct
pullup_field
*
f
;
for
(
f
=
c
->
first
;
f
&&
f
!=
c
->
head
;
f
=
f
->
next
)
{
pullup_release_buffer
(
f
->
buffer
,
f
->
parity
);
ff_
pullup_release_buffer
(
f
->
buffer
,
f
->
parity
);
f
->
buffer
=
0
;
}
c
->
first
=
c
->
last
=
0
;
...
...
@@ -644,7 +644,7 @@ static void print_aff_and_breaks(struct pullup_context *c, struct pullup_field *
struct
pullup_frame
*
pullup_get_frame
(
struct
pullup_context
*
c
)
struct
pullup_frame
*
ff_
pullup_get_frame
(
struct
pullup_context
*
c
)
{
int
i
;
struct
pullup_frame
*
fr
=
c
->
frame
;
...
...
@@ -683,12 +683,12 @@ struct pullup_frame *pullup_get_frame(struct pullup_context *c)
fr
->
ofields
[
fr
->
parity
]
=
fr
->
ifields
[
1
+
aff
];
fr
->
ofields
[
fr
->
parity
^
1
]
=
fr
->
ifields
[
1
];
}
pullup_lock_buffer
(
fr
->
ofields
[
0
],
0
);
pullup_lock_buffer
(
fr
->
ofields
[
1
],
1
);
ff_
pullup_lock_buffer
(
fr
->
ofields
[
0
],
0
);
ff_
pullup_lock_buffer
(
fr
->
ofields
[
1
],
1
);
if
(
fr
->
ofields
[
0
]
==
fr
->
ofields
[
1
])
{
fr
->
buffer
=
fr
->
ofields
[
0
];
pullup_lock_buffer
(
fr
->
buffer
,
2
);
ff_
pullup_lock_buffer
(
fr
->
buffer
,
2
);
return
fr
;
}
return
fr
;
...
...
@@ -710,7 +710,7 @@ static void copy_field(struct pullup_context *c, struct pullup_buffer *dest,
}
}
void
pullup_pack_frame
(
struct
pullup_context
*
c
,
struct
pullup_frame
*
fr
)
void
ff_
pullup_pack_frame
(
struct
pullup_context
*
c
,
struct
pullup_frame
*
fr
)
{
int
i
;
if
(
fr
->
buffer
)
return
;
...
...
@@ -719,23 +719,23 @@ void pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr)
{
if
(
fr
->
ofields
[
i
]
->
lock
[
i
^
1
])
continue
;
fr
->
buffer
=
fr
->
ofields
[
i
];
pullup_lock_buffer
(
fr
->
buffer
,
2
);
ff_
pullup_lock_buffer
(
fr
->
buffer
,
2
);
copy_field
(
c
,
fr
->
buffer
,
fr
->
ofields
[
i
^
1
],
i
^
1
);
return
;
}
fr
->
buffer
=
pullup_get_buffer
(
c
,
2
);
fr
->
buffer
=
ff_
pullup_get_buffer
(
c
,
2
);
copy_field
(
c
,
fr
->
buffer
,
fr
->
ofields
[
0
],
0
);
copy_field
(
c
,
fr
->
buffer
,
fr
->
ofields
[
1
],
1
);
}
void
pullup_release_frame
(
struct
pullup_frame
*
fr
)
void
ff_
pullup_release_frame
(
struct
pullup_frame
*
fr
)
{
int
i
;
for
(
i
=
0
;
i
<
fr
->
length
;
i
++
)
pullup_release_buffer
(
fr
->
ifields
[
i
],
fr
->
parity
^
(
i
&
1
));
pullup_release_buffer
(
fr
->
ofields
[
0
],
0
);
pullup_release_buffer
(
fr
->
ofields
[
1
],
1
);
if
(
fr
->
buffer
)
pullup_release_buffer
(
fr
->
buffer
,
2
);
ff_
pullup_release_buffer
(
fr
->
ifields
[
i
],
fr
->
parity
^
(
i
&
1
));
ff_
pullup_release_buffer
(
fr
->
ofields
[
0
],
0
);
ff_
pullup_release_buffer
(
fr
->
ofields
[
1
],
1
);
if
(
fr
->
buffer
)
ff_
pullup_release_buffer
(
fr
->
buffer
,
2
);
fr
->
lock
--
;
}
...
...
@@ -744,7 +744,7 @@ void pullup_release_frame(struct pullup_frame *fr)
struct
pullup_context
*
pullup_alloc_context
(
void
)
struct
pullup_context
*
ff_
pullup_alloc_context
(
void
)
{
struct
pullup_context
*
c
;
...
...
@@ -753,7 +753,7 @@ struct pullup_context *pullup_alloc_context(void)
return
c
;
}
void
pullup_preinit_context
(
struct
pullup_context
*
c
)
void
ff_
pullup_preinit_context
(
struct
pullup_context
*
c
)
{
c
->
bpp
=
calloc
(
c
->
nplanes
,
sizeof
(
int
));
c
->
w
=
calloc
(
c
->
nplanes
,
sizeof
(
int
));
...
...
@@ -762,7 +762,7 @@ void pullup_preinit_context(struct pullup_context *c)
c
->
background
=
calloc
(
c
->
nplanes
,
sizeof
(
int
));
}
void
pullup_init_context
(
struct
pullup_context
*
c
)
void
ff_
pullup_init_context
(
struct
pullup_context
*
c
)
{
int
mp
=
c
->
metric_plane
;
if
(
c
->
nbuffers
<
10
)
c
->
nbuffers
=
10
;
...
...
@@ -805,7 +805,7 @@ void pullup_init_context(struct pullup_context *c)
}
}
void
pullup_free_context
(
struct
pullup_context
*
c
)
void
ff_
pullup_free_context
(
struct
pullup_context
*
c
)
{
struct
pullup_field
*
f
;
free
(
c
->
buffers
);
...
...
libavfilter/libmpcodecs/pullup.h
View file @
de42d2a3
...
...
@@ -83,20 +83,20 @@ struct pullup_context
};
struct
pullup_buffer
*
pullup_lock_buffer
(
struct
pullup_buffer
*
b
,
int
parity
);
void
pullup_release_buffer
(
struct
pullup_buffer
*
b
,
int
parity
);
struct
pullup_buffer
*
pullup_get_buffer
(
struct
pullup_context
*
c
,
int
parity
);
struct
pullup_buffer
*
ff_
pullup_lock_buffer
(
struct
pullup_buffer
*
b
,
int
parity
);
void
ff_
pullup_release_buffer
(
struct
pullup_buffer
*
b
,
int
parity
);
struct
pullup_buffer
*
ff_
pullup_get_buffer
(
struct
pullup_context
*
c
,
int
parity
);
void
pullup_submit_field
(
struct
pullup_context
*
c
,
struct
pullup_buffer
*
b
,
int
parity
);
void
pullup_flush_fields
(
struct
pullup_context
*
c
);
void
ff_
pullup_submit_field
(
struct
pullup_context
*
c
,
struct
pullup_buffer
*
b
,
int
parity
);
void
ff_
pullup_flush_fields
(
struct
pullup_context
*
c
);
struct
pullup_frame
*
pullup_get_frame
(
struct
pullup_context
*
c
);
void
pullup_pack_frame
(
struct
pullup_context
*
c
,
struct
pullup_frame
*
fr
);
void
pullup_release_frame
(
struct
pullup_frame
*
fr
);
struct
pullup_frame
*
ff_
pullup_get_frame
(
struct
pullup_context
*
c
);
void
ff_
pullup_pack_frame
(
struct
pullup_context
*
c
,
struct
pullup_frame
*
fr
);
void
ff_
pullup_release_frame
(
struct
pullup_frame
*
fr
);
struct
pullup_context
*
pullup_alloc_context
(
void
);
void
pullup_preinit_context
(
struct
pullup_context
*
c
);
void
pullup_init_context
(
struct
pullup_context
*
c
);
void
pullup_free_context
(
struct
pullup_context
*
c
);
struct
pullup_context
*
ff_
pullup_alloc_context
(
void
);
void
ff_
pullup_preinit_context
(
struct
pullup_context
*
c
);
void
ff_
pullup_init_context
(
struct
pullup_context
*
c
);
void
ff_
pullup_free_context
(
struct
pullup_context
*
c
);
#endif
/* MPLAYER_PULLUP_H */
libavfilter/libmpcodecs/vd_ffmpeg.h
View file @
de42d2a3
...
...
@@ -19,6 +19,6 @@
#ifndef MPLAYER_VD_FFMPEG_H
#define MPLAYER_VD_FFMPEG_H
void
init_avcodec
(
void
);
void
ff_
init_avcodec
(
void
);
#endif
/* MPLAYER_VD_FFMPEG_H */
libavfilter/libmpcodecs/vf.h
View file @
de42d2a3
...
...
@@ -119,35 +119,35 @@ typedef struct vf_seteq_s
// functions:
void
vf_mpi_clear
(
mp_image_t
*
mpi
,
int
x0
,
int
y0
,
int
w
,
int
h
);
mp_image_t
*
vf_get_image
(
vf_instance_t
*
vf
,
unsigned
int
outfmt
,
int
mp_imgtype
,
int
mp_imgflag
,
int
w
,
int
h
);
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
*
vf_add_before_vo
(
vf_instance_t
**
vf
,
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
vf_match_csp
(
vf_instance_t
**
vfp
,
const
unsigned
int
*
list
,
unsigned
int
preferred
);
void
vf_clone_mpi_attributes
(
mp_image_t
*
dst
,
mp_image_t
*
src
);
void
vf_queue_frame
(
vf_instance_t
*
vf
,
int
(
*
)(
vf_instance_t
*
));
int
vf_output_queued_frame
(
vf_instance_t
*
vf
);
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
vf_next_config
(
struct
vf_instance
*
vf
,
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
vf_next_control
(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
);
void
vf_extra_flip
(
struct
vf_instance
*
vf
);
int
vf_next_query_format
(
struct
vf_instance
*
vf
,
unsigned
int
fmt
);
int
vf_next_put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
);
void
vf_next_draw_slice
(
struct
vf_instance
*
vf
,
unsigned
char
**
src
,
int
*
stride
,
int
w
,
int
h
,
int
x
,
int
y
);
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
*
append_filters
(
vf_instance_t
*
last
);
vf_instance_t
*
ff_
append_filters
(
vf_instance_t
*
last
);
void
vf_uninit_filter
(
vf_instance_t
*
vf
);
void
vf_uninit_filter_chain
(
vf_instance_t
*
vf
);
void
ff_
vf_uninit_filter
(
vf_instance_t
*
vf
);
void
ff_
vf_uninit_filter_chain
(
vf_instance_t
*
vf
);
int
vf_config_wrapper
(
struct
vf_instance
*
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
);
...
...
libavfilter/libmpcodecs/vf_denoise3d.c
View file @
de42d2a3
...
...
@@ -54,7 +54,7 @@ static int config(struct vf_instance *vf,
vf
->
priv
->
pmpi
=
NULL
;
// vf->default_caps &= !VFCAP_ACCEPT_STRIDE;
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
...
...
@@ -114,7 +114,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
int
ch
=
mpi
->
h
>>
mpi
->
chroma_y_shift
;
int
W
=
mpi
->
w
,
H
=
mpi
->
h
;
mp_image_t
*
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mp_image_t
*
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_IP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
|
MP_IMGFLAG_READABLE
,
mpi
->
w
,
mpi
->
h
);
...
...
@@ -142,7 +142,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
vf
->
priv
->
Coefs
[
3
]
+
256
);
vf
->
priv
->
pmpi
=
dmpi
;
// save reference image
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -157,7 +157,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -256,7 +256,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_denoise3d
=
{
const
vf_info_t
ff_
vf_info_denoise3d
=
{
"3D Denoiser (variable lowpass filter)"
,
"denoise3d"
,
"Daniel Moreno"
,
...
...
libavfilter/libmpcodecs/vf_detc.c
View file @
de42d2a3
...
...
@@ -140,14 +140,14 @@ static void diff_fields(struct metrics *metr, mp_image_t *old, mp_image_t *new)
static
void
status
(
int
f
,
struct
metrics
*
m
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"frame %d: e=%d o=%d n=%d t=%d
\n
"
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"frame %d: e=%d o=%d n=%d t=%d
\n
"
,
f
,
m
->
even
,
m
->
odd
,
m
->
noise
,
m
->
temp
);
}
static
int
analyze_fixed_pattern
(
struct
vf_priv_s
*
p
,
mp_image_t
*
new
,
mp_image_t
*
old
)
{
if
(
p
->
frame
>=
0
)
p
->
frame
=
(
p
->
frame
+
1
)
%
5
;
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"frame %d
\n
"
,
p
->
frame
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"frame %d
\n
"
,
p
->
frame
);
switch
(
p
->
frame
)
{
case
-
1
:
case
0
:
case
1
:
case
2
:
return
TC_PROG
;
...
...
@@ -176,30 +176,30 @@ static int analyze_aggressive(struct vf_priv_s *p, mp_image_t *new, mp_image_t *
/* We need to break at scene changes, but is this a valid test? */
if
((
m
.
even
>
p
->
thres
[
2
])
&&
(
m
.
odd
>
p
->
thres
[
2
])
&&
(
m
.
temp
>
p
->
thres
[
3
])
&&
(
m
.
temp
>
5
*
pm
.
temp
)
&&
(
m
.
temp
*
2
>
m
.
noise
))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"scene change breaking telecine!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"scene change breaking telecine!
\n
"
);
p
->
frame
=
-
1
;
return
TC_DROP
;
}
/* Thres. is to compensate for quantization errors when noise is low */
if
(
m
.
noise
-
m
.
temp
>
-
p
->
thres
[
4
])
{
if
(
COMPARABLE
(
m
.
even
,
pm
.
odd
))
{
//mp_msg(MSGT_VFILTER, MSGL_V, "confirmed field match!\n");
//
ff_
mp_msg(MSGT_VFILTER, MSGL_V, "confirmed field match!\n");
return
TC_IL2
;
}
else
if
((
m
.
even
<
p
->
thres
[
0
])
&&
(
m
.
odd
<
p
->
thres
[
0
])
&&
VERYCLOSE
(
m
.
even
,
m
.
odd
)
&&
VERYCLOSE
(
m
.
noise
,
m
.
temp
)
&&
VERYCLOSE
(
m
.
noise
,
pm
.
noise
))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"interlaced frame appears in duplicate!!!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"interlaced frame appears in duplicate!!!
\n
"
);
p
->
pm
=
pm
;
/* hack :) */
p
->
frame
=
3
;
return
TC_IL1
;
}
}
else
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"mismatched telecine fields!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"mismatched telecine fields!
\n
"
);
p
->
frame
=
-
1
;
}
}
if
(
2
*
m
.
even
*
m
.
temp
<
m
.
odd
*
m
.
noise
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"caught telecine sync!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"caught telecine sync!
\n
"
);
p
->
frame
=
3
;
return
TC_IL1
;
}
...
...
@@ -207,11 +207,11 @@ static int analyze_aggressive(struct vf_priv_s *p, mp_image_t *new, mp_image_t *
if
(
p
->
frame
<
3
)
{
if
(
m
.
noise
>
p
->
thres
[
3
])
{
if
(
m
.
noise
>
2
*
m
.
temp
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"merging fields out of sequence!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"merging fields out of sequence!
\n
"
);
return
TC_IL2
;
}
if
((
m
.
noise
>
2
*
pm
.
noise
)
&&
(
m
.
even
>
p
->
thres
[
2
])
&&
(
m
.
odd
>
p
->
thres
[
2
]))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"dropping horrible interlaced frame!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"dropping horrible interlaced frame!
\n
"
);
return
TC_DROP
;
}
}
...
...
@@ -220,7 +220,7 @@ static int analyze_aggressive(struct vf_priv_s *p, mp_image_t *new, mp_image_t *
switch
(
p
->
frame
)
{
case
-
1
:
if
(
4
*
m
.
noise
>
5
*
m
.
temp
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"merging fields out of sequence!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"merging fields out of sequence!
\n
"
);
return
TC_IL2
;
}
case
0
:
...
...
@@ -229,7 +229,7 @@ static int analyze_aggressive(struct vf_priv_s *p, mp_image_t *new, mp_image_t *
return
TC_PROG
;
case
3
:
if
((
m
.
even
>
p
->
thres
[
1
])
&&
(
m
.
even
>
m
.
odd
)
&&
(
m
.
temp
>
m
.
noise
))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"lost telecine tracking!
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"lost telecine tracking!
\n
"
);
p
->
frame
=
-
1
;
return
TC_PROG
;
}
...
...
@@ -303,14 +303,14 @@ static int do_put_image(struct vf_instance *vf, mp_image_t *dmpi)
}
if
(
dropflag
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"drop! [%d/%d=%g]
\n
"
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"drop! [%d/%d=%g]
\n
"
,
p
->
outframes
,
p
->
inframes
,
(
float
)
p
->
outframes
/
p
->
inframes
);
p
->
lastdrop
=
0
;
return
0
;
}
p
->
outframes
++
;
return
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
static
int
put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
)
...
...
@@ -321,12 +321,12 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
p
->
inframes
++
;
if
(
p
->
needread
)
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
if
(
p
->
needread
)
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
/* FIXME: is there a good way to get rid of static type? */
else
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
else
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
,
mpi
->
width
,
mpi
->
height
);
...
...
@@ -364,7 +364,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_YV12
:
case
IMGFMT_IYUV
:
case
IMGFMT_I420
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -373,7 +373,7 @@ static int config(struct vf_instance *vf,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
)
{
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
...
...
@@ -443,7 +443,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_detc
=
{
const
vf_info_t
ff_
vf_info_detc
=
{
"de-telecine filter"
,
"detc"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_dint.c
View file @
de42d2a3
...
...
@@ -48,14 +48,14 @@ static int config (struct vf_instance *vf,
{
int
rowsize
;
vf
->
priv
->
pmpi
=
vf_get_image
(
vf
->
next
,
outfmt
,
MP_IMGTYPE_TEMP
,
vf
->
priv
->
pmpi
=
ff_
vf_get_image
(
vf
->
next
,
outfmt
,
MP_IMGTYPE_TEMP
,
0
,
width
,
height
);
if
(
!
(
vf
->
priv
->
pmpi
->
flags
&
MP_IMGFLAG_PLANAR
)
&&
outfmt
!=
IMGFMT_RGB32
&&
outfmt
!=
IMGFMT_BGR32
&&
outfmt
!=
IMGFMT_RGB24
&&
outfmt
!=
IMGFMT_BGR24
&&
outfmt
!=
IMGFMT_RGB16
&&
outfmt
!=
IMGFMT_BGR16
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"Drop-interlaced filter doesn't support this outfmt :(
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"Drop-interlaced filter doesn't support this outfmt :(
\n
"
);
return
0
;
}
vf
->
priv
->
imgfmt
=
outfmt
;
...
...
@@ -71,12 +71,12 @@ static int config (struct vf_instance *vf,
if
(
!
(
vf
->
priv
->
pmpi
->
flags
&
MP_IMGFLAG_PLANAR
)
&&
vf
->
priv
->
pmpi
->
bpp
<
24
&&
vf
->
priv
->
diff
>
31
)
vf
->
priv
->
diff
=
31
;
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"Drop-interlaced: %dx%d diff %d / level %u
\n
"
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"Drop-interlaced: %dx%d diff %d / level %u
\n
"
,
vf
->
priv
->
pmpi
->
width
,
vf
->
priv
->
pmpi
->
height
,
vf
->
priv
->
diff
,
(
unsigned
int
)
vf
->
priv
->
max
);
// vf->priv->rdfr = vf->priv->dfr = 0;
vf
->
priv
->
was_dint
=
0
;
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
int
put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
)
...
...
@@ -182,13 +182,13 @@ static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
{
vf
->
priv
->
was_dint
++
;
// vf->priv->rdfr++;
// mp_msg (MSGT_VFILTER, MSGL_INFO, "DI:%d/%d ", vf->priv->rdfr, vf->priv->dfr);
//
ff_
mp_msg (MSGT_VFILTER, MSGL_INFO, "DI:%d/%d ", vf->priv->rdfr, vf->priv->dfr);
return
0
;
}
}
vf
->
priv
->
was_dint
=
0
;
// mp_msg (MSGT_VFILTER, MSGL_INFO, "DI:%d/%d ", vf->priv->rdfr, vf->priv->dfr);
return
vf_next_put_image
(
vf
,
mpi
,
pts
);
//
ff_
mp_msg (MSGT_VFILTER, MSGL_INFO, "DI:%d/%d ", vf->priv->rdfr, vf->priv->dfr);
return
ff_
vf_next_put_image
(
vf
,
mpi
,
pts
);
}
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
...
...
@@ -204,7 +204,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_dint
=
{
const
vf_info_t
ff_
vf_info_dint
=
{
"drop interlaced frames"
,
"dint"
,
"A.G."
,
...
...
libavfilter/libmpcodecs/vf_divtc.c
View file @
de42d2a3
...
...
@@ -34,7 +34,7 @@
#include "libvo/fastmemcpy.h"
const
vf_info_t
vf_info_divtc
;
const
vf_info_t
ff_
vf_info_divtc
;
struct
vf_priv_s
{
...
...
@@ -265,11 +265,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
unsigned
int
checksum
;
double
d
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
newphase
=
p
->
phase
;
...
...
@@ -284,7 +284,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
case
2
:
if
(
p
->
frameno
/
5
>
p
->
bcount
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"
\n
%s: Log file ends prematurely! "
"Switching to one pass mode.
\n
"
,
vf
->
info
->
name
);
p
->
pass
=
0
;
...
...
@@ -306,7 +306,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
if
(
f
<
100
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"
\n
%s: Mismatch with pass-1: %+d frame(s).
\n
"
,
vf
->
info
->
name
,
f
);
...
...
@@ -315,7 +315,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
}
else
if
(
p
->
misscount
++>=
30
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"
\n
%s: Sync with pass-1 lost! "
"Switching to one pass mode.
\n
"
,
vf
->
info
->
name
);
p
->
pass
=
0
;
...
...
@@ -350,7 +350,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
if
(
newphase
!=
p
->
phase
&&
((
p
->
phase
+
4
)
%
5
<
n
)
==
((
newphase
+
4
)
%
5
<
n
))
{
p
->
phase
=
newphase
;
mp_msg
(
MSGT_VFILTER
,
MSGL_STATUS
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_STATUS
,
"
\n
%s: Telecine phase %d.
\n
"
,
vf
->
info
->
name
,
p
->
phase
);
}
...
...
@@ -363,21 +363,21 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
case
4
:
if
(
p
->
deghost
>
0
)
{
tmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
tmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
tmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
tmpi
,
mpi
);
imgop
(
copyop
,
tmpi
,
mpi
,
0
);
imgop
(
deghost_plane
,
tmpi
,
dmpi
,
p
->
deghost
);
imgop
(
copyop
,
dmpi
,
mpi
,
0
);
return
vf_next_put_image
(
vf
,
tmpi
,
MP_NOPTS_VALUE
);
return
ff_
vf_next_put_image
(
vf
,
tmpi
,
MP_NOPTS_VALUE
);
}
}
imgop
(
copyop
,
dmpi
,
mpi
,
0
);
return
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
static
int
analyze
(
struct
vf_priv_s
*
p
)
...
...
@@ -402,8 +402,8 @@ static int analyze(struct vf_priv_s *p)
if
(
!
bp
||
!
cp
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Not enough memory.
\n
"
,
vf_info_divtc
.
name
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Not enough memory.
\n
"
,
ff_
vf_info_divtc
.
name
);
free
(
buf
);
free
(
cbuf
);
return
0
;
...
...
@@ -415,8 +415,8 @@ static int analyze(struct vf_priv_s *p)
if
(
n
<=
15
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Empty 2-pass log file.
\n
"
,
vf_info_divtc
.
name
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Empty 2-pass log file.
\n
"
,
ff_
vf_info_divtc
.
name
);
free
(
buf
);
free
(
cbuf
);
return
0
;
...
...
@@ -459,9 +459,9 @@ static int analyze(struct vf_priv_s *p)
p
->
deghost
=
s1
>
s0
?
deghost
:
0
;
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%s: Deghosting %-3s (relative pattern strength %+.2fdB).
\n
"
,
vf_info_divtc
.
name
,
ff_
vf_info_divtc
.
name
,
p
->
deghost
?
"ON"
:
"OFF"
,
10
.
0
*
log10
(
s1
/
s0
));
}
...
...
@@ -492,8 +492,8 @@ static int analyze(struct vf_priv_s *p)
if
(
f
==
b
)
{
free
(
buf
-
15
);
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: No telecine pattern found!
\n
"
,
vf_info_divtc
.
name
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: No telecine pattern found!
\n
"
,
ff_
vf_info_divtc
.
name
);
return
0
;
}
...
...
@@ -577,7 +577,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_411P
:
case
IMGFMT_YUY2
:
case
IMGFMT_IF09
:
case
IMGFMT_YV12
:
case
IMGFMT_I420
:
case
IMGFMT_YVU9
:
case
IMGFMT_IUYV
:
case
IMGFMT_Y800
:
case
IMGFMT_Y8
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
...
...
@@ -604,7 +604,7 @@ static int vf_open(vf_instance_t *vf, char *args)
if
(
args
&&
!
(
args
=
av_strdup
(
args
)))
{
nomem:
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Not enough memory.
\n
"
,
vf
->
info
->
name
);
fail:
uninit
(
vf
);
...
...
@@ -643,7 +643,7 @@ static int vf_open(vf_instance_t *vf, char *args)
break
;
case
'h'
:
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"
\n
%s options:
\n\n
"
"pass=1|2 - Use 2-pass mode.
\n
"
"file=filename - Set the 2-pass log file name "
...
...
@@ -663,7 +663,7 @@ static int vf_open(vf_instance_t *vf, char *args)
break
;
default:
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Unknown argument %s.
\n
"
,
vf
->
info
->
name
,
q
);
goto
fail
;
}
...
...
@@ -674,7 +674,7 @@ static int vf_open(vf_instance_t *vf, char *args)
case
1
:
if
(
!
(
p
->
file
=
fopen
(
filename
,
"w"
)))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Can't create file %s.
\n
"
,
vf
->
info
->
name
,
filename
);
goto
fail
;
}
...
...
@@ -684,7 +684,7 @@ static int vf_open(vf_instance_t *vf, char *args)
case
2
:
if
(
!
(
p
->
file
=
fopen
(
filename
,
"r"
)))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"%s: Can't open file %s.
\n
"
,
vf
->
info
->
name
,
filename
);
goto
fail
;
}
...
...
@@ -703,14 +703,14 @@ static int vf_open(vf_instance_t *vf, char *args)
diff
=
diff_C
;
#if HAVE_MMX && HAVE_EBX_AVAILABLE
if
(
gCpuCaps
.
hasMMX
)
diff
=
diff_MMX
;
if
(
ff_
gCpuCaps
.
hasMMX
)
diff
=
diff_MMX
;
#endif
free
(
args
);
return
1
;
}
const
vf_info_t
vf_info_divtc
=
const
vf_info_t
ff_
vf_info_divtc
=
{
"inverse telecine for deinterlaced video"
,
"divtc"
,
...
...
libavfilter/libmpcodecs/vf_down3dright.c
View file @
de42d2a3
...
...
@@ -101,7 +101,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mp_image_t
*
dmpi
;
// hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
IMGFMT_YV12
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
IMGFMT_YV12
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
((
vf
->
priv
->
scaleh
==
1
)
?
MP_IMGFLAG_READABLE
:
0
),
mpi
->
w
*
vf
->
priv
->
scalew
,
...
...
@@ -110,7 +110,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
toright
(
dmpi
->
planes
,
mpi
->
planes
,
dmpi
->
stride
,
mpi
->
stride
,
mpi
->
w
,
mpi
->
h
,
vf
->
priv
);
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
int
config
(
struct
vf_instance
*
vf
,
...
...
@@ -118,7 +118,7 @@ static int config(struct vf_instance *vf,
unsigned
int
flags
,
unsigned
int
outfmt
)
{
/* FIXME - also support UYVY output? */
return
vf_next_config
(
vf
,
width
*
vf
->
priv
->
scalew
,
return
ff_
vf_next_config
(
vf
,
width
*
vf
->
priv
->
scalew
,
height
/
vf
->
priv
->
scaleh
-
vf
->
priv
->
skipline
,
d_width
,
d_height
,
flags
,
IMGFMT_YV12
);
}
...
...
@@ -130,7 +130,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_YV12
:
case
IMGFMT_IYUV
:
case
IMGFMT_I420
:
return
vf_next_query_format
(
vf
,
IMGFMT_YV12
);
return
ff_
vf_next_query_format
(
vf
,
IMGFMT_YV12
);
}
return
0
;
}
...
...
@@ -156,7 +156,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_down3dright
=
{
const
vf_info_t
ff_
vf_info_down3dright
=
{
"convert stereo movie from top-bottom to left-right field"
,
"down3dright"
,
"Zdenek Kabelac"
,
...
...
libavfilter/libmpcodecs/vf_dsize.c
View file @
de42d2a3
...
...
@@ -71,7 +71,7 @@ static int config(struct vf_instance *vf,
d_width
=
width
;
}
}
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
uninit
(
vf_instance_t
*
vf
)
{
...
...
@@ -82,7 +82,7 @@ static void uninit(vf_instance_t *vf) {
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
)
{
vf
->
config
=
config
;
vf
->
draw_slice
=
vf_next_draw_slice
;
vf
->
draw_slice
=
ff_
vf_next_draw_slice
;
vf
->
uninit
=
uninit
;
//vf->default_caps = 0;
vf
->
priv
=
calloc
(
sizeof
(
struct
vf_priv_s
),
1
);
...
...
@@ -106,14 +106,14 @@ static int vf_open(vf_instance_t *vf, char *args)
((
vf
->
priv
->
w
<
-
1
)
&&
(
vf
->
priv
->
h
<
-
1
))
||
(
vf
->
priv
->
method
<
-
1
)
||
(
vf
->
priv
->
method
>
3
)
||
(
vf
->
priv
->
round
<
0
))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"[dsize] Illegal value(s): aspect: %f w: %d h: %d aspect_method: %d round: %d
\n
"
,
vf
->
priv
->
aspect
,
vf
->
priv
->
w
,
vf
->
priv
->
h
,
vf
->
priv
->
method
,
vf
->
priv
->
round
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"[dsize] Illegal value(s): aspect: %f w: %d h: %d aspect_method: %d round: %d
\n
"
,
vf
->
priv
->
aspect
,
vf
->
priv
->
w
,
vf
->
priv
->
h
,
vf
->
priv
->
method
,
vf
->
priv
->
round
);
free
(
vf
->
priv
);
vf
->
priv
=
NULL
;
return
-
1
;
}
return
1
;
}
const
vf_info_t
vf_info_dsize
=
{
const
vf_info_t
ff_
vf_info_dsize
=
{
"reset displaysize/aspect"
,
"dsize"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_eq.c
View file @
de42d2a3
...
...
@@ -129,7 +129,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
mp_image_t
*
dmpi
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
0
,
mpi
->
w
,
mpi
->
h
);
...
...
@@ -151,7 +151,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
vf
->
priv
->
contrast
);
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
int
control
(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
)
...
...
@@ -182,7 +182,7 @@ static int control(struct vf_instance *vf, int request, void* data)
}
break
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
int
query_format
(
struct
vf_instance
*
vf
,
unsigned
int
fmt
)
...
...
@@ -201,7 +201,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -225,13 +225,13 @@ static int vf_open(vf_instance_t *vf, char *args)
process
=
process_C
;
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
process
=
process_MMX
;
if
(
ff_
gCpuCaps
.
hasMMX
)
process
=
process_MMX
;
#endif
return
1
;
}
const
vf_info_t
vf_info_eq
=
{
const
vf_info_t
ff_
vf_info_eq
=
{
"soft video equalizer"
,
"eq"
,
"Richard Felker"
,
...
...
libavfilter/libmpcodecs/vf_eq2.c
View file @
de42d2a3
...
...
@@ -262,7 +262,7 @@ int put_image (vf_instance_t *vf, mp_image_t *src, double pts)
eq2
->
buf
[
0
]
=
realloc
(
eq2
->
buf
[
0
],
img_n
);
}
dst
=
vf_get_image
(
vf
->
next
,
src
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
0
,
src
->
w
,
src
->
h
);
dst
=
ff_
vf_get_image
(
vf
->
next
,
src
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
0
,
src
->
w
,
src
->
h
);
for
(
i
=
0
;
i
<
((
src
->
num_planes
>
1
)
?
3
:
1
);
i
++
)
{
if
(
eq2
->
param
[
i
].
adjust
!=
NULL
)
{
...
...
@@ -278,7 +278,7 @@ int put_image (vf_instance_t *vf, mp_image_t *src, double pts)
}
}
return
vf_next_put_image
(
vf
,
dst
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dst
,
pts
);
}
static
...
...
@@ -290,7 +290,7 @@ void check_values (eq2_param_t *par)
par
->
adjust
=
NULL
;
}
#if HAVE_MMX
else
if
(
par
->
g
==
1
.
0
&&
gCpuCaps
.
hasMMX
)
{
else
if
(
par
->
g
==
1
.
0
&&
ff_
gCpuCaps
.
hasMMX
)
{
par
->
adjust
=
&
affine_1d_MMX
;
}
#endif
...
...
@@ -302,7 +302,7 @@ void check_values (eq2_param_t *par)
static
void
print_values
(
vf_eq2_t
*
eq2
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"vf_eq2: c=%.2f b=%.2f g=%.4f s=%.2f
\n
"
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"vf_eq2: c=%.2f b=%.2f g=%.4f s=%.2f
\n
"
,
eq2
->
contrast
,
eq2
->
brightness
,
eq2
->
gamma
,
eq2
->
saturation
);
}
...
...
@@ -413,7 +413,7 @@ int control (vf_instance_t *vf, int request, void *data)
break
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
...
...
@@ -430,7 +430,7 @@ int query_format (vf_instance_t *vf, unsigned fmt)
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
...
...
@@ -509,7 +509,7 @@ int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_eq2
=
{
const
vf_info_t
ff_
vf_info_eq2
=
{
"Software equalizer"
,
"eq2"
,
"Hampa Hug, Daniel Moreno, Richard Felker"
,
...
...
libavfilter/libmpcodecs/vf_fil.c
View file @
de42d2a3
...
...
@@ -59,17 +59,17 @@ static int config(struct vf_instance *vf,
}
//printf("hX %d %d %d\n", vf->priv->width,vf->priv->height,vf->priv->stridefactor);
return
vf_next_config
(
vf
,
vf
->
priv
->
width
,
vf
->
priv
->
height
,
return
ff_
vf_next_config
(
vf
,
vf
->
priv
->
width
,
vf
->
priv
->
height
,
(
d_width
*
vf
->
priv
->
stridefactor
)
>>
1
,
2
*
d_height
/
vf
->
priv
->
stridefactor
,
flags
,
outfmt
);
}
static
int
put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
){
if
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
){
// we've used DR, so we're ready...
return
vf_next_put_image
(
vf
,(
mp_image_t
*
)
mpi
->
priv
,
pts
);
return
ff_
vf_next_put_image
(
vf
,(
mp_image_t
*
)
mpi
->
priv
,
pts
);
}
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
MP_IMGFLAG_ACCEPT_STRIDE
,
vf
->
priv
->
width
,
vf
->
priv
->
height
);
...
...
@@ -84,7 +84,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
}
else
vf
->
dmpi
->
planes
[
1
]
=
mpi
->
planes
[
1
];
// passthru bgr8 palette!!!
return
vf_next_put_image
(
vf
,
vf
->
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
vf
->
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -104,7 +104,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_fil
=
{
const
vf_info_t
ff_
vf_info_fil
=
{
"fast (de)interleaver"
,
"fil"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_filmdint.c
View file @
de42d2a3
...
...
@@ -450,7 +450,7 @@ block_metrics_3dnow(unsigned char *a, unsigned char *b, int as, int bs,
{
struct
metrics
tm
;
#if !HAVE_AMD3DNOW
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"block_metrics_3dnow: internal error
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"block_metrics_3dnow: internal error
\n
"
);
#else
static
const
unsigned
long
long
ones
=
0x0101010101010101ull
;
...
...
@@ -479,7 +479,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
{
struct
metrics
tm
;
#if !HAVE_MMX
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"block_metrics_mmx2: internal error
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"block_metrics_mmx2: internal error
\n
"
);
#else
static
const
unsigned
long
long
ones
=
0x0101010101010101ull
;
x86_reg
interlaced
;
...
...
@@ -587,10 +587,10 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
b
-=
7
*
bs
;
cm
=
block_metrics_c
(
a
,
b
,
as
,
bs
,
4
,
p
,
&
ts
);
if
(
!
MEQ
(
tm
,
cm
))
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"Bad metrics
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"Bad metrics
\n
"
);
if
(
s
)
{
# define CHECK(X) if (!MEQ(s->X, ts.X)) \
mp_msg(MSGT_VFILTER, MSGL_WARN, "Bad " #X "\n");
ff_
mp_msg(MSGT_VFILTER, MSGL_WARN, "Bad " #X "\n");
CHECK
(
tiny
);
CHECK
(
low
);
CHECK
(
high
);
...
...
@@ -608,7 +608,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
long
cos
,
int
ds
,
int
ss
,
int
w
,
int
t
)
{
#if !HAVE_MMX
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"dint_copy_line_mmx2: internal error
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"dint_copy_line_mmx2: internal error
\n
"
);
return
0
;
#else
unsigned
long
len
=
(
w
+
7
)
>>
3
;
...
...
@@ -770,7 +770,7 @@ copy_merge_fields(struct vf_priv_s *p, mp_image_t *dmpi,
p
->
chroma_stride
,
threshold
,
field
,
p
->
mmx2
);
}
if
(
dint_pixels
>
0
&&
p
->
verbose
)
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"Deinterlaced %lu pixels
\n
"
,
dint_pixels
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"Deinterlaced %lu pixels
\n
"
,
dint_pixels
);
}
static
void
diff_planes
(
struct
vf_priv_s
*
p
,
struct
frame_stats
*
s
,
...
...
@@ -826,7 +826,7 @@ static void diff_fields(struct vf_priv_s *p, struct frame_stats *s,
s
->
sad
.
noise
=
(
s
->
sad
.
noise
*
16ul
)
/
s
->
num_blocks
;
s
->
sad
.
temp
=
(
s
->
sad
.
temp
*
16ul
)
/
s
->
num_blocks
;
if
(
p
->
verbose
)
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%lu%c M:%d/%d/%d/%d - %d, "
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%lu%c M:%d/%d/%d/%d - %d, "
"t:%d/%d/%d/%d, l:%d/%d/%d/%d, h:%d/%d/%d/%d, bg:%d/%d/%d/%d, "
"2x:%d/%d/%d/%d, sad:%d/%d/%d/%d, lil:%d, hil:%d, ios:%.1f
\n
"
,
p
->
inframes
,
p
->
chflag
,
METRICS
(
s
->
max
),
s
->
num_blocks
,
...
...
@@ -995,7 +995,7 @@ find_breaks(struct vf_priv_s *p, struct frame_stats *s)
unsigned
long
ret
=
8
;
if
(
cmpe
(
s
->
sad
.
temp
,
s
->
sad
.
even
,
512
,
1
)
>
0
)
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"@@@@@@@@ Bottom-first field??? @@@@@@@@
\n
"
);
if
(
s
->
sad
.
temp
>
1000
&&
s
->
sad
.
noise
>
1000
)
return
3
;
...
...
@@ -1294,7 +1294,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
(
ps
->
low
.
noise
+
ps
->
interlaced_low
<
(
s
->
num_blocks
>>
8
)
||
ps
->
sad
.
noise
<
160
)))
{
p
->
export_count
++
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
MP_IMGFLAG_PRESERVE
|
MP_IMGFLAG_READABLE
,
p
->
w
,
p
->
h
);
if
((
show_fields
&
3
)
!=
3
)
planes
=
old_planes
;
...
...
@@ -1309,7 +1309,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
}
}
else
{
p
->
merge_count
++
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
p
->
w
,
p
->
h
);
copy_merge_fields
(
p
,
dmpi
,
old_planes
,
planes
,
show_fields
);
...
...
@@ -1319,7 +1319,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
p
->
notout
+=
2
;
if
(
p
->
verbose
)
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%lu %lu: %x %c %c %lu%s%s%c%s
\n
"
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%lu %lu: %x %c %c %lu%s%s%c%s
\n
"
,
p
->
inframes
,
p
->
outframes
,
breaks
,
breaks
<
8
&&
breaks
>
0
?
(
int
)
p
->
prev_fields
+
'0'
:
' '
,
ITOC
(
show_fields
),
...
...
@@ -1331,7 +1331,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
""
:
" @@@@@@@@@@@@@@@@@"
);
p
->
merge_time
+=
get_time
()
-
diff_time
;
return
show_fields
?
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
)
:
0
;
return
show_fields
?
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
)
:
0
;
}
static
int
query_format
(
struct
vf_instance
*
vf
,
unsigned
int
fmt
)
...
...
@@ -1344,7 +1344,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_411P
:
case
IMGFMT_422P
:
case
IMGFMT_444P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -1391,13 +1391,13 @@ static int config(struct vf_instance *vf,
d_width
=
d_width
*
p
->
w
/
width
;
d_height
=
d_height
*
p
->
h
/
height
;
}
return
vf_next_config
(
vf
,
p
->
w
,
p
->
h
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
p
->
w
,
p
->
h
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
{
struct
vf_priv_s
*
p
=
vf
->
priv
;
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"diff_time: %.3f, merge_time: %.3f, "
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"diff_time: %.3f, merge_time: %.3f, "
"export: %lu, merge: %lu, copy: %lu
\n
"
,
p
->
diff_time
,
p
->
merge_time
,
p
->
export_count
,
p
->
merge_count
,
p
->
num_copies
);
free
(
p
->
memory_allocated
);
...
...
@@ -1422,16 +1422,16 @@ static int vf_open(vf_instance_t *vf, char *args)
p
->
dint_thres
=
4
;
p
->
luma_only
=
0
;
p
->
fast
=
3
;
p
->
mmx2
=
gCpuCaps
.
hasMMX2
?
1
:
gCpuCaps
.
has3DNow
?
2
:
0
;
p
->
mmx2
=
ff_gCpuCaps
.
hasMMX2
?
1
:
ff_
gCpuCaps
.
has3DNow
?
2
:
0
;
if
(
args
)
{
const
char
*
args_remain
=
parse_args
(
p
,
args
);
if
(
args_remain
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"filmdint: unknown suboption: %s
\n
"
,
args_remain
);
return
0
;
}
if
(
p
->
out_dec
<
p
->
in_inc
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_FATAL
,
"filmdint: increasing the frame rate is not supported
\n
"
);
return
0
;
}
...
...
@@ -1451,7 +1451,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_filmdint
=
{
const
vf_info_t
ff_
vf_info_filmdint
=
{
"Advanced inverse telecine filer"
,
"filmdint"
,
"Zoltan Hidvegi"
,
...
...
libavfilter/libmpcodecs/vf_fspp.c
View file @
de42d2a3
...
...
@@ -497,14 +497,14 @@ static int config(struct vf_instance *vf,
//this can also be avoided, see above
vf
->
priv
->
src
=
(
uint8_t
*
)
av_malloc
(
vf
->
priv
->
temp_stride
*
h
*
sizeof
(
uint8_t
));
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
)
{
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -523,11 +523,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mp_image_t
*
dmpi
;
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
}
else
{
dmpi
=
vf
->
dmpi
;
}
...
...
@@ -564,12 +564,12 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
}
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
#endif
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
...
...
@@ -605,7 +605,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -620,7 +620,7 @@ static int control(struct vf_instance *vf, int request, void* data)
if
(
vf
->
priv
->
log2_count
<
4
)
vf
->
priv
->
log2_count
=
4
;
return
CONTROL_TRUE
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
)
...
...
@@ -637,7 +637,7 @@ static int vf_open(vf_instance_t *vf, char *args)
vf
->
control
=
control
;
vf
->
priv
=
av_mallocz
(
sizeof
(
struct
vf_priv_s
));
//assumes align 16 !
init_avcodec
();
ff_
init_avcodec
();
//vf->priv->avctx= avcodec_alloc_context();
//dsputil_init(&vf->priv->dsp, vf->priv->avctx);
...
...
@@ -679,7 +679,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_fspp
=
{
const
vf_info_t
ff_
vf_info_fspp
=
{
"fast simple postprocess"
,
"fspp"
,
"Michael Niedermayer, Nikolaj Poroshin"
,
...
...
libavfilter/libmpcodecs/vf_harddup.c
View file @
de42d2a3
...
...
@@ -37,7 +37,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
vf
->
priv
->
last_mpi
=
mpi
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
0
,
mpi
->
width
,
mpi
->
height
);
dmpi
->
planes
[
0
]
=
mpi
->
planes
[
0
];
...
...
@@ -49,7 +49,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
dmpi
->
stride
[
2
]
=
mpi
->
stride
[
2
];
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
int
control
(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
)
...
...
@@ -65,7 +65,7 @@ static int control(struct vf_instance *vf, int request, void* data)
return
CONTROL_TRUE
;
break
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
...
...
@@ -82,7 +82,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_harddup
=
{
const
vf_info_t
ff_
vf_info_harddup
=
{
"resubmit duplicate frames for encoding"
,
"harddup"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_il.c
View file @
de42d2a3
...
...
@@ -78,7 +78,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
FilterParam
*
luma
=
&
vf
->
priv
->
lumaParam
;
FilterParam
*
chroma
=
&
vf
->
priv
->
chromaParam
;
mp_image_t
*
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mp_image_t
*
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
...
...
@@ -100,7 +100,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
],
chroma
->
interleave
,
luma
->
swap
);
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -136,7 +136,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_il
=
{
const
vf_info_t
ff_
vf_info_il
=
{
"(de)interleave"
,
"il"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_ilpack.c
View file @
de42d2a3
...
...
@@ -377,13 +377,13 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mp_image_t
*
dmpi
;
// hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
IMGFMT_YUY2
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
IMGFMT_YUY2
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
ilpack
(
dmpi
->
planes
[
0
],
mpi
->
planes
,
dmpi
->
stride
[
0
],
mpi
->
stride
,
mpi
->
w
,
mpi
->
h
,
vf
->
priv
->
pack
);
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
int
config
(
struct
vf_instance
*
vf
,
...
...
@@ -391,7 +391,7 @@ static int config(struct vf_instance *vf,
unsigned
int
flags
,
unsigned
int
outfmt
)
{
/* FIXME - also support UYVY output? */
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
IMGFMT_YUY2
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
IMGFMT_YUY2
);
}
...
...
@@ -402,7 +402,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_YV12
:
case
IMGFMT_IYUV
:
case
IMGFMT_I420
:
return
vf_next_query_format
(
vf
,
IMGFMT_YUY2
);
return
ff_
vf_next_query_format
(
vf
,
IMGFMT_YUY2
);
}
return
0
;
}
...
...
@@ -420,7 +420,7 @@ static int vf_open(vf_instance_t *vf, char *args)
pack_li_0
=
pack_li_0_C
;
pack_li_1
=
pack_li_1_C
;
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
{
if
(
ff_
gCpuCaps
.
hasMMX
)
{
pack_nn
=
pack_nn_MMX
;
#if HAVE_EBX_AVAILABLE
pack_li_0
=
pack_li_0_MMX
;
...
...
@@ -434,7 +434,7 @@ static int vf_open(vf_instance_t *vf, char *args)
vf
->
priv
->
pack
[
0
]
=
vf
->
priv
->
pack
[
1
]
=
pack_nn
;
break
;
default:
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"ilpack: unknown mode %d (fallback to linear)
\n
"
,
vf
->
priv
->
mode
);
/* Fallthrough */
...
...
@@ -447,7 +447,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_ilpack
=
{
const
vf_info_t
ff_
vf_info_ilpack
=
{
"4:2:0 planar -> 4:2:2 packed reinterlacer"
,
"ilpack"
,
"Richard Felker"
,
...
...
libavfilter/libmpcodecs/vf_ivtc.c
View file @
de42d2a3
...
...
@@ -329,7 +329,7 @@ static void diff_fields(struct frameinfo *fi, mp_image_t *old, mp_image_t *new)
static
void
stats
(
struct
frameinfo
*
f
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
" pd=%d re=%d ro=%d rp=%d rt=%d rs=%d rd=%d pp=%d pt=%d ps=%d
\r
"
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
" pd=%d re=%d ro=%d rp=%d rt=%d rs=%d rd=%d pp=%d pt=%d ps=%d
\r
"
,
f
->
p
.
d
,
f
->
r
.
e
,
f
->
r
.
o
,
f
->
r
.
p
,
f
->
r
.
t
,
f
->
r
.
s
,
f
->
r
.
d
,
f
->
p
.
p
,
f
->
p
.
t
,
f
->
p
.
s
);
}
...
...
@@ -444,15 +444,15 @@ static int do_put_image(struct vf_instance *vf, mp_image_t *dmpi)
}
if
(
dropflag
)
{
//mp_msg(MSGT_VFILTER, MSGL_V, "drop! [%d/%d=%g]\n",
//
ff_
mp_msg(MSGT_VFILTER, MSGL_V, "drop! [%d/%d=%g]\n",
// p->outframes, p->inframes, (float)p->outframes/p->inframes);
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"!"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"!"
);
p
->
lastdrop
=
0
;
return
0
;
}
p
->
outframes
++
;
return
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
static
int
put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
)
...
...
@@ -467,7 +467,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
return
1
;
}
if
(
!
p
->
dmpi
)
p
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
if
(
!
p
->
dmpi
)
p
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
...
...
@@ -481,25 +481,25 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
copy_image
(
p
->
dmpi
,
mpi
,
2
);
ret
=
0
;
p
->
lastdrop
=
0
;
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"DROP
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"DROP
\n
"
);
break
;
case
F_MERGE
:
copy_image
(
p
->
dmpi
,
mpi
,
0
);
ret
=
do_put_image
(
vf
,
p
->
dmpi
);
copy_image
(
p
->
dmpi
,
mpi
,
1
);
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"MERGE
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"MERGE
\n
"
);
p
->
dmpi
=
NULL
;
break
;
case
F_NEXT
:
copy_image
(
p
->
dmpi
,
mpi
,
2
);
ret
=
do_put_image
(
vf
,
p
->
dmpi
);
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"NEXT
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"NEXT
\n
"
);
p
->
dmpi
=
NULL
;
break
;
case
F_SHOW
:
ret
=
do_put_image
(
vf
,
p
->
dmpi
);
copy_image
(
p
->
dmpi
,
mpi
,
2
);
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"OK
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_V
,
"OK
\n
"
);
p
->
dmpi
=
NULL
;
break
;
}
...
...
@@ -512,7 +512,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_YV12
:
case
IMGFMT_IYUV
:
case
IMGFMT_I420
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -535,12 +535,12 @@ static int vf_open(vf_instance_t *vf, char *args)
if
(
args
)
sscanf
(
args
,
"%d"
,
&
p
->
drop
);
block_diffs
=
block_diffs_C
;
#if HAVE_MMX && HAVE_EBX_AVAILABLE
if
(
gCpuCaps
.
hasMMX
)
block_diffs
=
block_diffs_MMX
;
if
(
ff_
gCpuCaps
.
hasMMX
)
block_diffs
=
block_diffs_MMX
;
#endif
return
1
;
}
const
vf_info_t
vf_info_ivtc
=
{
const
vf_info_t
ff_
vf_info_ivtc
=
{
"inverse telecine, take 2"
,
"ivtc"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_kerndeint.c
View file @
de42d2a3
...
...
@@ -51,7 +51,7 @@ static int config(struct vf_instance *vf,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
){
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
...
...
@@ -98,12 +98,12 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
mp_image_t
*
dmpi
,
*
pmpi
;
if
(
!
vf
->
priv
->
do_deinterlace
)
return
vf_next_put_image
(
vf
,
mpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
mpi
,
pts
);
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_IP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
pmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
pmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
if
(
!
dmpi
)
return
0
;
...
...
@@ -273,7 +273,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
}
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -284,7 +284,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_YV12
:
case
IMGFMT_RGB
:
case
IMGFMT_YUY2
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -299,7 +299,7 @@ static int control(struct vf_instance *vf, int request, void* data){
vf
->
priv
->
do_deinterlace
=
*
(
int
*
)
data
;
return
CONTROL_OK
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
...
...
@@ -333,7 +333,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_kerndeint
=
{
const
vf_info_t
ff_
vf_info_kerndeint
=
{
"Kernel Deinterlacer"
,
"kerndeint"
,
"Donald Graft"
,
...
...
libavfilter/libmpcodecs/vf_mcdeint.c
View file @
de42d2a3
...
...
@@ -232,14 +232,14 @@ static int config(struct vf_instance *vf,
vf
->
priv
->
outbuf_size
=
width
*
height
*
10
;
vf
->
priv
->
outbuf
=
malloc
(
vf
->
priv
->
outbuf_size
);
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
return
;
//caused problems, dunno why
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -258,18 +258,18 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
}
else
{
dmpi
=
vf
->
dmpi
;
}
filter
(
vf
->
priv
,
dmpi
->
planes
,
mpi
->
planes
,
dmpi
->
stride
,
mpi
->
stride
,
mpi
->
w
,
mpi
->
h
);
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -301,7 +301,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_IYUV
:
case
IMGFMT_Y800
:
case
IMGFMT_Y8
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -316,7 +316,7 @@ static int vf_open(vf_instance_t *vf, char *args){
vf
->
priv
=
malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
init_avcodec
();
ff_
init_avcodec
();
vf
->
priv
->
mode
=
0
;
vf
->
priv
->
parity
=
-
1
;
...
...
@@ -327,7 +327,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_mcdeint
=
{
const
vf_info_t
ff_
vf_info_mcdeint
=
{
"motion compensating deinterlacer"
,
"mcdeint"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_noise.c
View file @
de42d2a3
...
...
@@ -317,14 +317,14 @@ static int config(struct vf_instance *vf,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
){
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
if
(
mpi
->
imgfmt
!=
vf
->
priv
->
outfmt
)
return
;
// colorspace differ
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
,
mpi
->
w
,
mpi
->
h
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -343,7 +343,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
vf
->
priv
->
outfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
vf
->
priv
->
outfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
//printf("nodr\n");
...
...
@@ -355,16 +355,16 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
noise
(
dmpi
->
planes
[
1
],
mpi
->
planes
[
1
],
dmpi
->
stride
[
1
],
mpi
->
stride
[
1
],
mpi
->
w
/
2
,
mpi
->
h
/
2
,
&
vf
->
priv
->
chromaParam
);
noise
(
dmpi
->
planes
[
2
],
mpi
->
planes
[
2
],
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
],
mpi
->
w
/
2
,
mpi
->
h
/
2
,
&
vf
->
priv
->
chromaParam
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
#endif
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -388,7 +388,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_YV12
:
case
IMGFMT_I420
:
case
IMGFMT_IYUV
:
return
vf_next_query_format
(
vf
,
vf
->
priv
->
outfmt
);
return
ff_
vf_next_query_format
(
vf
,
vf
->
priv
->
outfmt
);
}
return
0
;
}
...
...
@@ -440,7 +440,7 @@ static int vf_open(vf_instance_t *vf, char *args){
}
// check csp:
vf
->
priv
->
outfmt
=
vf_match_csp
(
&
vf
->
next
,
fmt_list
,
IMGFMT_YV12
);
vf
->
priv
->
outfmt
=
ff_
vf_match_csp
(
&
vf
->
next
,
fmt_list
,
IMGFMT_YV12
);
if
(
!
vf
->
priv
->
outfmt
)
{
uninit
(
vf
);
...
...
@@ -449,20 +449,20 @@ static int vf_open(vf_instance_t *vf, char *args){
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
){
if
(
ff_
gCpuCaps
.
hasMMX
){
lineNoise
=
lineNoise_MMX
;
lineNoiseAvg
=
lineNoiseAvg_MMX
;
}
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
lineNoise
=
lineNoise_MMX2
;
// if(gCpuCaps.hasMMX) lineNoiseAvg= lineNoiseAvg_MMX2;
if
(
ff_
gCpuCaps
.
hasMMX2
)
lineNoise
=
lineNoise_MMX2
;
// if(
ff_
gCpuCaps.hasMMX) lineNoiseAvg= lineNoiseAvg_MMX2;
#endif
return
1
;
}
const
vf_info_t
vf_info_noise
=
{
const
vf_info_t
ff_
vf_info_noise
=
{
"noise generator"
,
"noise"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_ow.c
View file @
de42d2a3
...
...
@@ -213,13 +213,13 @@ static int config(struct vf_instance *vf, int width, int height, int d_width, in
vf
->
priv
->
plane
[
i
][
j
]
=
malloc
(
vf
->
priv
->
stride
*
h
*
sizeof
(
vf
->
priv
->
plane
[
0
][
0
][
0
]));
}
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -238,11 +238,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
}
else
{
dmpi
=
vf
->
dmpi
;
}
...
...
@@ -251,7 +251,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
filter
(
vf
->
priv
,
dmpi
->
planes
[
1
],
mpi
->
planes
[
1
],
dmpi
->
stride
[
1
],
mpi
->
stride
[
1
],
mpi
->
w
>>
mpi
->
chroma_x_shift
,
mpi
->
h
>>
mpi
->
chroma_y_shift
,
0
);
filter
(
vf
->
priv
,
dmpi
->
planes
[
2
],
mpi
->
planes
[
2
],
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
],
mpi
->
w
>>
mpi
->
chroma_x_shift
,
mpi
->
h
>>
mpi
->
chroma_y_shift
,
0
);
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -283,7 +283,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -312,7 +312,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_ow
=
{
const
vf_info_t
ff_
vf_info_ow
=
{
"overcomplete wavelet denoiser"
,
"ow"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_perspective.c
View file @
de42d2a3
...
...
@@ -128,7 +128,7 @@ static int config(struct vf_instance *vf,
vf
->
priv
->
coeff
[
i
][
j
]
=
(
int
)
floor
((
1
<<
COEFF_BITS
)
*
temp
[
j
]
/
sum
+
0
.
5
);
}
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -264,7 +264,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
int
cw
=
mpi
->
w
>>
mpi
->
chroma_x_shift
;
int
ch
=
mpi
->
h
>>
mpi
->
chroma_y_shift
;
mp_image_t
*
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mp_image_t
*
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
...
...
@@ -286,7 +286,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
vf
->
priv
,
mpi
->
chroma_x_shift
,
mpi
->
chroma_y_shift
);
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -301,7 +301,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -333,7 +333,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_perspective
=
{
const
vf_info_t
ff_
vf_info_perspective
=
{
"perspective correcture"
,
"perspective"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_phase.c
View file @
de42d2a3
...
...
@@ -184,13 +184,13 @@ static enum mode analyze_plane(unsigned char *old, unsigned char *new,
mode
=
PROGRESSIVE
;
}
if
(
mp_msg_test
(
MSGT_VFILTER
,
MSGL_V
)
)
if
(
ff_
mp_msg_test
(
MSGT_VFILTER
,
MSGL_V
)
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%c"
,
mode
==
BOTTOM_FIRST
?
'b'
:
mode
==
TOP_FIRST
?
't'
:
'p'
);
if
(
tdiff
==
65536
.
0
)
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" N/A "
);
else
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" %8.2f"
,
tdiff
);
if
(
bdiff
==
65536
.
0
)
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" N/A "
);
else
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" %8.2f"
,
bdiff
);
if
(
pdiff
==
65536
.
0
)
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" N/A "
);
else
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" %8.2f"
,
pdiff
);
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"%c"
,
mode
==
BOTTOM_FIRST
?
'b'
:
mode
==
TOP_FIRST
?
't'
:
'p'
);
if
(
tdiff
==
65536
.
0
)
ff_mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" N/A "
);
else
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" %8.2f"
,
tdiff
);
if
(
bdiff
==
65536
.
0
)
ff_mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" N/A "
);
else
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" %8.2f"
,
bdiff
);
if
(
pdiff
==
65536
.
0
)
ff_mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" N/A "
);
else
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
" %8.2f"
,
pdiff
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"
\n
"
);
}
return
mode
;
...
...
@@ -202,7 +202,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
int
w
;
enum
mode
mode
;
if
(
!
(
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
if
(
!
(
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
)))
return
0
;
...
...
@@ -237,7 +237,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
&
vf
->
priv
->
buf
[
2
],
mode
);
}
return
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
...
...
@@ -292,7 +292,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_phase
=
const
vf_info_t
ff_
vf_info_phase
=
{
"phase shift fields"
,
"phase"
,
...
...
libavfilter/libmpcodecs/vf_pp.c
View file @
de42d2a3
...
...
@@ -66,7 +66,7 @@ static int config(struct vf_instance *vf,
if
(
vf
->
priv
->
context
)
pp_free_context
(
vf
->
priv
->
context
);
vf
->
priv
->
context
=
pp_get_context
(
width
,
height
,
flags
);
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
voflags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
voflags
,
outfmt
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -87,7 +87,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -100,7 +100,7 @@ static int control(struct vf_instance *vf, int request, void* data){
vf
->
priv
->
pp
=
*
((
unsigned
int
*
)
data
);
return
CONTROL_TRUE
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
...
...
@@ -110,7 +110,7 @@ static void get_image(struct vf_instance *vf, mp_image_t *mpi){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_ACCEPT_STRIDE
)
&&
mpi
->
imgfmt
!=
vf
->
priv
->
outfmt
)
return
;
// colorspace differ
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -127,7 +127,7 @@ static void get_image(struct vf_instance *vf, mp_image_t *mpi){
static
int
put_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
,
double
pts
){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
|
MP_IMGFLAG_READABLE
,
// MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
...
...
@@ -149,7 +149,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
mpi
->
pict_type
);
#endif
}
return
vf_next_put_image
(
vf
,
vf
->
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
vf
->
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -180,7 +180,7 @@ static int vf_open(vf_instance_t *vf, char *args){
vf
->
priv
->
context
=
NULL
;
// check csp:
vf
->
priv
->
outfmt
=
vf_match_csp
(
&
vf
->
next
,
fmt_list
,
IMGFMT_YV12
);
vf
->
priv
->
outfmt
=
ff_
vf_match_csp
(
&
vf
->
next
,
fmt_list
,
IMGFMT_YV12
);
if
(
!
vf
->
priv
->
outfmt
)
return
0
;
// no csp match :(
if
(
args
&&
*
args
){
...
...
@@ -227,7 +227,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_pp
=
{
const
vf_info_t
ff_
vf_info_pp
=
{
"postprocessing"
,
"pp"
,
"A'rpi"
,
...
...
libavfilter/libmpcodecs/vf_pp7.c
View file @
de42d2a3
...
...
@@ -354,13 +354,13 @@ static int config(struct vf_instance *vf,
vf
->
priv
->
temp_stride
=
(
width
+
16
+
15
)
&
(
~
15
);
vf
->
priv
->
src
=
av_malloc
(
vf
->
priv
->
temp_stride
*
(
h
+
8
)
*
sizeof
(
uint8_t
));
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -381,11 +381,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
dmpi
=
vf
->
dmpi
;
}
else
{
// no DR, so get a new image! hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
}
vf
->
priv
->
mpeg2
=
mpi
->
qscale_type
;
...
...
@@ -400,13 +400,13 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
}
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
#endif
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -433,13 +433,13 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
static
int
control
(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
){
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
...
...
@@ -467,12 +467,12 @@ static int vf_open(vf_instance_t *vf, char *args){
}
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
){
if
(
ff_
gCpuCaps
.
hasMMX
){
dctB
=
dctB_mmx
;
}
#endif
#if 0
if(gCpuCaps.hasMMX){
if(
ff_
gCpuCaps.hasMMX){
switch(vf->priv->mode){
case 0: requantize= hardthresh_mmx; break;
case 1: requantize= softthresh_mmx; break;
...
...
@@ -483,7 +483,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_pp7
=
{
const
vf_info_t
ff_
vf_info_pp7
=
{
"postprocess 7"
,
"pp7"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_pullup.c
View file @
de42d2a3
...
...
@@ -49,7 +49,7 @@ static void init_pullup(struct vf_instance *vf, mp_image_t *mpi)
if
(
mpi
->
flags
&
MP_IMGFLAG_PLANAR
)
{
c
->
format
=
PULLUP_FMT_Y
;
c
->
nplanes
=
4
;
pullup_preinit_context
(
c
);
ff_
pullup_preinit_context
(
c
);
c
->
bpp
[
0
]
=
c
->
bpp
[
1
]
=
c
->
bpp
[
2
]
=
8
;
c
->
w
[
0
]
=
mpi
->
w
;
c
->
h
[
0
]
=
mpi
->
h
;
...
...
@@ -63,14 +63,14 @@ static void init_pullup(struct vf_instance *vf, mp_image_t *mpi)
c
->
background
[
1
]
=
c
->
background
[
2
]
=
128
;
}
if
(
gCpuCaps
.
hasMMX
)
c
->
cpu
|=
PULLUP_CPU_MMX
;
if
(
gCpuCaps
.
hasMMX2
)
c
->
cpu
|=
PULLUP_CPU_MMX2
;
if
(
gCpuCaps
.
has3DNow
)
c
->
cpu
|=
PULLUP_CPU_3DNOW
;
if
(
gCpuCaps
.
has3DNowExt
)
c
->
cpu
|=
PULLUP_CPU_3DNOWEXT
;
if
(
gCpuCaps
.
hasSSE
)
c
->
cpu
|=
PULLUP_CPU_SSE
;
if
(
gCpuCaps
.
hasSSE2
)
c
->
cpu
|=
PULLUP_CPU_SSE2
;
if
(
ff_
gCpuCaps
.
hasMMX
)
c
->
cpu
|=
PULLUP_CPU_MMX
;
if
(
ff_
gCpuCaps
.
hasMMX2
)
c
->
cpu
|=
PULLUP_CPU_MMX2
;
if
(
ff_
gCpuCaps
.
has3DNow
)
c
->
cpu
|=
PULLUP_CPU_3DNOW
;
if
(
ff_
gCpuCaps
.
has3DNowExt
)
c
->
cpu
|=
PULLUP_CPU_3DNOWEXT
;
if
(
ff_
gCpuCaps
.
hasSSE
)
c
->
cpu
|=
PULLUP_CPU_SSE
;
if
(
ff_
gCpuCaps
.
hasSSE2
)
c
->
cpu
|=
PULLUP_CPU_SSE2
;
pullup_init_context
(
c
);
ff_
pullup_init_context
(
c
);
vf
->
priv
->
init
=
1
;
vf
->
priv
->
qbuf
=
malloc
(
c
->
w
[
3
]);
...
...
@@ -87,7 +87,7 @@ static void get_image(struct vf_instance *vf, mp_image_t *mpi)
if (!vf->priv->init) init_pullup(vf, mpi);
b = pullup_get_buffer(c, 2);
b =
ff_
pullup_get_buffer(c, 2);
if (!b) return; /* shouldn't happen... */
mpi->priv = b;
...
...
@@ -120,11 +120,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
b
=
mpi
->
priv
;
mpi
->
priv
=
0
;
}
else
{
b
=
pullup_get_buffer
(
c
,
2
);
b
=
ff_
pullup_get_buffer
(
c
,
2
);
if
(
!
b
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"Could not get buffer from pullup!
\n
"
);
f
=
pullup_get_frame
(
c
);
pullup_release_frame
(
f
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"Could not get buffer from pullup!
\n
"
);
f
=
ff_
pullup_get_frame
(
c
);
ff_
pullup_release_frame
(
f
);
return
0
;
}
memcpy_pic
(
b
->
planes
[
0
],
mpi
->
planes
[
0
],
mpi
->
w
,
mpi
->
h
,
...
...
@@ -145,31 +145,31 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
p
=
mpi
->
fields
&
MP_IMGFIELD_TOP_FIRST
?
0
:
(
mpi
->
fields
&
MP_IMGFIELD_ORDERED
?
1
:
0
);
pullup_submit_field
(
c
,
b
,
p
);
pullup_submit_field
(
c
,
b
,
p
^
1
);
ff_
pullup_submit_field
(
c
,
b
,
p
);
ff_
pullup_submit_field
(
c
,
b
,
p
^
1
);
if
(
mpi
->
fields
&
MP_IMGFIELD_REPEAT_FIRST
)
pullup_submit_field
(
c
,
b
,
p
);
ff_
pullup_submit_field
(
c
,
b
,
p
);
pullup_release_buffer
(
b
,
2
);
ff_
pullup_release_buffer
(
b
,
2
);
f
=
pullup_get_frame
(
c
);
f
=
ff_
pullup_get_frame
(
c
);
/* Fake yes for first few frames (buffer depth) to keep from
* breaking A/V sync with G1's bad architecture... */
if
(
!
f
)
return
vf
->
priv
->
fakecount
?
(
--
vf
->
priv
->
fakecount
,
1
)
:
0
;
if
(
f
->
length
<
2
)
{
pullup_release_frame
(
f
);
f
=
pullup_get_frame
(
c
);
ff_
pullup_release_frame
(
f
);
f
=
ff_
pullup_get_frame
(
c
);
if
(
!
f
)
return
0
;
if
(
f
->
length
<
2
)
{
pullup_release_frame
(
f
);
ff_
pullup_release_frame
(
f
);
if
(
!
(
mpi
->
fields
&
MP_IMGFIELD_REPEAT_FIRST
))
return
0
;
f
=
pullup_get_frame
(
c
);
f
=
ff_
pullup_get_frame
(
c
);
if
(
!
f
)
return
0
;
if
(
f
->
length
<
2
)
{
pullup_release_frame
(
f
);
ff_
pullup_release_frame
(
f
);
return
0
;
}
}
...
...
@@ -194,12 +194,12 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
/* If the frame isn't already exportable... */
while
(
!
f
->
buffer
)
{
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
width
,
mpi
->
height
);
/* FIXME: Is it ok to discard dmpi if it's not direct? */
if
(
!
(
dmpi
->
flags
&
MP_IMGFLAG_DIRECT
))
{
pullup_pack_frame
(
c
,
f
);
ff_
pullup_pack_frame
(
c
,
f
);
break
;
}
/* Direct render fields into output buffer */
...
...
@@ -224,15 +224,15 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mpi
->
chroma_width
,
mpi
->
chroma_height
/
2
,
dmpi
->
stride
[
2
]
*
2
,
c
->
stride
[
2
]
*
2
);
}
pullup_release_frame
(
f
);
ff_
pullup_release_frame
(
f
);
if
(
mpi
->
qscale
)
{
dmpi
->
qscale
=
vf
->
priv
->
qbuf
;
dmpi
->
qstride
=
mpi
->
qstride
;
dmpi
->
qscale_type
=
mpi
->
qscale_type
;
}
return
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
width
,
mpi
->
height
);
...
...
@@ -249,8 +249,8 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
dmpi
->
qstride
=
mpi
->
qstride
;
dmpi
->
qscale_type
=
mpi
->
qscale_type
;
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
pullup_release_frame
(
f
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ff_
pullup_release_frame
(
f
);
return
ret
;
}
...
...
@@ -261,7 +261,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_YV12
:
case
IMGFMT_IYUV
:
case
IMGFMT_I420
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -271,12 +271,12 @@ static int config(struct vf_instance *vf,
unsigned
int
flags
,
unsigned
int
outfmt
)
{
if
(
height
&
3
)
return
0
;
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
{
pullup_free_context
(
vf
->
priv
->
ctx
);
ff_
pullup_free_context
(
vf
->
priv
->
ctx
);
free
(
vf
->
priv
);
}
...
...
@@ -291,7 +291,7 @@ static int vf_open(vf_instance_t *vf, char *args)
vf
->
uninit
=
uninit
;
vf
->
default_reqs
=
VFCAP_ACCEPT_STRIDE
;
vf
->
priv
=
p
=
calloc
(
1
,
sizeof
(
struct
vf_priv_s
));
p
->
ctx
=
c
=
pullup_alloc_context
();
p
->
ctx
=
c
=
ff_
pullup_alloc_context
();
p
->
fakecount
=
1
;
c
->
junk_left
=
c
->
junk_right
=
1
;
c
->
junk_top
=
c
->
junk_bottom
=
4
;
...
...
@@ -303,7 +303,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_pullup
=
{
const
vf_info_t
ff_
vf_info_pullup
=
{
"pullup (from field sequence to frames)"
,
"pullup"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_qp.c
View file @
de42d2a3
...
...
@@ -72,19 +72,19 @@ static int config(struct vf_instance *vf,
res
=
av_expr_parse_and_eval
(
&
temp_val
,
vf
->
priv
->
eq
,
const_names
,
const_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
if
(
res
<
0
){
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"qp: Error evaluating
\"
%s
\"
\n
"
,
vf
->
priv
->
eq
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_ERR
,
"qp: Error evaluating
\"
%s
\"
\n
"
,
vf
->
priv
->
eq
);
return
0
;
}
vf
->
priv
->
lut
[
i
+
129
]
=
lrintf
(
temp_val
);
}
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
,
mpi
->
w
,
mpi
->
h
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -104,7 +104,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
w
,
mpi
->
h
);
}
...
...
@@ -118,7 +118,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
memcpy_pic
(
dmpi
->
planes
[
2
],
mpi
->
planes
[
2
],
mpi
->
w
>>
mpi
->
chroma_x_shift
,
mpi
->
h
>>
mpi
->
chroma_y_shift
,
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
]);
}
}
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
dmpi
->
qscale
=
vf
->
priv
->
qp
;
dmpi
->
qstride
=
vf
->
priv
->
qp_stride
;
...
...
@@ -138,7 +138,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
}
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -167,7 +167,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_qp
=
{
const
vf_info_t
ff_
vf_info_qp
=
{
"QP changer"
,
"qp"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_sab.c
View file @
de42d2a3
...
...
@@ -148,7 +148,7 @@ static int config(struct vf_instance *vf,
getSubSampleFactors
(
&
sw
,
&
sh
,
outfmt
);
allocStuff
(
&
vf
->
priv
->
chroma
,
width
>>
sw
,
height
>>
sh
);
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
freeBuffers
(
FilterParam
*
f
){
...
...
@@ -244,7 +244,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
int
cw
=
mpi
->
w
>>
mpi
->
chroma_x_shift
;
int
ch
=
mpi
->
h
>>
mpi
->
chroma_y_shift
;
mp_image_t
*
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mp_image_t
*
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
...
...
@@ -254,7 +254,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
blur
(
dmpi
->
planes
[
1
],
mpi
->
planes
[
1
],
cw
,
ch
,
dmpi
->
stride
[
1
],
mpi
->
stride
[
1
],
&
vf
->
priv
->
chroma
);
blur
(
dmpi
->
planes
[
2
],
mpi
->
planes
[
2
],
cw
,
ch
,
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
],
&
vf
->
priv
->
chroma
);
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
//===========================================================================//
...
...
@@ -269,7 +269,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -311,7 +311,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_sab
=
{
const
vf_info_t
ff_
vf_info_sab
=
{
"shape adaptive blur"
,
"sab"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_scale.h
View file @
de42d2a3
...
...
@@ -19,16 +19,16 @@
#ifndef MPLAYER_VF_SCALE_H
#define MPLAYER_VF_SCALE_H
extern
int
sws_chr_vshift
;
extern
int
sws_chr_hshift
;
extern
int
ff_
sws_chr_vshift
;
extern
int
ff_
sws_chr_hshift
;
extern
float
sws_chr_gblur
;
extern
float
sws_lum_gblur
;
extern
float
sws_chr_sharpen
;
extern
float
sws_lum_sharpen
;
extern
float
ff_
sws_chr_gblur
;
extern
float
ff_
sws_lum_gblur
;
extern
float
ff_
sws_chr_sharpen
;
extern
float
ff_
sws_lum_sharpen
;
extern
int
sws_flags
;
extern
int
ff_
sws_flags
;
struct
SwsContext
*
sws_getContextFromCmdLine
(
int
srcW
,
int
srcH
,
int
srcFormat
,
int
dstW
,
int
dstH
,
int
dstFormat
);
struct
SwsContext
*
ff_
sws_getContextFromCmdLine
(
int
srcW
,
int
srcH
,
int
srcFormat
,
int
dstW
,
int
dstH
,
int
dstFormat
);
#endif
/* MPLAYER_VF_SCALE_H */
libavfilter/libmpcodecs/vf_softpulldown.c
View file @
de42d2a3
...
...
@@ -42,7 +42,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
int
flags
=
mpi
->
fields
;
int
state
=
vf
->
priv
->
state
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
,
mpi
->
width
,
mpi
->
height
);
...
...
@@ -52,7 +52,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
!
(
flags
&
MP_IMGFIELD_TOP_FIRST
))
||
(
state
==
1
&&
flags
&
MP_IMGFIELD_TOP_FIRST
))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"softpulldown: Unexpected field flags: state=%d top_field_first=%d repeat_first_field=%d
\n
"
,
state
,
(
flags
&
MP_IMGFIELD_TOP_FIRST
)
!=
0
,
...
...
@@ -61,7 +61,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
}
if
(
state
==
0
)
{
ret
=
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
vf
->
priv
->
out
++
;
if
(
flags
&
MP_IMGFIELD_REPEAT_FIRST
)
{
my_memcpy_pic
(
dmpi
->
planes
[
0
],
...
...
@@ -97,10 +97,10 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mpi
->
chroma_width
,
mpi
->
chroma_height
/
2
,
dmpi
->
stride
[
2
]
*
2
,
mpi
->
stride
[
2
]
*
2
);
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
vf
->
priv
->
out
++
;
if
(
flags
&
MP_IMGFIELD_REPEAT_FIRST
)
{
ret
|=
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
ret
|=
ff_
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
vf
->
priv
->
out
++
;
state
=
0
;
}
else
{
...
...
@@ -133,12 +133,12 @@ static int config(struct vf_instance *vf,
int
width
,
int
height
,
int
d_width
,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
)
{
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
{
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"softpulldown: %lld frames in, %lld frames out
\n
"
,
vf
->
priv
->
in
,
vf
->
priv
->
out
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"softpulldown: %lld frames in, %lld frames out
\n
"
,
vf
->
priv
->
in
,
vf
->
priv
->
out
);
free
(
vf
->
priv
);
}
...
...
@@ -153,7 +153,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_softpulldown
=
{
const
vf_info_t
ff_
vf_info_softpulldown
=
{
"mpeg2 soft 3:2 pulldown"
,
"softpulldown"
,
"Tobias Diedrich <ranma+mplayer@tdiedrich.de>"
,
...
...
libavfilter/libmpcodecs/vf_softskip.c
View file @
de42d2a3
...
...
@@ -38,9 +38,9 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
if
(
vf
->
priv
->
skipflag
)
return
vf
->
priv
->
skipflag
=
0
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_EXPORT
,
0
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
dmpi
->
planes
[
0
]
=
mpi
->
planes
[
0
];
dmpi
->
stride
[
0
]
=
mpi
->
stride
[
0
];
...
...
@@ -51,7 +51,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
dmpi
->
stride
[
2
]
=
mpi
->
stride
[
2
];
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
int
control
(
struct
vf_instance
*
vf
,
int
request
,
void
*
data
)
...
...
@@ -61,7 +61,7 @@ static int control(struct vf_instance *vf, int request, void* data)
vf
->
priv
->
skipflag
=
1
;
return
CONTROL_TRUE
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
#if 0
...
...
@@ -72,7 +72,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case IMGFMT_YV12:
case IMGFMT_IYUV:
case IMGFMT_I420:
return vf_next_query_format(vf, fmt);
return
ff_
vf_next_query_format(vf, fmt);
}
return 0;
}
...
...
@@ -92,7 +92,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_softskip
=
{
const
vf_info_t
ff_
vf_info_softskip
=
{
"soft (post-filter) frame skipping for encoding"
,
"softskip"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_spp.c
View file @
de42d2a3
...
...
@@ -445,13 +445,13 @@ static int config(struct vf_instance *vf,
vf
->
priv
->
temp
=
malloc
(
vf
->
priv
->
temp_stride
*
h
*
sizeof
(
int16_t
));
vf
->
priv
->
src
=
malloc
(
vf
->
priv
->
temp_stride
*
h
*
sizeof
(
uint8_t
));
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -470,11 +470,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
}
else
{
dmpi
=
vf
->
dmpi
;
}
...
...
@@ -508,13 +508,13 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
}
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
#endif
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -547,7 +547,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_444P
:
case
IMGFMT_422P
:
case
IMGFMT_411P
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -560,7 +560,7 @@ static int control(struct vf_instance *vf, int request, void* data){
vf
->
priv
->
log2_count
=
*
((
unsigned
int
*
)
data
);
return
CONTROL_TRUE
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
...
...
@@ -576,7 +576,7 @@ static int vf_open(vf_instance_t *vf, char *args){
vf
->
priv
=
malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
init_avcodec
();
ff_
init_avcodec
();
vf
->
priv
->
avctx
=
avcodec_alloc_context
();
dsputil_init
(
&
vf
->
priv
->
dsp
,
vf
->
priv
->
avctx
);
...
...
@@ -598,7 +598,7 @@ static int vf_open(vf_instance_t *vf, char *args){
}
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
){
if
(
ff_
gCpuCaps
.
hasMMX
){
store_slice
=
store_slice_mmx
;
switch
(
vf
->
priv
->
mode
&
3
){
case
0
:
requantize
=
hardthresh_mmx
;
break
;
...
...
@@ -610,7 +610,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_spp
=
{
const
vf_info_t
ff_
vf_info_spp
=
{
"simple postprocess"
,
"spp"
,
"Michael Niedermayer"
,
...
...
libavfilter/libmpcodecs/vf_stereo3d.c
View file @
de42d2a3
...
...
@@ -112,7 +112,7 @@ struct vf_priv_s {
unsigned
int
width
;
unsigned
int
height
;
unsigned
int
row_step
;
}
const
vf_priv_default
=
{
}
const
ff_
vf_priv_default
=
{
{
SIDE_BY_SIDE_LR
},
{
ANAGLYPH_RC_DUBOIS
}
};
...
...
@@ -132,7 +132,7 @@ static int config(struct vf_instance *vf, int width, int height, int d_width,
int
d_height
,
unsigned
int
flags
,
unsigned
int
outfmt
)
{
if
((
width
&
1
)
||
(
height
&
1
))
{
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"[stereo3d] invalid height or width
\n
"
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"[stereo3d] invalid height or width
\n
"
);
return
0
;
}
//default input values
...
...
@@ -173,7 +173,7 @@ static int config(struct vf_instance *vf, int width, int height, int d_width,
vf
->
priv
->
in
.
row_left
=
vf
->
priv
->
height
;
break
;
default:
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"[stereo3d] stereo format of input is not supported
\n
"
);
return
0
;
break
;
...
...
@@ -246,7 +246,7 @@ static int config(struct vf_instance *vf, int width, int height, int d_width,
//use default settings
break
;
default:
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"[stereo3d] stereo format of output is not supported
\n
"
);
return
0
;
break
;
...
...
@@ -256,7 +256,7 @@ static int config(struct vf_instance *vf, int width, int height, int d_width,
d_height
=
d_height
*
vf
->
priv
->
out
.
height
/
height
;
// }
return
vf_next_config
(
vf
,
vf
->
priv
->
out
.
width
,
vf
->
priv
->
out
.
height
,
return
ff_
vf_next_config
(
vf
,
vf
->
priv
->
out
.
width
,
vf
->
priv
->
out
.
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
...
...
@@ -272,7 +272,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
int
in_off_right
=
vf
->
priv
->
in
.
row_right
*
mpi
->
stride
[
0
]
+
vf
->
priv
->
in
.
off_right
;
dmpi
=
vf_get_image
(
vf
->
next
,
IMGFMT_RGB24
,
MP_IMGTYPE_TEMP
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
IMGFMT_RGB24
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
vf
->
priv
->
out
.
width
,
vf
->
priv
->
out
.
height
);
out_off_left
=
vf
->
priv
->
out
.
row_left
*
dmpi
->
stride
[
0
]
+
...
...
@@ -353,20 +353,20 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
break
;
}
default:
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_WARN
,
"[stereo3d] stereo format of output is not supported
\n
"
);
return
0
;
break
;
}
}
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
int
query_format
(
struct
vf_instance
*
vf
,
unsigned
int
fmt
)
{
switch
(
fmt
)
case
IMGFMT_RGB24
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
return
0
;
}
...
...
@@ -496,13 +496,13 @@ static const m_option_t vf_opts_fields[] = {
static const m_struct_t vf_opts = {
"stereo3d",
sizeof(struct vf_priv_s),
&vf_priv_default,
&
ff_
vf_priv_default,
vf_opts_fields
};
#endif
//==info struct==//
const
vf_info_t
vf_info_stereo3d
=
{
const
vf_info_t
ff_
vf_info_stereo3d
=
{
"stereoscopic 3d view"
,
"stereo3d"
,
"Gordon Schmidt"
,
...
...
libavfilter/libmpcodecs/vf_telecine.c
View file @
de42d2a3
...
...
@@ -42,7 +42,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
vf
->
priv
->
frame
=
(
vf
->
priv
->
frame
+
1
)
%
4
;
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
,
mpi
->
width
,
mpi
->
height
);
...
...
@@ -63,7 +63,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
chroma_width
,
mpi
->
chroma_height
/
2
,
dmpi
->
stride
[
2
]
*
2
,
mpi
->
stride
[
2
]
*
2
);
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
/* Fallthrough */
case
1
:
case
2
:
...
...
@@ -77,7 +77,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
chroma_width
,
mpi
->
chroma_height
,
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
]);
}
return
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
)
||
ret
;
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
)
||
ret
;
case
3
:
my_memcpy_pic
(
dmpi
->
planes
[
0
]
+
dmpi
->
stride
[
0
],
mpi
->
planes
[
0
]
+
mpi
->
stride
[
0
],
w
,
mpi
->
h
/
2
,
...
...
@@ -92,7 +92,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
chroma_width
,
mpi
->
chroma_height
/
2
,
dmpi
->
stride
[
2
]
*
2
,
mpi
->
stride
[
2
]
*
2
);
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
my_memcpy_pic
(
dmpi
->
planes
[
0
],
mpi
->
planes
[
0
],
w
,
mpi
->
h
/
2
,
dmpi
->
stride
[
0
]
*
2
,
mpi
->
stride
[
0
]
*
2
);
if
(
mpi
->
flags
&
MP_IMGFLAG_PLANAR
)
{
...
...
@@ -116,7 +116,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case IMGFMT_YV12:
case IMGFMT_IYUV:
case IMGFMT_I420:
return vf_next_query_format(vf, fmt);
return
ff_
vf_next_query_format(vf, fmt);
}
return 0;
}
...
...
@@ -125,7 +125,7 @@ static int config(struct vf_instance *vf,
int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt)
{
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
return
ff_
vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
}
#endif
...
...
@@ -148,7 +148,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_telecine
=
{
const
vf_info_t
ff_
vf_info_telecine
=
{
"telecine filter"
,
"telecine"
,
"Rich Felker"
,
...
...
libavfilter/libmpcodecs/vf_tinterlace.c
View file @
de42d2a3
...
...
@@ -46,7 +46,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
case
0
:
dmpi
=
vf
->
priv
->
dmpi
;
if
(
dmpi
==
NULL
)
{
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
,
mpi
->
width
,
mpi
->
height
*
2
);
...
...
@@ -76,23 +76,23 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mpi
->
chroma_width
,
mpi
->
chroma_height
,
dmpi
->
stride
[
2
]
*
2
,
mpi
->
stride
[
2
]);
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
break
;
case
1
:
if
(
vf
->
priv
->
frame
&
1
)
ret
=
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
break
;
case
2
:
if
((
vf
->
priv
->
frame
&
1
)
==
0
)
ret
=
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
mpi
,
MP_NOPTS_VALUE
);
break
;
case
3
:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
width
,
mpi
->
height
*
2
);
/* fixme, just clear alternate lines */
vf_mpi_clear
(
dmpi
,
0
,
0
,
dmpi
->
w
,
dmpi
->
h
);
ff_
vf_mpi_clear
(
dmpi
,
0
,
0
,
dmpi
->
w
,
dmpi
->
h
);
if
((
vf
->
priv
->
frame
&
1
)
==
0
)
{
memcpy_pic
(
dmpi
->
planes
[
0
],
mpi
->
planes
[
0
],
mpi
->
w
,
mpi
->
h
,
dmpi
->
stride
[
0
]
*
2
,
mpi
->
stride
[
0
]);
...
...
@@ -116,7 +116,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
dmpi
->
stride
[
2
]
*
2
,
mpi
->
stride
[
2
]);
}
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
break
;
case
4
:
// Interleave even lines (only) from Frame 'i' with odd
...
...
@@ -132,7 +132,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
// etc.
if
(
dmpi
==
NULL
)
{
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_STATIC
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PRESERVE
,
mpi
->
width
,
mpi
->
height
);
...
...
@@ -166,7 +166,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
mpi
->
chroma_width
,
mpi
->
chroma_height
/
2
,
dmpi
->
stride
[
2
]
*
2
,
mpi
->
stride
[
2
]
*
2
);
}
ret
=
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
ret
=
ff_
vf_next_put_image
(
vf
,
dmpi
,
MP_NOPTS_VALUE
);
}
break
;
}
...
...
@@ -183,7 +183,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt)
case
IMGFMT_YV12
:
case
IMGFMT_IYUV
:
case
IMGFMT_I420
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -195,11 +195,11 @@ static int config(struct vf_instance *vf,
switch
(
vf
->
priv
->
mode
)
{
case
0
:
case
3
:
return
vf_next_config
(
vf
,
width
,
height
*
2
,
d_width
,
d_height
*
2
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
*
2
,
d_width
,
d_height
*
2
,
flags
,
outfmt
);
case
1
:
/* odd frames */
case
2
:
/* even frames */
case
4
:
/* alternate frame (height-preserving) interlacing */
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
return
0
;
}
...
...
@@ -225,7 +225,7 @@ static int vf_open(vf_instance_t *vf, char *args)
return
1
;
}
const
vf_info_t
vf_info_tinterlace
=
{
const
vf_info_t
ff_
vf_info_tinterlace
=
{
"temporal field interlacing"
,
"tinterlace"
,
"Michael Zucchi"
,
...
...
libavfilter/libmpcodecs/vf_unsharp.c
View file @
de42d2a3
...
...
@@ -138,7 +138,7 @@ static int config( struct vf_instance *vf,
fp
=
&
vf
->
priv
->
lumaParam
;
effect
=
fp
->
amount
==
0
?
"don't touch"
:
fp
->
amount
<
0
?
"blur"
:
"sharpen"
;
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"unsharp: %dx%d:%0.2f (%s luma)
\n
"
,
fp
->
msizeX
,
fp
->
msizeY
,
fp
->
amount
,
effect
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"unsharp: %dx%d:%0.2f (%s luma)
\n
"
,
fp
->
msizeX
,
fp
->
msizeY
,
fp
->
amount
,
effect
);
memset
(
fp
->
SC
,
0
,
sizeof
(
fp
->
SC
)
);
stepsX
=
fp
->
msizeX
/
2
;
stepsY
=
fp
->
msizeY
/
2
;
...
...
@@ -147,14 +147,14 @@ static int config( struct vf_instance *vf,
fp
=
&
vf
->
priv
->
chromaParam
;
effect
=
fp
->
amount
==
0
?
"don't touch"
:
fp
->
amount
<
0
?
"blur"
:
"sharpen"
;
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"unsharp: %dx%d:%0.2f (%s chroma)
\n
"
,
fp
->
msizeX
,
fp
->
msizeY
,
fp
->
amount
,
effect
);
ff_
mp_msg
(
MSGT_VFILTER
,
MSGL_INFO
,
"unsharp: %dx%d:%0.2f (%s chroma)
\n
"
,
fp
->
msizeX
,
fp
->
msizeY
,
fp
->
amount
,
effect
);
memset
(
fp
->
SC
,
0
,
sizeof
(
fp
->
SC
)
);
stepsX
=
fp
->
msizeX
/
2
;
stepsY
=
fp
->
msizeY
/
2
;
for
(
z
=
0
;
z
<
2
*
stepsY
;
z
++
)
fp
->
SC
[
z
]
=
av_malloc
(
sizeof
(
*
(
fp
->
SC
[
z
]))
*
(
width
+
2
*
stepsX
));
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
//===========================================================================//
...
...
@@ -165,7 +165,7 @@ static void get_image( struct vf_instance *vf, mp_image_t *mpi ) {
if
(
mpi
->
imgfmt
!=
vf
->
priv
->
outfmt
)
return
;
// colorspace differ
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
,
mpi
->
w
,
mpi
->
h
);
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
,
mpi
->
w
,
mpi
->
h
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
mpi
->
width
=
vf
->
dmpi
->
width
;
...
...
@@ -183,25 +183,25 @@ static int put_image( struct vf_instance *vf, mp_image_t *mpi, double pts) {
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)
)
// no DR, so get a new image! hope we'll get DR buffer:
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
vf
->
priv
->
outfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
vf
->
priv
->
outfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
,
mpi
->
w
,
mpi
->
h
);
dmpi
=
vf
->
dmpi
;
unsharp
(
dmpi
->
planes
[
0
],
mpi
->
planes
[
0
],
dmpi
->
stride
[
0
],
mpi
->
stride
[
0
],
mpi
->
w
,
mpi
->
h
,
&
vf
->
priv
->
lumaParam
);
unsharp
(
dmpi
->
planes
[
1
],
mpi
->
planes
[
1
],
dmpi
->
stride
[
1
],
mpi
->
stride
[
1
],
mpi
->
w
/
2
,
mpi
->
h
/
2
,
&
vf
->
priv
->
chromaParam
);
unsharp
(
dmpi
->
planes
[
2
],
mpi
->
planes
[
2
],
dmpi
->
stride
[
2
],
mpi
->
stride
[
2
],
mpi
->
w
/
2
,
mpi
->
h
/
2
,
&
vf
->
priv
->
chromaParam
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
if
(
ff_
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
if
(
ff_
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
#endif
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
)
{
...
...
@@ -232,7 +232,7 @@ static int query_format( struct vf_instance *vf, unsigned int fmt ) {
case
IMGFMT_YV12
:
case
IMGFMT_I420
:
case
IMGFMT_IYUV
:
return
vf_next_query_format
(
vf
,
vf
->
priv
->
outfmt
);
return
ff_
vf_next_query_format
(
vf
,
vf
->
priv
->
outfmt
);
}
return
0
;
}
...
...
@@ -303,7 +303,7 @@ static int vf_open( vf_instance_t *vf, char *args ) {
}
// check csp:
vf
->
priv
->
outfmt
=
vf_match_csp
(
&
vf
->
next
,
fmt_list
,
IMGFMT_YV12
);
vf
->
priv
->
outfmt
=
ff_
vf_match_csp
(
&
vf
->
next
,
fmt_list
,
IMGFMT_YV12
);
if
(
!
vf
->
priv
->
outfmt
)
{
uninit
(
vf
);
return
0
;
// no csp match :(
...
...
@@ -312,7 +312,7 @@ static int vf_open( vf_instance_t *vf, char *args ) {
return
1
;
}
const
vf_info_t
vf_info_unsharp
=
{
const
vf_info_t
ff_
vf_info_unsharp
=
{
"unsharp mask & gaussian blur"
,
"unsharp"
,
"Remi Guyomarch"
,
...
...
libavfilter/libmpcodecs/vf_uspp.c
View file @
de42d2a3
...
...
@@ -243,13 +243,13 @@ static int config(struct vf_instance *vf,
vf
->
priv
->
outbuf_size
=
(
width
+
BLOCK
)
*
(
height
+
BLOCK
)
*
10
;
vf
->
priv
->
outbuf
=
malloc
(
vf
->
priv
->
outbuf_size
);
return
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
return
ff_
vf_next_config
(
vf
,
width
,
height
,
d_width
,
d_height
,
flags
,
outfmt
);
}
static
void
get_image
(
struct
vf_instance
*
vf
,
mp_image_t
*
mpi
){
if
(
mpi
->
flags
&
MP_IMGFLAG_PRESERVE
)
return
;
// don't change
// ok, we can do pp in-place (or pp disabled):
vf
->
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
vf
->
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
mpi
->
type
,
mpi
->
flags
|
MP_IMGFLAG_READABLE
,
mpi
->
width
,
mpi
->
height
);
mpi
->
planes
[
0
]
=
vf
->
dmpi
->
planes
[
0
];
mpi
->
stride
[
0
]
=
vf
->
dmpi
->
stride
[
0
];
...
...
@@ -268,11 +268,11 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
if
(
!
(
mpi
->
flags
&
MP_IMGFLAG_DIRECT
)){
// no DR, so get a new image! hope we'll get DR buffer:
dmpi
=
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
dmpi
=
ff_
vf_get_image
(
vf
->
next
,
mpi
->
imgfmt
,
MP_IMGTYPE_TEMP
,
MP_IMGFLAG_ACCEPT_STRIDE
|
MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
mpi
->
width
,
mpi
->
height
);
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
ff_
vf_clone_mpi_attributes
(
dmpi
,
mpi
);
}
else
{
dmpi
=
vf
->
dmpi
;
}
...
...
@@ -289,13 +289,13 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
}
#if HAVE_MMX
if
(
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX
)
__asm__
volatile
(
"emms
\n\t
"
);
#endif
#if HAVE_MMX2
if
(
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
if
(
ff_
gCpuCaps
.
hasMMX2
)
__asm__
volatile
(
"sfence
\n\t
"
);
#endif
return
vf_next_put_image
(
vf
,
dmpi
,
pts
);
return
ff_
vf_next_put_image
(
vf
,
dmpi
,
pts
);
}
static
void
uninit
(
struct
vf_instance
*
vf
){
...
...
@@ -324,7 +324,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt){
case
IMGFMT_IYUV
:
case
IMGFMT_Y800
:
case
IMGFMT_Y8
:
return
vf_next_query_format
(
vf
,
fmt
);
return
ff_
vf_next_query_format
(
vf
,
fmt
);
}
return
0
;
}
...
...
@@ -338,7 +338,7 @@ static int control(struct vf_instance *vf, int request, void* data){
//FIXME we have to realloc a few things here
return
CONTROL_TRUE
;
}
return
vf_next_control
(
vf
,
request
,
data
);
return
ff_
vf_next_control
(
vf
,
request
,
data
);
}
static
int
vf_open
(
vf_instance_t
*
vf
,
char
*
args
){
...
...
@@ -354,7 +354,7 @@ static int vf_open(vf_instance_t *vf, char *args){
vf
->
priv
=
malloc
(
sizeof
(
struct
vf_priv_s
));
memset
(
vf
->
priv
,
0
,
sizeof
(
struct
vf_priv_s
));
init_avcodec
();
ff_
init_avcodec
();
vf
->
priv
->
log2_count
=
4
;
...
...
@@ -367,7 +367,7 @@ static int vf_open(vf_instance_t *vf, char *args){
vf
->
priv
->
qp
=
0
;
// #if HAVE_MMX
// if(gCpuCaps.hasMMX){
// if(
ff_
gCpuCaps.hasMMX){
// store_slice= store_slice_mmx;
// }
// #endif
...
...
@@ -375,7 +375,7 @@ static int vf_open(vf_instance_t *vf, char *args){
return
1
;
}
const
vf_info_t
vf_info_uspp
=
{
const
vf_info_t
ff_
vf_info_uspp
=
{
"ultra simple/slow postprocess"
,
"uspp"
,
"Michael Niedermayer"
,
...
...
libavfilter/vf_mp.c
View file @
de42d2a3
This diff is collapsed.
Click to expand it.
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