lavfi/mp: add ff_ prefix to exported symbols
This commit is contained in:
parent
0f65d56080
commit
de42d2a347
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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 ff_free_mp_image(mp_image_t* mpi){
|
||||
if(!mpi) return;
|
||||
if(mpi->flags&MP_IMGFLAG_ALLOCATED){
|
||||
/* becouse we allocate the whole image in once */
|
||||
|
@ -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 ff_free_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 */
|
||||
|
@ -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* ff_filename_recode(const char* filename);
|
||||
|
||||
#endif /* MPLAYER_MP_MSG_H */
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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.",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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 */
|
||||
|
@ -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>",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -123,95 +123,95 @@ static const struct {
|
||||
};
|
||||
|
||||
//copied from vf.c
|
||||
extern const vf_info_t vf_info_1bpp;
|
||||
extern const vf_info_t vf_info_ass;
|
||||
extern const vf_info_t vf_info_bmovl;
|
||||
extern const vf_info_t vf_info_crop;
|
||||
extern const vf_info_t vf_info_denoise3d;
|
||||
extern const vf_info_t vf_info_detc;
|
||||
extern const vf_info_t vf_info_dint;
|
||||
extern const vf_info_t vf_info_divtc;
|
||||
extern const vf_info_t vf_info_down3dright;
|
||||
extern const vf_info_t vf_info_dsize;
|
||||
extern const vf_info_t vf_info_dvbscale;
|
||||
extern const vf_info_t vf_info_eq2;
|
||||
extern const vf_info_t vf_info_eq;
|
||||
extern const vf_info_t vf_info_expand;
|
||||
extern const vf_info_t vf_info_fil;
|
||||
extern const vf_info_t vf_info_filmdint;
|
||||
extern const vf_info_t vf_info_flip;
|
||||
extern const vf_info_t vf_info_format;
|
||||
extern const vf_info_t vf_info_fspp;
|
||||
extern const vf_info_t vf_info_halfpack;
|
||||
extern const vf_info_t vf_info_harddup;
|
||||
extern const vf_info_t vf_info_il;
|
||||
extern const vf_info_t vf_info_ilpack;
|
||||
extern const vf_info_t vf_info_ivtc;
|
||||
extern const vf_info_t vf_info_kerndeint;
|
||||
extern const vf_info_t vf_info_lavc;
|
||||
extern const vf_info_t vf_info_lavcdeint;
|
||||
extern const vf_info_t vf_info_mcdeint;
|
||||
extern const vf_info_t vf_info_noformat;
|
||||
extern const vf_info_t vf_info_noise;
|
||||
extern const vf_info_t vf_info_ow;
|
||||
extern const vf_info_t vf_info_perspective;
|
||||
extern const vf_info_t vf_info_phase;
|
||||
extern const vf_info_t vf_info_pp7;
|
||||
extern const vf_info_t vf_info_pp;
|
||||
extern const vf_info_t vf_info_pullup;
|
||||
extern const vf_info_t vf_info_qp;
|
||||
extern const vf_info_t vf_info_sab;
|
||||
extern const vf_info_t vf_info_scale;
|
||||
extern const vf_info_t vf_info_softpulldown;
|
||||
extern const vf_info_t vf_info_softskip;
|
||||
extern const vf_info_t vf_info_spp;
|
||||
extern const vf_info_t vf_info_stereo3d;
|
||||
extern const vf_info_t vf_info_telecine;
|
||||
extern const vf_info_t vf_info_test;
|
||||
extern const vf_info_t vf_info_tfields;
|
||||
extern const vf_info_t vf_info_tinterlace;
|
||||
extern const vf_info_t vf_info_unsharp;
|
||||
extern const vf_info_t vf_info_uspp;
|
||||
extern const vf_info_t vf_info_vo;
|
||||
extern const vf_info_t vf_info_yadif;
|
||||
extern const vf_info_t vf_info_zrmjpeg;
|
||||
extern const vf_info_t ff_vf_info_1bpp;
|
||||
extern const vf_info_t ff_vf_info_ass;
|
||||
extern const vf_info_t ff_vf_info_bmovl;
|
||||
extern const vf_info_t ff_vf_info_crop;
|
||||
extern const vf_info_t ff_vf_info_denoise3d;
|
||||
extern const vf_info_t ff_vf_info_detc;
|
||||
extern const vf_info_t ff_vf_info_dint;
|
||||
extern const vf_info_t ff_vf_info_divtc;
|
||||
extern const vf_info_t ff_vf_info_down3dright;
|
||||
extern const vf_info_t ff_vf_info_dsize;
|
||||
extern const vf_info_t ff_vf_info_dvbscale;
|
||||
extern const vf_info_t ff_vf_info_eq2;
|
||||
extern const vf_info_t ff_vf_info_eq;
|
||||
extern const vf_info_t ff_vf_info_expand;
|
||||
extern const vf_info_t ff_vf_info_fil;
|
||||
extern const vf_info_t ff_vf_info_filmdint;
|
||||
extern const vf_info_t ff_vf_info_flip;
|
||||
extern const vf_info_t ff_vf_info_format;
|
||||
extern const vf_info_t ff_vf_info_fspp;
|
||||
extern const vf_info_t ff_vf_info_halfpack;
|
||||
extern const vf_info_t ff_vf_info_harddup;
|
||||
extern const vf_info_t ff_vf_info_il;
|
||||
extern const vf_info_t ff_vf_info_ilpack;
|
||||
extern const vf_info_t ff_vf_info_ivtc;
|
||||
extern const vf_info_t ff_vf_info_kerndeint;
|
||||
extern const vf_info_t ff_vf_info_lavc;
|
||||
extern const vf_info_t ff_vf_info_lavcdeint;
|
||||
extern const vf_info_t ff_vf_info_mcdeint;
|
||||
extern const vf_info_t ff_vf_info_noformat;
|
||||
extern const vf_info_t ff_vf_info_noise;
|
||||
extern const vf_info_t ff_vf_info_ow;
|
||||
extern const vf_info_t ff_vf_info_perspective;
|
||||
extern const vf_info_t ff_vf_info_phase;
|
||||
extern const vf_info_t ff_vf_info_pp7;
|
||||
extern const vf_info_t ff_vf_info_pp;
|
||||
extern const vf_info_t ff_vf_info_pullup;
|
||||
extern const vf_info_t ff_vf_info_qp;
|
||||
extern const vf_info_t ff_vf_info_sab;
|
||||
extern const vf_info_t ff_vf_info_scale;
|
||||
extern const vf_info_t ff_vf_info_softpulldown;
|
||||
extern const vf_info_t ff_vf_info_softskip;
|
||||
extern const vf_info_t ff_vf_info_spp;
|
||||
extern const vf_info_t ff_vf_info_stereo3d;
|
||||
extern const vf_info_t ff_vf_info_telecine;
|
||||
extern const vf_info_t ff_vf_info_test;
|
||||
extern const vf_info_t ff_vf_info_tfields;
|
||||
extern const vf_info_t ff_vf_info_tinterlace;
|
||||
extern const vf_info_t ff_vf_info_unsharp;
|
||||
extern const vf_info_t ff_vf_info_uspp;
|
||||
extern const vf_info_t ff_vf_info_vo;
|
||||
extern const vf_info_t ff_vf_info_yadif;
|
||||
extern const vf_info_t ff_vf_info_zrmjpeg;
|
||||
|
||||
|
||||
static const vf_info_t* const filters[]={
|
||||
&vf_info_denoise3d,
|
||||
&vf_info_detc,
|
||||
&vf_info_dint,
|
||||
&vf_info_divtc,
|
||||
&vf_info_down3dright,
|
||||
&vf_info_dsize,
|
||||
&vf_info_eq2,
|
||||
&vf_info_eq,
|
||||
&vf_info_fil,
|
||||
// &vf_info_filmdint, cmmx.h vd.h ‘opt_screen_size_x’
|
||||
&vf_info_fspp,
|
||||
&vf_info_harddup,
|
||||
&vf_info_il,
|
||||
&vf_info_ilpack,
|
||||
&vf_info_ivtc,
|
||||
&vf_info_kerndeint,
|
||||
&vf_info_mcdeint,
|
||||
&vf_info_noise,
|
||||
&vf_info_ow,
|
||||
&vf_info_perspective,
|
||||
&vf_info_phase,
|
||||
&vf_info_pp,
|
||||
&vf_info_pp7,
|
||||
&vf_info_pullup,
|
||||
&vf_info_qp,
|
||||
&vf_info_sab,
|
||||
&vf_info_softpulldown,
|
||||
&vf_info_softskip,
|
||||
&vf_info_spp,
|
||||
&vf_info_stereo3d,
|
||||
&vf_info_telecine,
|
||||
&vf_info_tinterlace,
|
||||
&vf_info_unsharp,
|
||||
&vf_info_uspp,
|
||||
&ff_vf_info_denoise3d,
|
||||
&ff_vf_info_detc,
|
||||
&ff_vf_info_dint,
|
||||
&ff_vf_info_divtc,
|
||||
&ff_vf_info_down3dright,
|
||||
&ff_vf_info_dsize,
|
||||
&ff_vf_info_eq2,
|
||||
&ff_vf_info_eq,
|
||||
&ff_vf_info_fil,
|
||||
// &ff_vf_info_filmdint, cmmx.h vd.h ‘opt_screen_size_x’
|
||||
&ff_vf_info_fspp,
|
||||
&ff_vf_info_harddup,
|
||||
&ff_vf_info_il,
|
||||
&ff_vf_info_ilpack,
|
||||
&ff_vf_info_ivtc,
|
||||
&ff_vf_info_kerndeint,
|
||||
&ff_vf_info_mcdeint,
|
||||
&ff_vf_info_noise,
|
||||
&ff_vf_info_ow,
|
||||
&ff_vf_info_perspective,
|
||||
&ff_vf_info_phase,
|
||||
&ff_vf_info_pp,
|
||||
&ff_vf_info_pp7,
|
||||
&ff_vf_info_pullup,
|
||||
&ff_vf_info_qp,
|
||||
&ff_vf_info_sab,
|
||||
&ff_vf_info_softpulldown,
|
||||
&ff_vf_info_softskip,
|
||||
&ff_vf_info_spp,
|
||||
&ff_vf_info_stereo3d,
|
||||
&ff_vf_info_telecine,
|
||||
&ff_vf_info_tinterlace,
|
||||
&ff_vf_info_unsharp,
|
||||
&ff_vf_info_uspp,
|
||||
|
||||
NULL
|
||||
};
|
||||
@ -238,16 +238,16 @@ yadif
|
||||
zrmjpeg
|
||||
*/
|
||||
|
||||
CpuCaps gCpuCaps; //FIXME initialize this so optims work
|
||||
CpuCaps ff_gCpuCaps; //FIXME initialize this so optims work
|
||||
|
||||
|
||||
static void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam)
|
||||
static void ff_sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam)
|
||||
{
|
||||
static int firstTime=1;
|
||||
*flags=0;
|
||||
|
||||
#if ARCH_X86
|
||||
if(gCpuCaps.hasMMX)
|
||||
if(ff_gCpuCaps.hasMMX)
|
||||
__asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions)
|
||||
#endif
|
||||
if(firstTime)
|
||||
@ -255,7 +255,7 @@ static void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterPa
|
||||
firstTime=0;
|
||||
*flags= SWS_PRINT_INFO;
|
||||
}
|
||||
else if( mp_msg_test(MSGT_VFILTER,MSGL_DBG2) ) *flags= SWS_PRINT_INFO;
|
||||
else if( ff_mp_msg_test(MSGT_VFILTER,MSGL_DBG2) ) *flags= SWS_PRINT_INFO;
|
||||
|
||||
switch(SWS_BILINEAR)
|
||||
{
|
||||
@ -279,7 +279,7 @@ static void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterPa
|
||||
|
||||
//exact copy from vf_scale.c
|
||||
// will use sws_flags & src_filter (from cmd line)
|
||||
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)
|
||||
{
|
||||
int flags, i;
|
||||
SwsFilter *dstFilterParam, *srcFilterParam;
|
||||
@ -291,7 +291,7 @@ struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat,
|
||||
sfmt= conversion_map[i].pix_fmt;
|
||||
|
||||
if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
|
||||
sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
|
||||
ff_sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
|
||||
|
||||
return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags , srcFilterParam, dstFilterParam, NULL);
|
||||
}
|
||||
@ -303,7 +303,7 @@ typedef struct {
|
||||
int frame_returned;
|
||||
} MPContext;
|
||||
|
||||
void mp_msg(int mod, int lev, const char *format, ... ){
|
||||
void ff_mp_msg(int mod, int lev, const char *format, ... ){
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
//FIXME convert lev/mod
|
||||
@ -311,17 +311,17 @@ void mp_msg(int mod, int lev, const char *format, ... ){
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
int mp_msg_test(int mod, int lev){
|
||||
int ff_mp_msg_test(int mod, int lev){
|
||||
return 123;
|
||||
}
|
||||
|
||||
void init_avcodec(void)
|
||||
void ff_init_avcodec(void)
|
||||
{
|
||||
//we maybe should init but its kinda 1. unneeded 2. a bit inpolite from here
|
||||
}
|
||||
|
||||
//Exact copy of vf.c
|
||||
void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src){
|
||||
void ff_vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src){
|
||||
dst->pict_type= src->pict_type;
|
||||
dst->fields = src->fields;
|
||||
dst->qscale_type= src->qscale_type;
|
||||
@ -332,13 +332,13 @@ void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src){
|
||||
}
|
||||
|
||||
//Exact copy of vf.c
|
||||
void vf_next_draw_slice(struct vf_instance *vf,unsigned char** src, int * stride,int w, int h, int x, int y){
|
||||
void ff_vf_next_draw_slice(struct vf_instance *vf,unsigned char** src, int * stride,int w, int h, int x, int y){
|
||||
if (vf->next->draw_slice) {
|
||||
vf->next->draw_slice(vf->next,src,stride,w,h,x,y);
|
||||
return;
|
||||
}
|
||||
if (!vf->dmpi) {
|
||||
mp_msg(MSGT_VFILTER,MSGL_ERR,"draw_slice: dmpi not stored by vf_%s\n", vf->info->name);
|
||||
ff_mp_msg(MSGT_VFILTER,MSGL_ERR,"draw_slice: dmpi not stored by vf_%s\n", vf->info->name);
|
||||
return;
|
||||
}
|
||||
if (!(vf->dmpi->flags & MP_IMGFLAG_PLANAR)) {
|
||||
@ -355,7 +355,7 @@ void vf_next_draw_slice(struct vf_instance *vf,unsigned char** src, int * stride
|
||||
}
|
||||
|
||||
//Exact copy of vf.c
|
||||
void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h){
|
||||
void ff_vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h){
|
||||
int y;
|
||||
if(mpi->flags&MP_IMGFLAG_PLANAR){
|
||||
y0&=~1;h+=h&1;
|
||||
@ -399,16 +399,16 @@ void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h){
|
||||
}
|
||||
}
|
||||
|
||||
int vf_next_query_format(struct vf_instance *vf, unsigned int fmt){
|
||||
int ff_vf_next_query_format(struct vf_instance *vf, unsigned int fmt){
|
||||
return 1;
|
||||
}
|
||||
|
||||
//used by delogo
|
||||
unsigned int vf_match_csp(vf_instance_t** vfp,const unsigned int* list,unsigned int preferred){
|
||||
unsigned int ff_vf_match_csp(vf_instance_t** vfp,const unsigned int* list,unsigned int preferred){
|
||||
return preferred;
|
||||
}
|
||||
|
||||
mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, 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){
|
||||
MPContext *m= (MPContext*)(((uint8_t*)vf) - offsetof(MPContext, next_vf));
|
||||
mp_image_t* mpi=NULL;
|
||||
int w2;
|
||||
@ -416,7 +416,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
|
||||
av_assert0(vf->next == NULL); // all existing filters call this just on next
|
||||
|
||||
//vf_dint needs these as it calls vf_get_image() before configuring the output
|
||||
//vf_dint needs these as it calls ff_vf_get_image() before configuring the output
|
||||
if(vf->w==0 && w>0) vf->w=w;
|
||||
if(vf->h==0 && h>0) vf->h=h;
|
||||
|
||||
@ -436,25 +436,25 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
// and if not, then fallback to software buffers:
|
||||
switch(mp_imgtype & 0xff){
|
||||
case MP_IMGTYPE_EXPORT:
|
||||
if(!vf->imgctx.export_images[0]) vf->imgctx.export_images[0]=new_mp_image(w2,h);
|
||||
if(!vf->imgctx.export_images[0]) vf->imgctx.export_images[0]=ff_new_mp_image(w2,h);
|
||||
mpi=vf->imgctx.export_images[0];
|
||||
break;
|
||||
case MP_IMGTYPE_STATIC:
|
||||
if(!vf->imgctx.static_images[0]) vf->imgctx.static_images[0]=new_mp_image(w2,h);
|
||||
if(!vf->imgctx.static_images[0]) vf->imgctx.static_images[0]=ff_new_mp_image(w2,h);
|
||||
mpi=vf->imgctx.static_images[0];
|
||||
break;
|
||||
case MP_IMGTYPE_TEMP:
|
||||
if(!vf->imgctx.temp_images[0]) vf->imgctx.temp_images[0]=new_mp_image(w2,h);
|
||||
if(!vf->imgctx.temp_images[0]) vf->imgctx.temp_images[0]=ff_new_mp_image(w2,h);
|
||||
mpi=vf->imgctx.temp_images[0];
|
||||
break;
|
||||
case MP_IMGTYPE_IPB:
|
||||
if(!(mp_imgflag&MP_IMGFLAG_READABLE)){ // B frame:
|
||||
if(!vf->imgctx.temp_images[0]) vf->imgctx.temp_images[0]=new_mp_image(w2,h);
|
||||
if(!vf->imgctx.temp_images[0]) vf->imgctx.temp_images[0]=ff_new_mp_image(w2,h);
|
||||
mpi=vf->imgctx.temp_images[0];
|
||||
break;
|
||||
}
|
||||
case MP_IMGTYPE_IP:
|
||||
if(!vf->imgctx.static_images[vf->imgctx.static_idx]) vf->imgctx.static_images[vf->imgctx.static_idx]=new_mp_image(w2,h);
|
||||
if(!vf->imgctx.static_images[vf->imgctx.static_idx]) vf->imgctx.static_images[vf->imgctx.static_idx]=ff_new_mp_image(w2,h);
|
||||
mpi=vf->imgctx.static_images[vf->imgctx.static_idx];
|
||||
vf->imgctx.static_idx^=1;
|
||||
break;
|
||||
@ -467,7 +467,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
number = i;
|
||||
}
|
||||
if (number < 0 || number >= NUM_NUMBERED_MPI) return NULL;
|
||||
if (!vf->imgctx.numbered_images[number]) vf->imgctx.numbered_images[number] = new_mp_image(w2,h);
|
||||
if (!vf->imgctx.numbered_images[number]) vf->imgctx.numbered_images[number] = ff_new_mp_image(w2,h);
|
||||
mpi = vf->imgctx.numbered_images[number];
|
||||
mpi->number = number;
|
||||
break;
|
||||
@ -488,7 +488,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
// need to re-allocate buffer memory:
|
||||
av_free(mpi->planes[0]);
|
||||
mpi->flags&=~MP_IMGFLAG_ALLOCATED;
|
||||
mp_msg(MSGT_VFILTER,MSGL_V,"vf.c: have to REALLOCATE buffer memory :(\n");
|
||||
ff_mp_msg(MSGT_VFILTER,MSGL_V,"vf.c: have to REALLOCATE buffer memory :(\n");
|
||||
}
|
||||
// } else {
|
||||
} {
|
||||
@ -496,7 +496,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
mpi->height=h; mpi->chroma_height=(h + (1<<mpi->chroma_y_shift) - 1)>>mpi->chroma_y_shift;
|
||||
}
|
||||
}
|
||||
if(!mpi->bpp) mp_image_setfmt(mpi,outfmt);
|
||||
if(!mpi->bpp) ff_mp_image_setfmt(mpi,outfmt);
|
||||
if(!(mpi->flags&MP_IMGFLAG_ALLOCATED) && mpi->type>MP_IMGTYPE_EXPORT){
|
||||
|
||||
av_assert0(!vf->get_image);
|
||||
@ -506,8 +506,8 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
// non-direct and not yet allocated image. allocate it!
|
||||
if (!mpi->bpp) { // no way we can allocate this
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_FATAL,
|
||||
"vf_get_image: Tried to allocate a format that can not be allocated!\n");
|
||||
ff_mp_msg(MSGT_DECVIDEO, MSGL_FATAL,
|
||||
"ff_vf_get_image: Tried to allocate a format that can not be allocated!\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -521,7 +521,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
#if 0
|
||||
// we have to change width... check if we CAN co it:
|
||||
int flags=vf->query_format(vf,outfmt); // should not fail
|
||||
if(!(flags&3)) mp_msg(MSGT_DECVIDEO,MSGL_WARN,"??? vf_get_image{vf->query_format(outfmt)} failed!\n");
|
||||
if(!(flags&3)) ff_mp_msg(MSGT_DECVIDEO,MSGL_WARN,"??? ff_vf_get_image{vf->query_format(outfmt)} failed!\n");
|
||||
// printf("query -> 0x%X \n",flags);
|
||||
if(flags&VFCAP_ACCEPT_STRIDE){
|
||||
#endif
|
||||
@ -531,16 +531,16 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
}
|
||||
}
|
||||
|
||||
mp_image_alloc_planes(mpi);
|
||||
ff_mp_image_alloc_planes(mpi);
|
||||
// printf("clearing img!\n");
|
||||
vf_mpi_clear(mpi,0,0,mpi->width,mpi->height);
|
||||
ff_vf_mpi_clear(mpi,0,0,mpi->width,mpi->height);
|
||||
}
|
||||
}
|
||||
av_assert0(!vf->start_slice);
|
||||
if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)
|
||||
if(vf->start_slice) vf->start_slice(vf,mpi);
|
||||
if(!(mpi->flags&MP_IMGFLAG_TYPE_DISPLAYED)){
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s%s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
|
||||
ff_mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s%s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
|
||||
"NULL"/*vf->info->name*/,
|
||||
(mpi->type==MP_IMGTYPE_EXPORT)?"Exporting":
|
||||
((mpi->flags&MP_IMGFLAG_DIRECT)?"Direct Rendering":"Allocating"),
|
||||
@ -549,7 +549,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
(mpi->flags&MP_IMGFLAG_YUV)?"YUV":((mpi->flags&MP_IMGFLAG_SWAPPED)?"BGR":"RGB"),
|
||||
(mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed",
|
||||
mpi->bpp*mpi->width*mpi->height/8);
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"(imgfmt: %x, planes: %p,%p,%p strides: %d,%d,%d, chroma: %dx%d, shift: h:%d,v:%d)\n",
|
||||
ff_mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"(imgfmt: %x, planes: %p,%p,%p strides: %d,%d,%d, chroma: %dx%d, shift: h:%d,v:%d)\n",
|
||||
mpi->imgfmt, mpi->planes[0], mpi->planes[1], mpi->planes[2],
|
||||
mpi->stride[0], mpi->stride[1], mpi->stride[2],
|
||||
mpi->chroma_width, mpi->chroma_height, mpi->chroma_x_shift, mpi->chroma_y_shift);
|
||||
@ -566,7 +566,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
||||
}
|
||||
|
||||
|
||||
int vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts){
|
||||
int ff_vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts){
|
||||
MPContext *m= (void*)vf;
|
||||
AVFilterLink *outlink = m->avfctx->outputs[0];
|
||||
AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer));
|
||||
@ -575,7 +575,7 @@ int vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts){
|
||||
|
||||
av_assert0(vf->next);
|
||||
|
||||
av_log(m->avfctx, AV_LOG_DEBUG, "vf_next_put_image\n");
|
||||
av_log(m->avfctx, AV_LOG_DEBUG, "ff_vf_next_put_image\n");
|
||||
|
||||
if (!pic || !picref)
|
||||
goto fail;
|
||||
@ -623,7 +623,7 @@ fail:
|
||||
return 0;
|
||||
}
|
||||
|
||||
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 voflags, unsigned int outfmt){
|
||||
|
||||
@ -638,7 +638,7 @@ int vf_next_config(struct vf_instance *vf,
|
||||
//this is fatal for us ATM
|
||||
return 0;
|
||||
}
|
||||
mp_msg(MSGT_VFILTER,MSGL_V,"REQ: flags=0x%X req=0x%X \n",flags,vf->default_reqs);
|
||||
ff_mp_msg(MSGT_VFILTER,MSGL_V,"REQ: flags=0x%X req=0x%X \n",flags,vf->default_reqs);
|
||||
miss=vf->default_reqs - (flags&vf->default_reqs);
|
||||
if(miss&VFCAP_ACCEPT_STRIDE){
|
||||
// vf requires stride support but vf->next doesn't support it!
|
||||
@ -652,7 +652,7 @@ int vf_next_config(struct vf_instance *vf,
|
||||
#endif
|
||||
}
|
||||
|
||||
int vf_next_control(struct vf_instance *vf, int request, void* data){
|
||||
int ff_vf_next_control(struct vf_instance *vf, int request, void* data){
|
||||
MPContext *m= (void*)vf;
|
||||
av_log(m->avfctx, AV_LOG_DEBUG, "Received control %d\n", request);
|
||||
return 0;
|
||||
@ -705,10 +705,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
|
||||
m->vf.info= filters[i];
|
||||
|
||||
m->vf.next = &m->next_vf;
|
||||
m->vf.put_image = vf_next_put_image;
|
||||
m->vf.config = vf_next_config;
|
||||
m->vf.put_image = ff_vf_next_put_image;
|
||||
m->vf.config = ff_vf_next_config;
|
||||
m->vf.query_format= vf_default_query_format;
|
||||
m->vf.control = vf_next_control;
|
||||
m->vf.control = ff_vf_next_control;
|
||||
m->vf.default_caps=VFCAP_ACCEPT_STRIDE;
|
||||
m->vf.default_reqs=0;
|
||||
if(m->vf.info->opts)
|
||||
@ -745,10 +745,10 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||
vf_instance_t *next = vf->next;
|
||||
if(vf->uninit)
|
||||
vf->uninit(vf);
|
||||
free_mp_image(vf->imgctx.static_images[0]);
|
||||
free_mp_image(vf->imgctx.static_images[1]);
|
||||
free_mp_image(vf->imgctx.temp_images[0]);
|
||||
free_mp_image(vf->imgctx.export_images[0]);
|
||||
ff_free_mp_image(vf->imgctx.static_images[0]);
|
||||
ff_free_mp_image(vf->imgctx.static_images[1]);
|
||||
ff_free_mp_image(vf->imgctx.temp_images[0]);
|
||||
ff_free_mp_image(vf->imgctx.export_images[0]);
|
||||
vf = next;
|
||||
}
|
||||
}
|
||||
@ -841,13 +841,13 @@ static int end_frame(AVFilterLink *inlink)
|
||||
AVFilterBufferRef *inpic = inlink->cur_buf;
|
||||
int i;
|
||||
double pts= MP_NOPTS_VALUE;
|
||||
mp_image_t* mpi = new_mp_image(inpic->video->w, inpic->video->h);
|
||||
mp_image_t* mpi = ff_new_mp_image(inpic->video->w, inpic->video->h);
|
||||
|
||||
if(inpic->pts != AV_NOPTS_VALUE)
|
||||
pts= inpic->pts / av_q2d(inlink->time_base);
|
||||
|
||||
for(i=0; conversion_map[i].fmt && conversion_map[i].pix_fmt != inlink->format; i++);
|
||||
mp_image_setfmt(mpi,conversion_map[i].fmt);
|
||||
ff_mp_image_setfmt(mpi,conversion_map[i].fmt);
|
||||
|
||||
memcpy(mpi->planes, inpic->data, FFMIN(sizeof(inpic->data) , sizeof(mpi->planes)));
|
||||
memcpy(mpi->stride, inpic->linesize, FFMIN(sizeof(inpic->linesize), sizeof(mpi->stride)));
|
||||
@ -861,7 +861,7 @@ static int end_frame(AVFilterLink *inlink)
|
||||
if(m->vf.put_image(&m->vf, mpi, pts) == 0){
|
||||
av_log(m->avfctx, AV_LOG_DEBUG, "put_image() says skip\n");
|
||||
}
|
||||
free_mp_image(mpi);
|
||||
ff_free_mp_image(mpi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user