From 1888e57af7e1ce51517ad9bdc2d201eaf84a98d2 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 29 May 2010 17:15:55 +0300 Subject: [PATCH] cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf" Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun. --- DOCS/tech/libmpcodecs.txt | 20 ++++++++++---------- command.c | 2 +- libmenu/vf_menu.c | 12 ++++++------ libmpcodecs/ad_liba52.c | 6 ++++-- libmpcodecs/ad_pcm.c | 8 ++++---- libmpcodecs/vd_ffmpeg.c | 3 ++- libmpcodecs/ve_lavc.c | 14 +++++++------- libmpcodecs/ve_libdv.c | 8 ++++---- libmpcodecs/ve_nuv.c | 10 +++++----- libmpcodecs/ve_qtvideo.c | 8 ++++---- libmpcodecs/ve_vfw.c | 10 +++++----- libmpcodecs/ve_x264.c | 6 +++--- libmpcodecs/ve_xvid4.c | 10 +++++----- libmpcodecs/vf.c | 14 +++++++------- libmpcodecs/vf.h | 34 +++++++++++++++++----------------- libmpcodecs/vf_1bpp.c | 8 ++++---- libmpcodecs/vf_2xsai.c | 11 ++++++----- libmpcodecs/vf_ass.c | 20 ++++++++++---------- libmpcodecs/vf_blackframe.c | 6 +++--- libmpcodecs/vf_bmovl.c | 6 +++--- libmpcodecs/vf_boxblur.c | 6 +++--- libmpcodecs/vf_crop.c | 8 ++++---- libmpcodecs/vf_cropdetect.c | 6 +++--- libmpcodecs/vf_decimate.c | 4 ++-- libmpcodecs/vf_delogo.c | 10 +++++----- libmpcodecs/vf_denoise3d.c | 8 ++++---- libmpcodecs/vf_detc.c | 10 +++++----- libmpcodecs/vf_dint.c | 4 ++-- libmpcodecs/vf_divtc.c | 6 +++--- libmpcodecs/vf_down3dright.c | 8 ++++---- libmpcodecs/vf_dsize.c | 2 +- libmpcodecs/vf_dvbscale.c | 2 +- libmpcodecs/vf_eq.c | 8 ++++---- libmpcodecs/vf_expand.c | 22 +++++++++++----------- libmpcodecs/vf_field.c | 6 +++--- libmpcodecs/vf_fil.c | 6 +++--- libmpcodecs/vf_filmdint.c | 10 +++++----- libmpcodecs/vf_flip.c | 6 +++--- libmpcodecs/vf_format.c | 2 +- libmpcodecs/vf_framestep.c | 4 ++-- libmpcodecs/vf_fspp.c | 12 ++++++------ libmpcodecs/vf_geq.c | 14 +++++++------- libmpcodecs/vf_halfpack.c | 8 ++++---- libmpcodecs/vf_harddup.c | 6 +++--- libmpcodecs/vf_hqdn3d.c | 8 ++++---- libmpcodecs/vf_hue.c | 8 ++++---- libmpcodecs/vf_il.c | 2 +- libmpcodecs/vf_ilpack.c | 6 +++--- libmpcodecs/vf_ivtc.c | 8 ++++---- libmpcodecs/vf_kerndeint.c | 10 +++++----- libmpcodecs/vf_lavc.c | 6 +++--- libmpcodecs/vf_lavcdeint.c | 6 +++--- libmpcodecs/vf_mcdeint.c | 10 +++++----- libmpcodecs/vf_mirror.c | 2 +- libmpcodecs/vf_noformat.c | 2 +- libmpcodecs/vf_noise.c | 10 +++++----- libmpcodecs/vf_ow.c | 10 +++++----- libmpcodecs/vf_palette.c | 8 ++++---- libmpcodecs/vf_perspective.c | 8 ++++---- libmpcodecs/vf_phase.c | 4 ++-- libmpcodecs/vf_pp.c | 12 ++++++------ libmpcodecs/vf_pp7.c | 12 ++++++------ libmpcodecs/vf_pullup.c | 12 ++++++------ libmpcodecs/vf_qp.c | 8 ++++---- libmpcodecs/vf_rectangle.c | 6 +++--- libmpcodecs/vf_remove_logo.c | 8 ++++---- libmpcodecs/vf_rgb2bgr.c | 6 +++--- libmpcodecs/vf_rgbtest.c | 6 +++--- libmpcodecs/vf_rotate.c | 6 +++--- libmpcodecs/vf_sab.c | 8 ++++---- libmpcodecs/vf_scale.c | 12 ++++++------ libmpcodecs/vf_screenshot.c | 12 ++++++------ libmpcodecs/vf_smartblur.c | 8 ++++---- libmpcodecs/vf_softpulldown.c | 6 +++--- libmpcodecs/vf_softskip.c | 8 ++++---- libmpcodecs/vf_spp.c | 12 ++++++------ libmpcodecs/vf_swapuv.c | 6 +++--- libmpcodecs/vf_telecine.c | 8 ++++---- libmpcodecs/vf_test.c | 6 +++--- libmpcodecs/vf_tfields.c | 10 +++++----- libmpcodecs/vf_tile.c | 8 ++++---- libmpcodecs/vf_tinterlace.c | 8 ++++---- libmpcodecs/vf_unsharp.c | 10 +++++----- libmpcodecs/vf_uspp.c | 12 ++++++------ libmpcodecs/vf_vo.c | 20 ++++++++++---------- libmpcodecs/vf_yadif.c | 10 +++++----- libmpcodecs/vf_yuvcsp.c | 8 ++++---- libmpcodecs/vf_yvu9.c | 6 +++--- libmpcodecs/vf_zrmjpeg.c | 6 +++--- libmpdemux/demux_mkv.c | 4 ++-- libvo/vo_mpegpes.c | 3 ++- playtreeparser.h | 2 +- stream/cache2.c | 9 ++++++--- stream/stream_dvd.c | 9 ++++++--- stream/stream_vstream.c | 2 +- 95 files changed, 401 insertions(+), 390 deletions(-) diff --git a/DOCS/tech/libmpcodecs.txt b/DOCS/tech/libmpcodecs.txt index 5015f5dcc0..b7378e8f2c 100644 --- a/DOCS/tech/libmpcodecs.txt +++ b/DOCS/tech/libmpcodecs.txt @@ -153,7 +153,7 @@ vf_info_t* info; const char *name; // short name of the filter, must be FILTERNAME const char *author; // name and email/URL of the author(s) const char *comment; // comment, URL to papers describing algorithm etc. - int (*open)(struct vf_instance* vf,char* args); + int (*open)(struct vf_instance *vf,char* args); // pointer to the open() function: Sample: @@ -203,7 +203,7 @@ NOTE: All these are optional, their function pointer is either NULL or points to a default implementation. If you implement them, don't forget to set vf->FUNCNAME in your open() ! - int (*query_format)(struct vf_instance* vf, unsigned int fmt); + int (*query_format)(struct vf_instance *vf, unsigned int fmt); The query_format() function is called one or more times before the config(), to find out the capabilities and/or support status of a given colorspace (fmt). @@ -216,7 +216,7 @@ next filter will accept at least one of your possible output colorspaces! Sample: -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt){ case IMGFMT_YV12: @@ -232,7 +232,7 @@ For the more complex case, when you have an N -> M colorspace mapping matrix, see vf_scale or vf_rgb2bgr for examples. - int (*config)(struct vf_instance* vf, + int (*config)(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt); @@ -257,7 +257,7 @@ Its parameters are already well-known from libvo: Sample: -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -272,12 +272,12 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,vf->priv->w,vf->priv->h,d_width,d_height,flags,outfmt); } - void (*uninit)(struct vf_instance* vf); + void (*uninit)(struct vf_instance *vf); Okay, uninit() is the simplest, it's called at the end. You can free your private buffers etc here. - int (*put_image)(struct vf_instance* vf, mp_image_t *mpi); + int (*put_image)(struct vf_instance *vf, mp_image_t *mpi); Ah, put_image(). This is the main filter function, it should convert/filter/ transform the image data from one format/size/color/whatever to another. @@ -332,7 +332,7 @@ image: Ok, the rest is for advanced functionality only: - int (*control)(struct vf_instance* vf, int request, void* data); + int (*control)(struct vf_instance *vf, int request, void* data); You can control the filter at runtime from MPlayer/MEncoder/dec_video: #define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */ @@ -343,7 +343,7 @@ You can control the filter at runtime from MPlayer/MEncoder/dec_video: #define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */ - void (*get_image)(struct vf_instance* vf, mp_image_t *mpi); + void (*get_image)(struct vf_instance *vf, mp_image_t *mpi); This is for direct rendering support, works the same way as in libvo drivers. It makes in-place pixel modifications possible. @@ -359,7 +359,7 @@ order, while put_image is called for display) so the only safe place to save it is in the mpi struct itself: mpi->priv=(void*)dmpi; - void (*draw_slice)(struct vf_instance* vf, unsigned char** src, + void (*draw_slice)(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y); It's the good old draw_slice callback, already known from libvo. diff --git a/command.c b/command.c index 8bb5958145..8c3ad5d778 100644 --- a/command.c +++ b/command.c @@ -2433,7 +2433,7 @@ static struct { static int set_property_command(MPContext *mpctx, mp_cmd_t *cmd) { int i, r; - m_option_t* prop; + m_option_t *prop; const char *pname; // look for the command diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c index 336261d233..d068c39e5b 100644 --- a/libmenu/vf_menu.c +++ b/libmenu/vf_menu.c @@ -53,9 +53,9 @@ struct vf_priv_s { int passthrough; }; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts); +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts); -void vf_menu_pause_update(struct vf_instance* vf) { +void vf_menu_pause_update(struct vf_instance *vf) { const struct vo *video_out = mpctx_get_video_out(vf->priv->current->ctx); if(pause_mpi) { put_image(vf,pause_mpi, MP_NOPTS_VALUE); @@ -121,7 +121,7 @@ static int cmd_filter(mp_cmd_t* cmd, void *ctx) return 0; } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +static void get_image(struct vf_instance *vf, mp_image_t *mpi){ mp_image_t *dmpi; if(mpi->type == MP_IMGTYPE_TEMP && (!(mpi->flags&MP_IMGFLAG_PRESERVE)) ) { @@ -138,7 +138,7 @@ static int key_cb(int code) { return menu_read_key(st_priv->current,code); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi = NULL; if (vf->priv->passthrough) { @@ -214,7 +214,7 @@ static void uninit(vf_instance_t *vf) { } } -static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { #ifdef CONFIG_FREETYPE // here is the right place to get screen dimensions @@ -228,7 +228,7 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ return vf_next_query_format(vf, fmt); } diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c index fd258e12f9..aef29b1e13 100644 --- a/libmpcodecs/ad_liba52.c +++ b/libmpcodecs/ad_liba52.c @@ -73,7 +73,8 @@ static const ad_info_t info = LIBAD_EXTERN(liba52) -static int a52_fillbuff(sh_audio_t *sh_audio){ +static int a52_fillbuff(sh_audio_t *sh_audio) +{ int length=0; int flags=0; int sample_rate=0; @@ -137,7 +138,8 @@ int channels=0; return (flags&A52_LFE) ? (channels+1) : channels; } -static sample_t dynrng_call (sample_t c, void *data) { +static sample_t dynrng_call (sample_t c, void *data) +{ // fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, (double)a52_drc_level, (double)pow((double)c, a52_drc_level)); return pow((double)c, a52_drc_level); } diff --git a/libmpcodecs/ad_pcm.c b/libmpcodecs/ad_pcm.c index 060d95d437..29e78d69af 100644 --- a/libmpcodecs/ad_pcm.c +++ b/libmpcodecs/ad_pcm.c @@ -127,18 +127,18 @@ static int init(sh_audio_t * sh_audio) return 1; } -static int preinit(sh_audio_t * sh) +static int preinit(sh_audio_t *sh) { sh->audio_out_minsize = 2048; return 1; } -static void uninit(sh_audio_t * sh) +static void uninit(sh_audio_t *sh) { talloc_free(sh->context); } -static int control(sh_audio_t * sh, int cmd, void *arg, ...) +static int control(sh_audio_t *sh, int cmd, void *arg, ...) { struct ad_pcm_context *ctx = sh->context; int skip; @@ -155,7 +155,7 @@ static int control(sh_audio_t * sh, int cmd, void *arg, ...) return CONTROL_UNKNOWN; } -static int decode_audio(sh_audio_t * sh_audio, unsigned char *buf, int minlen, +static int decode_audio(sh_audio_t *sh_audio, unsigned char *buf, int minlen, int maxlen) { int len = sh_audio->channels * sh_audio->samplesize; diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index d6b5a82ccd..6bee762ed2 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -707,7 +707,8 @@ typedef struct dp_hdr_s { uint32_t chunktab; // offset to chunk offset array } dp_hdr_t; -static void swap_palette(void *pal) { +static void swap_palette(void *pal) +{ int i; uint32_t *p = pal; for (i = 0; i < AVPALETTE_COUNT; i++) diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index febfa04a45..4cd7cd778d 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -342,9 +342,9 @@ struct vf_priv_s { #define mux_v (vf->priv->mux) #define lavc_venc_context (vf->priv->context) -static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts); +static int encode_frame(struct vf_instance *vf, AVFrame *pic, double pts); -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int size, i; @@ -713,7 +713,7 @@ static int config(struct vf_instance* vf, return 1; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ switch(request){ case VFCTRL_FLUSH_FRAMES: @@ -725,7 +725,7 @@ static int control(struct vf_instance* vf, int request, void* data){ } } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_IYUV: @@ -762,7 +762,7 @@ static double psnr(double d){ return -10.0*log(d)/log(10); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ AVFrame *pic= vf->priv->pic; pic->data[0]=mpi->planes[0]; @@ -785,7 +785,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return encode_frame(vf, pic, pts) >= 0; } -static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts){ +static int encode_frame(struct vf_instance *vf, AVFrame *pic, double pts){ const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'}; int out_size; double dts; @@ -890,7 +890,7 @@ static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts){ return out_size; } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(lavc_param_psnr){ double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0; diff --git a/libmpcodecs/ve_libdv.c b/libmpcodecs/ve_libdv.c index 0e611fa7a0..f1e265398e 100644 --- a/libmpcodecs/ve_libdv.c +++ b/libmpcodecs/ve_libdv.c @@ -55,7 +55,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -77,18 +77,18 @@ static int config(struct vf_instance* vf, return 1; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ return CONTROL_UNKNOWN; } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt==IMGFMT_YUY2) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; if(fmt==IMGFMT_RGB24) return VFCAP_CSP_SUPPORTED; return 0; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ dv_encode_full_frame(vf->priv->enc, mpi->planes, (mpi->flags&MP_IMGFLAG_YUV) ? e_dv_color_yuv : e_dv_color_rgb, diff --git a/libmpcodecs/ve_nuv.c b/libmpcodecs/ve_nuv.c index 83c848ffa1..9fe25d4154 100644 --- a/libmpcodecs/ve_nuv.c +++ b/libmpcodecs/ve_nuv.c @@ -88,7 +88,7 @@ const m_option_t nuvopts_conf[] = { #define COMPDATASIZE (128*4) #define FRAMEHEADERSIZE 12 -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -110,17 +110,17 @@ static int config(struct vf_instance* vf, return 1; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ return CONTROL_UNKNOWN; } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt==IMGFMT_I420) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; return 0; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ uint8_t *header = vf->priv->buffer; uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE; uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE; @@ -201,7 +201,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return 1; } -static void uninit(struct vf_instance* vf) { +static void uninit(struct vf_instance *vf) { if(vf->priv->buffer) free(vf->priv->buffer); diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c index f3bba153e4..a6773e31ca 100644 --- a/libmpcodecs/ve_qtvideo.c +++ b/libmpcodecs/ve_qtvideo.c @@ -139,7 +139,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ // OSErr cres; @@ -177,19 +177,19 @@ static int config(struct vf_instance* vf, return 1; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ return CONTROL_UNKNOWN; } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt==IMGFMT_YUY2) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; return 0; } static int codec_initialized = 0; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ OSErr cres; long framesizemax; diff --git a/libmpcodecs/ve_vfw.c b/libmpcodecs/ve_vfw.c index 40a6d6ea0b..2825502293 100644 --- a/libmpcodecs/ve_vfw.c +++ b/libmpcodecs/ve_vfw.c @@ -274,7 +274,7 @@ static int vfw_encode_frame(BITMAPINFOHEADER* biOutput,void* OutBuf, #define mux_v (vf->priv->mux) #define vfw_bih (vf->priv->bih) -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -292,17 +292,17 @@ static int config(struct vf_instance* vf, return 1; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ return CONTROL_UNKNOWN; } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt==IMGFMT_BGR24) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIPPED; return 0; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ long flags=0; int ret; // flip_upside_down(vo_image_ptr,vo_image_ptr,3*vo_w,vo_h); // dirty hack @@ -313,7 +313,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return 1; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { HRESULT ret; diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 4a84f8dead..c14b71ab55 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -135,7 +135,7 @@ void x264enc_set_param(const m_option_t* opt, char* arg) } } -static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { h264_module_t *mod=(h264_module_t*)vf->priv; if(parse_error) @@ -195,7 +195,7 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in return 1; } -static int control(struct vf_instance* vf, int request, void *data) +static int control(struct vf_instance *vf, int request, void *data) { h264_module_t *mod=(h264_module_t*)vf->priv; switch(request){ @@ -208,7 +208,7 @@ static int control(struct vf_instance* vf, int request, void *data) } } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt) { case IMGFMT_I420: diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c index d724765ce5..fc6aa2d23b 100644 --- a/libmpcodecs/ve_xvid4.c +++ b/libmpcodecs/ve_xvid4.c @@ -374,7 +374,7 @@ static const char *errorstring(int err); *==========================================================================*/ static int -config(struct vf_instance* vf, +config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -439,7 +439,7 @@ config(struct vf_instance* vf, *==========================================================================*/ static void -uninit(struct vf_instance* vf) +uninit(struct vf_instance *vf) { xvid_mplayer_module_t *mod = (xvid_mplayer_module_t *)vf->priv; @@ -477,7 +477,7 @@ uninit(struct vf_instance* vf) *==========================================================================*/ static int -control(struct vf_instance* vf, int request, void* data) +control(struct vf_instance *vf, int request, void* data) { xvid_mplayer_module_t *mod = (xvid_mplayer_module_t *)vf->priv; @@ -495,7 +495,7 @@ xvid_mplayer_module_t *mod = (xvid_mplayer_module_t *)vf->priv; *==========================================================================*/ static int -query_format(struct vf_instance* vf, unsigned int fmt) +query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt){ case IMGFMT_YV12: @@ -514,7 +514,7 @@ query_format(struct vf_instance* vf, unsigned int fmt) *==========================================================================*/ static int -put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { int size; xvid_enc_stats_t stats; diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index 0f2dcc75d2..98688793e8 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -435,7 +435,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, //============================================================================ // By default vf doesn't accept MPEGPES -static int vf_default_query_format(struct vf_instance* vf, unsigned int fmt){ +static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt == IMGFMT_MPEGPES) return 0; return vf_next_query_format(vf,fmt); } @@ -631,7 +631,7 @@ int vf_output_queued_frame(vf_instance_t *vf) * are unchanged, and returns either success or error. * */ -int vf_config_wrapper(struct vf_instance* vf, +int vf_config_wrapper(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -654,7 +654,7 @@ int vf_config_wrapper(struct vf_instance* vf, return r; } -int vf_next_config(struct vf_instance* vf, +int vf_next_config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int voflags, unsigned int outfmt){ struct MPOpts *opts = vf->opts; @@ -687,21 +687,21 @@ int vf_next_config(struct vf_instance* vf, return vf_config_wrapper(vf->next,width,height,d_width,d_height,voflags,outfmt); } -int vf_next_control(struct vf_instance* vf, int request, void* data){ +int vf_next_control(struct vf_instance *vf, int request, void* data){ return vf->next->control(vf->next,request,data); } -int vf_next_query_format(struct vf_instance* vf, unsigned int fmt){ +int vf_next_query_format(struct vf_instance *vf, unsigned int fmt){ int flags=vf->next->query_format(vf->next,fmt); if(flags) flags|=vf->default_caps; return flags; } -int vf_next_put_image(struct vf_instance* vf,mp_image_t *mpi, double pts){ +int vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts){ return vf->next->put_image(vf->next,mpi, pts); } -void vf_next_draw_slice(struct vf_instance* vf,unsigned char** src, int * stride,int w, int h, int x, int y){ +void 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; diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h index e7293672a2..89874e7162 100644 --- a/libmpcodecs/vf.h +++ b/libmpcodecs/vf.h @@ -30,7 +30,7 @@ typedef struct vf_info_s { const char *name; const char *author; const char *comment; - int (*vf_open)(struct vf_instance* vf,char* args); + int (*vf_open)(struct vf_instance *vf,char* args); // Ptr to a struct dscribing the options const void* opts; } vf_info_t; @@ -53,24 +53,24 @@ typedef struct vf_format_context_t { typedef struct vf_instance { const vf_info_t* info; // funcs: - int (*config)(struct vf_instance* vf, + int (*config)(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt); - int (*control)(struct vf_instance* vf, + int (*control)(struct vf_instance *vf, int request, void* data); - int (*query_format)(struct vf_instance* vf, + int (*query_format)(struct vf_instance *vf, unsigned int fmt); - void (*get_image)(struct vf_instance* vf, + void (*get_image)(struct vf_instance *vf, mp_image_t *mpi); - int (*put_image)(struct vf_instance* vf, + int (*put_image)(struct vf_instance *vf, mp_image_t *mpi, double pts); - void (*start_slice)(struct vf_instance* vf, + void (*start_slice)(struct vf_instance *vf, mp_image_t *mpi); - void (*draw_slice)(struct vf_instance* vf, + void (*draw_slice)(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y); - void (*uninit)(struct vf_instance* vf); + void (*uninit)(struct vf_instance *vf); - int (*continue_buffered_image)(struct vf_instance* vf); + int (*continue_buffered_image)(struct vf_instance *vf); // caps: unsigned int default_caps; // used by default query_format() unsigned int default_reqs; // used by default config() @@ -78,7 +78,7 @@ typedef struct vf_instance { int w, h; vf_image_context_t imgctx; vf_format_context_t fmt; - struct vf_instance* next; + struct vf_instance *next; mp_image_t *dmpi; struct vf_priv_s* priv; struct MPOpts *opts; @@ -139,13 +139,13 @@ void vf_queue_frame(vf_instance_t *vf, int (*)(vf_instance_t *)); int vf_output_queued_frame(vf_instance_t *vf); // default wrappers: -int vf_next_config(struct vf_instance* vf, +int 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); -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 vf_next_control(struct vf_instance *vf, int request, void* data); +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); struct m_obj_settings; vf_instance_t* append_filters(vf_instance_t* last, struct m_obj_settings *vf_settings); @@ -153,7 +153,7 @@ vf_instance_t* append_filters(vf_instance_t* last, struct m_obj_settings *vf_set void vf_uninit_filter(vf_instance_t* vf); void vf_uninit_filter_chain(vf_instance_t* vf); -int vf_config_wrapper(struct vf_instance* vf, +int vf_config_wrapper(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt); diff --git a/libmpcodecs/vf_1bpp.c b/libmpcodecs/vf_1bpp.c index 915411e96f..8d13735942 100644 --- a/libmpcodecs/vf_1bpp.c +++ b/libmpcodecs/vf_1bpp.c @@ -60,7 +60,7 @@ static const unsigned int bgr_list[]={ 0 }; -static unsigned int find_best(struct vf_instance* vf){ +static unsigned int find_best(struct vf_instance *vf){ unsigned int best=0; int ret; const unsigned int* p=bgr_list; @@ -80,7 +80,7 @@ struct vf_priv_s { unsigned int fmt; }; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ if (!vf->priv->fmt) @@ -123,7 +123,7 @@ static void convert(mp_image_t *mpi, mp_image_t *dmpi, int value0, int value1,in } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; // hope we'll get DR buffer: @@ -178,7 +178,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ int best; if(fmt!=IMGFMT_RGB1 && fmt!=IMGFMT_BGR1) return 0; best=find_best(vf); diff --git a/libmpcodecs/vf_2xsai.c b/libmpcodecs/vf_2xsai.c index fad52077e6..dc33d9fccf 100644 --- a/libmpcodecs/vf_2xsai.c +++ b/libmpcodecs/vf_2xsai.c @@ -96,8 +96,9 @@ static int Init_2xSaI(int d) static void Super2xSaI_ex(uint8_t *src, uint32_t src_pitch, - uint8_t *dst, uint32_t dst_pitch, - uint32_t width, uint32_t height, int sbpp) { + uint8_t *dst, uint32_t dst_pitch, + uint32_t width, uint32_t height, int sbpp) +{ unsigned int x, y; uint32_t color[16]; @@ -280,7 +281,7 @@ static void Super2xSaI_ex(uint8_t *src, uint32_t src_pitch, //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -289,7 +290,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,2*width,2*height,2*d_width,2*d_height,flags,outfmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; // hope we'll get DR buffer: @@ -306,7 +307,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ // case IMGFMT_BGR15: // case IMGFMT_BGR16: diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c index d28495d65f..0af76a7ee0 100644 --- a/libmpcodecs/vf_ass.c +++ b/libmpcodecs/vf_ass.c @@ -74,7 +74,7 @@ extern ASS_Track *ass_track; extern float sub_delay; extern int sub_visibility; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -101,7 +101,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf, vf->priv->outw, vf->priv->outh, d_width, d_height, flags, outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi) +static void get_image(struct vf_instance *vf, mp_image_t *mpi) { if(mpi->type == MP_IMGTYPE_IPB) return; if(mpi->flags & MP_IMGFLAG_PRESERVE) return; @@ -160,7 +160,7 @@ static void blank(mp_image_t *mpi, int y1, int y2) } } -static int prepare_image(struct vf_instance* vf, mp_image_t *mpi) +static int prepare_image(struct vf_instance *vf, mp_image_t *mpi) { if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){ vf->dmpi = mpi->priv; @@ -224,7 +224,7 @@ static void update_limits(struct vf_instance *vf, int starty, int endy, /** * \brief Copy specified rows from render_context.dmpi to render_context.planes, upsampling to 4:4:4 */ -static void copy_from_image(struct vf_instance* vf) +static void copy_from_image(struct vf_instance *vf) { int pl; @@ -253,7 +253,7 @@ static void copy_from_image(struct vf_instance* vf) /** * \brief Copy all previously copied rows back to render_context.dmpi */ -static void copy_to_image(struct vf_instance* vf) +static void copy_to_image(struct vf_instance *vf) { int pl; int i, j; @@ -280,7 +280,7 @@ static void copy_to_image(struct vf_instance* vf) } } -static void my_draw_bitmap(struct vf_instance* vf, unsigned char* bitmap, int bitmap_w, int bitmap_h, int stride, int dst_x, int dst_y, unsigned color) +static void my_draw_bitmap(struct vf_instance *vf, unsigned char* bitmap, int bitmap_w, int bitmap_h, int stride, int dst_x, int dst_y, unsigned color) { unsigned char y = rgba2y(color); unsigned char u = rgba2u(color); @@ -308,7 +308,7 @@ static void my_draw_bitmap(struct vf_instance* vf, unsigned char* bitmap, int bi } } -static int render_frame(struct vf_instance* vf, mp_image_t *mpi, const ASS_Image *img) +static int render_frame(struct vf_instance *vf, mp_image_t *mpi, const ASS_Image *img) { if (img) { for (int i = 0; i < (vf->priv->outh + 1) / 2; i++) @@ -326,7 +326,7 @@ static int render_frame(struct vf_instance* vf, mp_image_t *mpi, const ASS_Image return 0; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { ASS_Image* images = 0; if (sub_visibility && vf->priv->ass_priv && ass_track && (pts != MP_NOPTS_VALUE)) @@ -338,7 +338,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf, vf->dmpi, pts); } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt){ case IMGFMT_YV12: @@ -364,7 +364,7 @@ static int control(vf_instance_t *vf, int request, void *data) return vf_next_control(vf, request, data); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { if (vf->priv->ass_priv) ass_renderer_done(vf->priv->ass_priv); diff --git a/libmpcodecs/vf_blackframe.c b/libmpcodecs/vf_blackframe.c index 40a327e787..1b00e9907f 100644 --- a/libmpcodecs/vf_blackframe.c +++ b/libmpcodecs/vf_blackframe.c @@ -40,7 +40,7 @@ struct vf_priv_s { unsigned int bamount, bthresh, frame, lastkeyframe; }; -static int config(struct vf_instance* vf, int width, int height, int d_width, +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); } @@ -66,7 +66,7 @@ static int query_format(struct vf_instance *vf, unsigned fmt) { return 0; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int x, y; int nblack=0, pblack=0; @@ -110,7 +110,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf, dmpi, pts); } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ return vf_next_control(vf,request,data); } diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c index 073470e11e..3b46e1ebcc 100644 --- a/libmpcodecs/vf_bmovl.c +++ b/libmpcodecs/vf_bmovl.c @@ -125,14 +125,14 @@ struct vf_priv_s { }; static int -query_format(struct vf_instance* vf, unsigned int fmt){ +query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt==IMGFMT_YV12) return VFCAP_CSP_SUPPORTED; return 0; } static int -config(struct vf_instance* vf, +config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -214,7 +214,7 @@ _read_cmd(int fd, char *cmd, char *args) { static int -put_image(struct vf_instance* vf, mp_image_t* mpi, double pts){ +put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ int buf_x=0, buf_y=0, buf_pos=0; int have, got, want; int xpos=0, ypos=0, pos=0; diff --git a/libmpcodecs/vf_boxblur.c b/libmpcodecs/vf_boxblur.c index 0693b59e06..cc15efccf4 100644 --- a/libmpcodecs/vf_boxblur.c +++ b/libmpcodecs/vf_boxblur.c @@ -46,7 +46,7 @@ struct vf_priv_s { /***************************************************************************/ -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -127,7 +127,7 @@ static void vBlur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int s } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; @@ -156,7 +156,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_crop.c b/libmpcodecs/vf_crop.c index 17db370837..c4e0b4253b 100644 --- a/libmpcodecs/vf_crop.c +++ b/libmpcodecs/vf_crop.c @@ -41,7 +41,7 @@ static const struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ struct MPOpts *opts = vf->opts; @@ -84,7 +84,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,vf->priv->crop_w,vf->priv->crop_h,d_width,d_height,flags,outfmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if (mpi->flags&MP_IMGFLAG_DRAW_CALLBACK) return vf_next_put_image(vf,vf->dmpi, pts); @@ -111,12 +111,12 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void start_slice(struct vf_instance* vf, mp_image_t *mpi){ +static void start_slice(struct vf_instance *vf, mp_image_t *mpi){ vf->dmpi = vf_get_image(vf->next, mpi->imgfmt, mpi->type, mpi->flags, vf->priv->crop_w, vf->priv->crop_h); } -static void draw_slice(struct vf_instance* vf, +static void draw_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y){ unsigned char *src2[3]; src2[0] = src[0]; diff --git a/libmpcodecs/vf_cropdetect.c b/libmpcodecs/vf_cropdetect.c index b671ec804f..2401db19d4 100644 --- a/libmpcodecs/vf_cropdetect.c +++ b/libmpcodecs/vf_cropdetect.c @@ -60,7 +60,7 @@ static int checkline(unsigned char* src,int stride,int len,int bpp){ //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ vf->priv->x1=width - 1; @@ -71,7 +71,7 @@ static int config(struct vf_instance* vf, return 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){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int bpp=mpi->bpp/8; int w,h,x,y,shrink_by; @@ -163,7 +163,7 @@ if(++vf->priv->fno>0){ // ignore first 2 frames - they may be empty return vf_next_put_image(vf,dmpi, pts); } -static int query_format(struct vf_instance* vf, unsigned int fmt) { +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt) { // the default limit value works only right with YV12 right now. case IMGFMT_YV12: diff --git a/libmpcodecs/vf_decimate.c b/libmpcodecs/vf_decimate.c index 01c061518a..4ee78b420b 100644 --- a/libmpcodecs/vf_decimate.c +++ b/libmpcodecs/vf_decimate.c @@ -128,7 +128,7 @@ static int diff_to_drop(int hi, int lo, float frac, mp_image_t *old, mp_image_t new->w*(new->bpp/8), new->h, old->stride[0], new->stride[0]); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -164,7 +164,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf, dmpi, pts); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_delogo.c b/libmpcodecs/vf_delogo.c index 9e59b553a2..342c88ee59 100644 --- a/libmpcodecs/vf_delogo.c +++ b/libmpcodecs/vf_delogo.c @@ -117,7 +117,7 @@ static void delogo(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int } } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -125,7 +125,7 @@ static int config(struct vf_instance* vf, } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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): @@ -143,7 +143,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -169,7 +169,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; free(vf->priv); @@ -178,7 +178,7 @@ static void uninit(struct vf_instance* vf){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_denoise3d.c b/libmpcodecs/vf_denoise3d.c index 7e7e6ef288..d18b8cb125 100644 --- a/libmpcodecs/vf_denoise3d.c +++ b/libmpcodecs/vf_denoise3d.c @@ -45,7 +45,7 @@ struct vf_priv_s { /***************************************************************************/ -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -58,7 +58,7 @@ static int config(struct vf_instance* vf, } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv->Line); } @@ -109,7 +109,7 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x] -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; int W = mpi->w, H = mpi->h; @@ -147,7 +147,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_detc.c b/libmpcodecs/vf_detc.c index 2ae1b0436d..cf294ac7f7 100644 --- a/libmpcodecs/vf_detc.c +++ b/libmpcodecs/vf_detc.c @@ -285,7 +285,7 @@ static void copy_image(mp_image_t *dmpi, mp_image_t *mpi, int field) } } -static int do_put_image(struct vf_instance* vf, mp_image_t *dmpi) +static int do_put_image(struct vf_instance *vf, mp_image_t *dmpi) { struct vf_priv_s *p = vf->priv; int dropflag; @@ -313,7 +313,7 @@ static int do_put_image(struct vf_instance* vf, mp_image_t *dmpi) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { int ret=0; mp_image_t *dmpi; @@ -357,7 +357,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return ret; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - figure out which other formats work */ switch (fmt) { @@ -369,14 +369,14 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int config(struct vf_instance* vf, +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); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_dint.c b/libmpcodecs/vf_dint.c index 75cd42690d..f5fc88e328 100644 --- a/libmpcodecs/vf_dint.c +++ b/libmpcodecs/vf_dint.c @@ -42,7 +42,7 @@ struct vf_priv_s { #define MAXROWSIZE 1200 -static int config (struct vf_instance* vf, +static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -79,7 +79,7 @@ static int config (struct vf_instance* vf, return 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) +static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts) { char rrow0[MAXROWSIZE]; char rrow1[MAXROWSIZE]; diff --git a/libmpcodecs/vf_divtc.c b/libmpcodecs/vf_divtc.c index aaf091534b..d632a4c60d 100644 --- a/libmpcodecs/vf_divtc.c +++ b/libmpcodecs/vf_divtc.c @@ -257,7 +257,7 @@ static int match(struct vf_priv_s *p, int *diffs, return m; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi, *tmpi=0; int n, m, f, newphase; @@ -568,7 +568,7 @@ static int analyze(struct vf_priv_s *p) return 1; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt) { @@ -583,7 +583,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { if(vf->priv) { diff --git a/libmpcodecs/vf_down3dright.c b/libmpcodecs/vf_down3dright.c index 3246ccb9f8..1119618e78 100644 --- a/libmpcodecs/vf_down3dright.c +++ b/libmpcodecs/vf_down3dright.c @@ -96,7 +96,7 @@ static void toright(unsigned char *dst[3], unsigned char *src[3], } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -113,7 +113,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf,dmpi, pts); } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -123,7 +123,7 @@ static int config(struct vf_instance* vf, } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - really any YUV 4:2:0 input format should work */ switch (fmt) { @@ -135,7 +135,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_dsize.c b/libmpcodecs/vf_dsize.c index e4c519389a..3010878d61 100644 --- a/libmpcodecs/vf_dsize.c +++ b/libmpcodecs/vf_dsize.c @@ -35,7 +35,7 @@ struct vf_priv_s { float aspect; }; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { diff --git a/libmpcodecs/vf_dvbscale.c b/libmpcodecs/vf_dvbscale.c index f7c95015a2..00c54ccbdf 100644 --- a/libmpcodecs/vf_dvbscale.c +++ b/libmpcodecs/vf_dvbscale.c @@ -34,7 +34,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ diff --git a/libmpcodecs/vf_eq.c b/libmpcodecs/vf_eq.c index 167cf28074..1cbffb24eb 100644 --- a/libmpcodecs/vf_eq.c +++ b/libmpcodecs/vf_eq.c @@ -132,7 +132,7 @@ static void (*process)(unsigned char *dest, int dstride, unsigned char *src, int /* FIXME: add packed yuv version of process */ -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -161,7 +161,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf,dmpi, pts); } -static int control(struct vf_instance* vf, int request, void* data) +static int control(struct vf_instance *vf, int request, void* data) { vf_equalizer_t *eq; @@ -192,7 +192,7 @@ static int control(struct vf_instance* vf, int request, void* data) return vf_next_control(vf, request, data); } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch (fmt) { case IMGFMT_YVU9: @@ -213,7 +213,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { if (vf->priv->buf) free(vf->priv->buf); free(vf->priv); diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index 683ed633fe..57226acb93 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -75,7 +75,7 @@ static struct vf_priv_s { //===========================================================================// #ifdef OSD_SUPPORT -static struct vf_instance* vf=NULL; // fixme (needs sub.c changes) +static struct vf_instance *vf=NULL; // fixme (needs sub.c changes) static int orig_w,orig_h; static void remove_func_2(int x0,int y0, int w,int h){ @@ -185,7 +185,7 @@ static void draw_func(void *ctx, int x0,int y0, int w,int h,unsigned char* src, } } -static void draw_osd(struct vf_instance* vf_,int w,int h){ +static void draw_osd(struct vf_instance *vf_,int w,int h){ vf=vf_;orig_w=w;orig_h=h; // printf("======================================\n"); if(vf->priv->exp_w!=w || vf->priv->exp_h!=h || @@ -216,7 +216,7 @@ static void draw_osd(struct vf_instance* vf_,int w,int h){ #endif //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -273,7 +273,7 @@ static int config(struct vf_instance* vf, // codec -copy-> expand --DR--> vo // codec -copy-> expand -copy-> vo (worst case) -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +static void get_image(struct vf_instance *vf, mp_image_t *mpi){ // if(mpi->type==MP_IMGTYPE_IPB) return; // not yet working #ifdef OSD_SUPPORT if(vf->priv->osd_enabled && (mpi->flags&MP_IMGFLAG_PRESERVE)){ @@ -318,7 +318,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ } } -static void start_slice(struct vf_instance* vf, mp_image_t *mpi){ +static void start_slice(struct vf_instance *vf, mp_image_t *mpi){ // printf("start_slice called! flag=%d\n",mpi->flags&MP_IMGFLAG_DRAW_CALLBACK); if(!vf->next->draw_slice){ mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK; @@ -336,7 +336,7 @@ static void start_slice(struct vf_instance* vf, mp_image_t *mpi){ vf->priv->first_slice = 1; } -static void draw_top_blackbar_slice(struct vf_instance* vf, +static void draw_top_blackbar_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y){ if(vf->priv->exp_y>0 && y == 0) { vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, @@ -345,7 +345,7 @@ static void draw_top_blackbar_slice(struct vf_instance* vf, } -static void draw_bottom_blackbar_slice(struct vf_instance* vf, +static void draw_bottom_blackbar_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y){ if(vf->priv->exp_y+vf->hdmpi->h && y+h == vf->h) { unsigned char *src2[MP_MAX_PLANES]; @@ -365,7 +365,7 @@ static void draw_bottom_blackbar_slice(struct vf_instance* vf, } } -static void draw_slice(struct vf_instance* vf, +static void draw_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y){ // printf("draw_slice() called %d at %d\n",h,y); @@ -388,7 +388,7 @@ static void draw_slice(struct vf_instance* vf, vf->priv->first_slice = 0; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ if (vf->priv->passthrough) { mp_image_t *dmpi = vf_get_image(vf->next, IMGFMT_MPEGPES, MP_IMGTYPE_EXPORT, 0, mpi->w, mpi->h); @@ -443,7 +443,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ #ifdef OSD_SUPPORT switch(request){ case VFCTRL_SET_OSD_OBJ: @@ -461,7 +461,7 @@ static int control(struct vf_instance* vf, int request, void* data){ return vf_next_control(vf,request,data); } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ return vf_next_query_format(vf,fmt); } diff --git a/libmpcodecs/vf_field.c b/libmpcodecs/vf_field.c index b58fb206f2..f9cb06aded 100644 --- a/libmpcodecs/vf_field.c +++ b/libmpcodecs/vf_field.c @@ -32,13 +32,13 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +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/2,d_width,d_height,flags,outfmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE, mpi->width, mpi->height/2); @@ -61,7 +61,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_fil.c b/libmpcodecs/vf_fil.c index 4b935cbd04..fb04f9504b 100644 --- a/libmpcodecs/vf_fil.c +++ b/libmpcodecs/vf_fil.c @@ -35,7 +35,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int pixel_stride= (width+15)&~15; //FIXME this is ust a guess ... especially for non planar its somewhat bad one @@ -63,7 +63,7 @@ static int config(struct vf_instance* vf, (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){ +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); @@ -89,7 +89,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c index 24ef2d14f7..c8da011d81 100644 --- a/libmpcodecs/vf_filmdint.c +++ b/libmpcodecs/vf_filmdint.c @@ -932,7 +932,7 @@ static inline double get_time(void) return tv.tv_sec + tv.tv_usec * 1e-6; } -static void get_image(struct vf_instance* vf, mp_image_t *mpi) +static void get_image(struct vf_instance *vf, mp_image_t *mpi) { struct vf_priv_s *p = vf->priv; static unsigned char **planes, planes_idx; @@ -1136,7 +1136,7 @@ find_breaks(struct vf_priv_s *p, struct frame_stats *s) #define ITOC(X) (!(X) ? ' ' : (X) + ((X)>9 ? 'a'-10 : '0')) -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; struct vf_priv_s *p = vf->priv; @@ -1334,7 +1334,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return show_fields ? vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) : 0; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - support more formats */ switch (fmt) { @@ -1349,7 +1349,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -1395,7 +1395,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf, p->w, p->h, d_width, d_height, flags, outfmt); } -static void uninit(struct vf_instance* vf) +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, " diff --git a/libmpcodecs/vf_flip.c b/libmpcodecs/vf_flip.c index 801b4a71e3..e8660ceb51 100644 --- a/libmpcodecs/vf_flip.c +++ b/libmpcodecs/vf_flip.c @@ -30,14 +30,14 @@ //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ flags&=~VOFLAG_FLIPPING; // remove the FLIP flag return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +static void get_image(struct vf_instance *vf, mp_image_t *mpi){ if(mpi->flags&MP_IMGFLAG_ACCEPT_STRIDE){ // try full DR ! vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, @@ -59,7 +59,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){ +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... if(!(mpi->flags&MP_IMGFLAG_PLANAR)) diff --git a/libmpcodecs/vf_format.c b/libmpcodecs/vf_format.c index c420b28eb5..5a28801966 100644 --- a/libmpcodecs/vf_format.c +++ b/libmpcodecs/vf_format.c @@ -39,7 +39,7 @@ static struct vf_priv_s { //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt==vf->priv->fmt) return vf_next_query_format(vf,fmt); return 0; diff --git a/libmpcodecs/vf_framestep.c b/libmpcodecs/vf_framestep.c index 03fbcc59ef..f4ded017ae 100644 --- a/libmpcodecs/vf_framestep.c +++ b/libmpcodecs/vf_framestep.c @@ -88,7 +88,7 @@ struct vf_priv_s { }; /* Filter handler */ -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; struct vf_priv_s *priv; @@ -145,7 +145,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { /* Free private data */ free(vf->priv); diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c index 1d8850c48c..2435587a5a 100644 --- a/libmpcodecs/vf_fspp.c +++ b/libmpcodecs/vf_fspp.c @@ -485,7 +485,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, } } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -499,7 +499,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi) +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): @@ -517,7 +517,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi) mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -571,7 +571,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { if(!vf->priv) return; @@ -590,7 +590,7 @@ static void uninit(struct vf_instance* vf) //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt){ case IMGFMT_YVU9: @@ -609,7 +609,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int control(struct vf_instance* vf, int request, void* data) +static int control(struct vf_instance *vf, int request, void* data) { switch(request){ case VFCTRL_QUERY_MAX_PP_LEVEL: diff --git a/libmpcodecs/vf_geq.c b/libmpcodecs/vf_geq.c index 75749f8fa7..1b67b10203 100644 --- a/libmpcodecs/vf_geq.c +++ b/libmpcodecs/vf_geq.c @@ -42,13 +42,13 @@ struct vf_priv_s { mp_image_t *mpi; }; -static int config(struct vf_instance* vf, +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); } -static inline double getpix(struct vf_instance* vf, double x, double y, int plane){ +static inline double getpix(struct vf_instance *vf, double x, double y, int plane){ int xi, yi; mp_image_t *mpi= vf->priv->mpi; int stride= mpi->stride[plane]; @@ -66,19 +66,19 @@ static inline double getpix(struct vf_instance* vf, double x, double y, int plan //FIXME cubic interpolate //FIXME keep the last few frames -static double lum(struct vf_instance* vf, double x, double y){ +static double lum(struct vf_instance *vf, double x, double y){ return getpix(vf, x, y, 0); } -static double cb(struct vf_instance* vf, double x, double y){ +static double cb(struct vf_instance *vf, double x, double y){ return getpix(vf, x, y, 1); } -static double cr(struct vf_instance* vf, double x, double y){ +static double cr(struct vf_instance *vf, double x, double y){ return getpix(vf, x, y, 2); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int x,y, plane; @@ -127,7 +127,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; av_free(vf->priv); diff --git a/libmpcodecs/vf_halfpack.c b/libmpcodecs/vf_halfpack.c index ef36777986..5f5a49611a 100644 --- a/libmpcodecs/vf_halfpack.c +++ b/libmpcodecs/vf_halfpack.c @@ -163,7 +163,7 @@ static void (*halfpack)(unsigned char *dst, unsigned char *src[3], int dststride, int srcstride[3], int w, int h); -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { const uint8_t *src[MP_MAX_PLANES] = { mpi->planes[0] + mpi->stride[0]*vf->priv->field, @@ -190,7 +190,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf,dmpi, pts); } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -208,7 +208,7 @@ static int config(struct vf_instance* vf, } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - really any YUV 4:2:0 input format should work */ switch (fmt) { @@ -220,7 +220,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { sws_freeContext(vf->priv->ctx); free(vf->priv); diff --git a/libmpcodecs/vf_harddup.c b/libmpcodecs/vf_harddup.c index 484b5fbd75..b2b1bd6483 100644 --- a/libmpcodecs/vf_harddup.c +++ b/libmpcodecs/vf_harddup.c @@ -31,7 +31,7 @@ struct vf_priv_s { mp_image_t *last_mpi; }; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -52,7 +52,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf, dmpi, pts); } -static int control(struct vf_instance* vf, int request, void* data) +static int control(struct vf_instance *vf, int request, void* data) { switch (request) { case VFCTRL_DUPLICATE_FRAME: @@ -68,7 +68,7 @@ static int control(struct vf_instance* vf, int request, void* data) return vf_next_control(vf, request, data); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_hqdn3d.c b/libmpcodecs/vf_hqdn3d.c index 16105a0547..4e5e170085 100644 --- a/libmpcodecs/vf_hqdn3d.c +++ b/libmpcodecs/vf_hqdn3d.c @@ -44,14 +44,14 @@ struct vf_priv_s { /***************************************************************************/ -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(vf->priv->Line){free(vf->priv->Line);vf->priv->Line=NULL;} if(vf->priv->Frame[0]){free(vf->priv->Frame[0]);vf->priv->Frame[0]=NULL;} if(vf->priv->Frame[1]){free(vf->priv->Frame[1]);vf->priv->Frame[1]=NULL;} if(vf->priv->Frame[2]){free(vf->priv->Frame[2]);vf->priv->Frame[2]=NULL;} } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -202,7 +202,7 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x] } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; int W = mpi->w, H = mpi->h; @@ -237,7 +237,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_hue.c b/libmpcodecs/vf_hue.c index 4b12d7e457..221bee856d 100644 --- a/libmpcodecs/vf_hue.c +++ b/libmpcodecs/vf_hue.c @@ -76,7 +76,7 @@ static void (*process)(uint8_t *udst, uint8_t *vdst, uint8_t *usrc, uint8_t *vsr /* FIXME: add packed yuv version of process */ -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -110,7 +110,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf,dmpi, pts); } -static int control(struct vf_instance* vf, int request, void* data) +static int control(struct vf_instance *vf, int request, void* data) { vf_equalizer_t *eq; @@ -139,7 +139,7 @@ static int control(struct vf_instance* vf, int request, void* data) return vf_next_control(vf, request, data); } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch (fmt) { case IMGFMT_YVU9: @@ -156,7 +156,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { if (vf->priv->buf[0]) free(vf->priv->buf[0]); if (vf->priv->buf[1]) free(vf->priv->buf[1]); diff --git a/libmpcodecs/vf_il.c b/libmpcodecs/vf_il.c index 19c97d89a6..f209197376 100644 --- a/libmpcodecs/vf_il.c +++ b/libmpcodecs/vf_il.c @@ -73,7 +73,7 @@ static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ int w; FilterParam *luma = &vf->priv->lumaParam; FilterParam *chroma= &vf->priv->chromaParam; diff --git a/libmpcodecs/vf_ilpack.c b/libmpcodecs/vf_ilpack.c index 5987d9a150..73e7c57fbf 100644 --- a/libmpcodecs/vf_ilpack.c +++ b/libmpcodecs/vf_ilpack.c @@ -369,7 +369,7 @@ static void ilpack(unsigned char *dst, unsigned char *src[3], } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -383,7 +383,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf,dmpi, pts); } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -392,7 +392,7 @@ static int config(struct vf_instance* vf, } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - really any YUV 4:2:0 input format should work */ switch (fmt) { diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c index a391987740..5622ee03b8 100644 --- a/libmpcodecs/vf_ivtc.c +++ b/libmpcodecs/vf_ivtc.c @@ -426,7 +426,7 @@ static void copy_image(mp_image_t *dmpi, mp_image_t *mpi, int field) } } -static int do_put_image(struct vf_instance* vf, mp_image_t *dmpi) +static int do_put_image(struct vf_instance *vf, mp_image_t *dmpi) { struct vf_priv_s *p = vf->priv; int dropflag=0; @@ -455,7 +455,7 @@ static int do_put_image(struct vf_instance* vf, mp_image_t *dmpi) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { int ret=0; struct vf_priv_s *p = vf->priv; @@ -506,7 +506,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return ret; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch (fmt) { case IMGFMT_YV12: @@ -517,7 +517,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_kerndeint.c b/libmpcodecs/vf_kerndeint.c index e0a3e3097d..c6fb389f3a 100644 --- a/libmpcodecs/vf_kerndeint.c +++ b/libmpcodecs/vf_kerndeint.c @@ -47,7 +47,7 @@ struct vf_priv_s { /***************************************************************************/ -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -55,7 +55,7 @@ static int config(struct vf_instance* vf, } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } @@ -74,7 +74,7 @@ static inline int IsYUY2(mp_image_t *mpi) #define PLANAR_U 1 #define PLANAR_V 2 -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; int W = mpi->w, H = mpi->h; @@ -278,7 +278,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: @@ -289,7 +289,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ switch (request) { case VFCTRL_GET_DEINTERLACE: diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c index af5162590c..757a05cdc2 100644 --- a/libmpcodecs/vf_lavc.c +++ b/libmpcodecs/vf_lavc.c @@ -44,7 +44,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ if(vf_next_query_format(vf,IMGFMT_MPEGPES)<=0) return 0; @@ -86,7 +86,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t* dmpi; int out_size; AVFrame *pic= vf->priv->pic; @@ -119,7 +119,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: diff --git a/libmpcodecs/vf_lavcdeint.c b/libmpcodecs/vf_lavcdeint.c index 96aa6575df..8d2cca43c0 100644 --- a/libmpcodecs/vf_lavcdeint.c +++ b/libmpcodecs/vf_lavcdeint.c @@ -87,7 +87,7 @@ imgfmt_to_pixfmt (int imgfmt) static int -config (struct vf_instance* vf, +config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -113,7 +113,7 @@ config (struct vf_instance* vf, } static int -put_image (struct vf_instance* vf, mp_image_t *mpi, double pts) +put_image (struct vf_instance *vf, mp_image_t *mpi, double pts) { struct vf_priv_s *priv = vf->priv; mp_image_t* dmpi; @@ -150,7 +150,7 @@ put_image (struct vf_instance* vf, mp_image_t *mpi, double pts) static int -query_format (struct vf_instance* vf, unsigned int fmt) +query_format (struct vf_instance *vf, unsigned int fmt) { if(imgfmt_to_pixfmt(fmt) == -1) return 0; diff --git a/libmpcodecs/vf_mcdeint.c b/libmpcodecs/vf_mcdeint.c index 9bef101d42..3253d59033 100644 --- a/libmpcodecs/vf_mcdeint.c +++ b/libmpcodecs/vf_mcdeint.c @@ -173,7 +173,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int i; @@ -230,7 +230,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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): @@ -248,7 +248,7 @@ return; //caused problems, dunno why mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -267,7 +267,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; #if 0 @@ -289,7 +289,7 @@ static void uninit(struct vf_instance* vf){ } //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: diff --git a/libmpcodecs/vf_mirror.c b/libmpcodecs/vf_mirror.c index eecc186584..b48d9a2ef6 100644 --- a/libmpcodecs/vf_mirror.c +++ b/libmpcodecs/vf_mirror.c @@ -83,7 +83,7 @@ static void mirror(unsigned char* dst,unsigned char* src,int dststride,int srcst //===========================================================================// -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; // hope we'll get DR buffer: diff --git a/libmpcodecs/vf_noformat.c b/libmpcodecs/vf_noformat.c index 9b3833c635..17f7844121 100644 --- a/libmpcodecs/vf_noformat.c +++ b/libmpcodecs/vf_noformat.c @@ -39,7 +39,7 @@ static struct vf_priv_s { //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(fmt!=vf->priv->fmt) return vf_next_query_format(vf,fmt); return 0; diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c index 59835daf50..525776ca8f 100644 --- a/libmpcodecs/vf_noise.c +++ b/libmpcodecs/vf_noise.c @@ -313,14 +313,14 @@ static void noise(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int if (fp->shiftptr == 3) fp->shiftptr = 0; } -static int config(struct vf_instance* vf, +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); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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): @@ -338,7 +338,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -367,7 +367,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; if(vf->priv->chromaParam.noise) av_free(vf->priv->chromaParam.noise); @@ -382,7 +382,7 @@ static void uninit(struct vf_instance* vf){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_ow.c b/libmpcodecs/vf_ow.c index db9ff742c5..f7fb02db72 100644 --- a/libmpcodecs/vf_ow.c +++ b/libmpcodecs/vf_ow.c @@ -203,7 +203,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri // printf("%f\n", sum/height/width); } -static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int h= (height+15)&(~15); int i,j; @@ -216,7 +216,7 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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, @@ -233,7 +233,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -254,7 +254,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ int i,j; if(!vf->priv) return; @@ -270,7 +270,7 @@ static void uninit(struct vf_instance* vf){ } //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YVU9: case IMGFMT_IF09: diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c index 8610f042d6..b62773d81a 100644 --- a/libmpcodecs/vf_palette.c +++ b/libmpcodecs/vf_palette.c @@ -53,7 +53,7 @@ static const unsigned int rgb_list[]={ static unsigned int gray_pal[256]; -static unsigned int find_best(struct vf_instance* vf, unsigned int fmt){ +static unsigned int find_best(struct vf_instance *vf, unsigned int fmt){ unsigned int best=0; int ret; const unsigned int* p; @@ -77,7 +77,7 @@ struct vf_priv_s { int pal_msg; }; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ if (!vf->priv->fmt) @@ -91,7 +91,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; uint8_t *old_palette = mpi->planes[1]; @@ -177,7 +177,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ int best=find_best(vf,fmt); if(!best) return 0; // no match return vf->next->query_format(vf->next,best); diff --git a/libmpcodecs/vf_perspective.c b/libmpcodecs/vf_perspective.c index 2ea5aa3d50..21689d1f43 100644 --- a/libmpcodecs/vf_perspective.c +++ b/libmpcodecs/vf_perspective.c @@ -102,7 +102,7 @@ static double getCoeff(double d){ return coeff; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int i, j; @@ -129,7 +129,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; if(vf->priv->pv) free(vf->priv->pv); @@ -258,7 +258,7 @@ static inline void resampleLinear(uint8_t *dst, uint8_t *src, int w, int h, int } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; @@ -289,7 +289,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_phase.c b/libmpcodecs/vf_phase.c index 31f354e796..5b0eaaa17d 100644 --- a/libmpcodecs/vf_phase.c +++ b/libmpcodecs/vf_phase.c @@ -196,7 +196,7 @@ static enum mode analyze_plane(unsigned char *old, unsigned char *new, return mode; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; int w; @@ -240,7 +240,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv->buf[0]); free(vf->priv->buf[1]); diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c index 0a7975adf3..f3dc4d9537 100644 --- a/libmpcodecs/vf_pp.c +++ b/libmpcodecs/vf_pp.c @@ -44,7 +44,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int voflags, unsigned int outfmt){ int flags= @@ -65,7 +65,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,voflags,outfmt); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ int i; for(i=0; i<=PP_QUALITY_MAX; i++){ if(vf->priv->ppMode[i]) @@ -74,7 +74,7 @@ static void uninit(struct vf_instance* vf){ if(vf->priv->context) pp_free_context(vf->priv->context); } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: @@ -87,7 +87,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ switch(request){ case VFCTRL_QUERY_MAX_PP_LEVEL: return PP_QUALITY_MAX; @@ -98,7 +98,7 @@ static int control(struct vf_instance* vf, int request, void* data){ return vf_next_control(vf,request,data); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +static void get_image(struct vf_instance *vf, mp_image_t *mpi){ if(vf->priv->pp&0xFFFF) return; // non-local filters enabled if((mpi->type==MP_IMGTYPE_IPB || vf->priv->pp) && mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change @@ -119,7 +119,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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, diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c index da26bf0fb7..932c3f588e 100644 --- a/libmpcodecs/vf_pp7.c +++ b/libmpcodecs/vf_pp7.c @@ -344,7 +344,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri } } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int h= (height+16+15)&(~15); @@ -355,7 +355,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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, @@ -372,7 +372,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(mpi->flags&MP_IMGFLAG_DIRECT){ @@ -407,7 +407,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; if(vf->priv->src) free(vf->priv->src); @@ -418,7 +418,7 @@ static void uninit(struct vf_instance* vf){ } //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YVU9: case IMGFMT_IF09: @@ -436,7 +436,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ return vf_next_control(vf,request,data); } diff --git a/libmpcodecs/vf_pullup.c b/libmpcodecs/vf_pullup.c index 0d2c345c9c..2dafe20b31 100644 --- a/libmpcodecs/vf_pullup.c +++ b/libmpcodecs/vf_pullup.c @@ -42,7 +42,7 @@ struct vf_priv_s { char *qbuf; }; -static void init_pullup(struct vf_instance* vf, mp_image_t *mpi) +static void init_pullup(struct vf_instance *vf, mp_image_t *mpi) { struct pullup_context *c = vf->priv->ctx; @@ -78,7 +78,7 @@ static void init_pullup(struct vf_instance* vf, mp_image_t *mpi) #if 0 -static void get_image(struct vf_instance* vf, mp_image_t *mpi) +static void get_image(struct vf_instance *vf, mp_image_t *mpi) { struct pullup_context *c = vf->priv->ctx; struct pullup_buffer *b; @@ -104,7 +104,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi) } #endif -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { struct pullup_context *c = vf->priv->ctx; struct pullup_buffer *b; @@ -254,7 +254,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return ret; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - support more formats */ switch (fmt) { @@ -266,7 +266,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -274,7 +274,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf, width, height, d_width, d_height, flags, outfmt); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { pullup_free_context(vf->priv->ctx); free(vf->priv); diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c index 841eff782b..f7e8b377fe 100644 --- a/libmpcodecs/vf_qp.c +++ b/libmpcodecs/vf_qp.c @@ -42,7 +42,7 @@ struct vf_priv_s { int qp_stride; }; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int h= (height+15)>>4; @@ -76,7 +76,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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, @@ -93,7 +93,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int x,y; @@ -136,7 +136,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; if(vf->priv->qp) av_free(vf->priv->qp); diff --git a/libmpcodecs/vf_rectangle.c b/libmpcodecs/vf_rectangle.c index 437480a8dc..c303fc1aba 100644 --- a/libmpcodecs/vf_rectangle.c +++ b/libmpcodecs/vf_rectangle.c @@ -31,7 +31,7 @@ struct vf_priv_s { }; static int -config(struct vf_instance* vf, +config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -52,7 +52,7 @@ config(struct vf_instance* vf, } static int -control(struct vf_instance* vf, int request, void *data) +control(struct vf_instance *vf, int request, void *data) { const int *const tmp = data; switch(request){ @@ -83,7 +83,7 @@ control(struct vf_instance* vf, int request, void *data) return 0; } static int -put_image(struct vf_instance* vf, mp_image_t* mpi, double pts){ +put_image(struct vf_instance *vf, mp_image_t* mpi, double pts){ mp_image_t* dmpi; unsigned int bpp = mpi->bpp / 8; int x, y, w, h; diff --git a/libmpcodecs/vf_remove_logo.c b/libmpcodecs/vf_remove_logo.c index 07a05941ea..da90d3c066 100644 --- a/libmpcodecs/vf_remove_logo.c +++ b/libmpcodecs/vf_remove_logo.c @@ -670,7 +670,7 @@ static pgm_structure * generate_half_size_image(vf_instance_t * vf, pgm_structur /** * \brief Checks if YV12 is supported by the next filter. */ -static unsigned int find_best(struct vf_instance* vf){ +static unsigned int find_best(struct vf_instance *vf){ int is_format_okay = vf->next->query_format(vf->next, IMGFMT_YV12); if ((is_format_okay & VFCAP_CSP_SUPPORTED_BY_HW) || (is_format_okay & VFCAP_CSP_SUPPORTED)) return IMGFMT_YV12; @@ -683,7 +683,7 @@ static unsigned int find_best(struct vf_instance* vf){ /** * \brief Configure the filter and call the next filter's config function. */ -static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { if(!(vf->priv->fmt=find_best(vf))) return 0; @@ -764,7 +764,7 @@ static void convert_yv12(const vf_instance_t * const vf, const char * const sour * filter, has the logo removed by the filter, and is then sent to the next * filter. */ -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; dmpi=vf_get_image(vf->next,vf->priv->fmt, @@ -811,7 +811,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ /** * \brief Checks to see if the next filter accepts YV12 images. */ -static int query_format(struct vf_instance * vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { if (fmt == IMGFMT_YV12) return vf->next->query_format(vf->next, IMGFMT_YV12); diff --git a/libmpcodecs/vf_rgb2bgr.c b/libmpcodecs/vf_rgb2bgr.c index 5b8dd0fe34..95b3fa3639 100644 --- a/libmpcodecs/vf_rgb2bgr.c +++ b/libmpcodecs/vf_rgb2bgr.c @@ -54,14 +54,14 @@ static unsigned int getfmt(unsigned int outfmt,int forced){ return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ vf->priv->fmt=getfmt(outfmt,vf->priv->forced); return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; // hope we'll get DR buffer: @@ -94,7 +94,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int outfmt){ +static int query_format(struct vf_instance *vf, unsigned int outfmt){ unsigned int fmt=getfmt(outfmt,vf->priv->forced); if(!fmt) return 0; return vf_next_query_format(vf,fmt) & (~VFCAP_CSP_SUPPORTED_BY_HW); diff --git a/libmpcodecs/vf_rgbtest.c b/libmpcodecs/vf_rgbtest.c index 02f2774a05..9179934175 100644 --- a/libmpcodecs/vf_rgbtest.c +++ b/libmpcodecs/vf_rgbtest.c @@ -103,7 +103,7 @@ static void put_pixel(uint8_t *buf, int x, int y, int stride, int r, int g, int } } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ if (vf->priv->w > 0) { d_width = width = vf->priv->w; } @@ -113,7 +113,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int x, y; int w = vf->priv->w > 0 ? vf->priv->w : mpi->w; @@ -142,7 +142,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int outfmt){ +static int query_format(struct vf_instance *vf, unsigned int outfmt){ unsigned int fmt=getfmt(outfmt); if(!fmt) return 0; return vf_next_query_format(vf,fmt) & (~VFCAP_CSP_SUPPORTED_BY_HW); diff --git a/libmpcodecs/vf_rotate.c b/libmpcodecs/vf_rotate.c index f1ee0476bd..19eeae6d35 100644 --- a/libmpcodecs/vf_rotate.c +++ b/libmpcodecs/vf_rotate.c @@ -68,7 +68,7 @@ static void rotate(unsigned char* dst,unsigned char* src,int dststride,int srcst //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ if (vf->priv->direction & 4) { @@ -84,7 +84,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,height,width,d_height,d_width,flags,outfmt); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; // hope we'll get DR buffer: @@ -114,7 +114,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if(IMGFMT_IS_RGB(fmt) || IMGFMT_IS_BGR(fmt)) return vf_next_query_format(vf, fmt); // we can support only symmetric (chroma_x_shift==chroma_y_shift) YUV formats: switch(fmt) { diff --git a/libmpcodecs/vf_sab.c b/libmpcodecs/vf_sab.c index 9b869cd269..b4a2fcbfb1 100644 --- a/libmpcodecs/vf_sab.c +++ b/libmpcodecs/vf_sab.c @@ -135,7 +135,7 @@ static int allocStuff(FilterParam *f, int width, int height){ return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -160,7 +160,7 @@ static void freeBuffers(FilterParam *f){ f->distCoeff=NULL; } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; freeBuffers(&vf->priv->luma); @@ -238,7 +238,7 @@ if((x/32)&1){ } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; @@ -257,7 +257,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 94beeddabd..7579e98ace 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -165,7 +165,7 @@ static unsigned int find_best_out(vf_instance_t *vf, int in_format){ return best; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ struct MPOpts *opts = vf->opts; @@ -367,7 +367,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,vf->priv->w,vf->priv->h,d_width,d_height,flags,best); } -static void start_slice(struct vf_instance* vf, mp_image_t *mpi){ +static void start_slice(struct vf_instance *vf, mp_image_t *mpi){ // printf("start_slice called! flag=%d\n",mpi->flags&MP_IMGFLAG_DRAW_CALLBACK); if(!(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)) return; // shouldn't happen // they want slices!!! allocate the buffer. @@ -407,7 +407,7 @@ static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src } } -static void draw_slice(struct vf_instance* vf, +static void draw_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y){ mp_image_t *dmpi=vf->dmpi; if(!dmpi){ @@ -418,7 +418,7 @@ static void draw_slice(struct vf_instance* vf, scale(vf->priv->ctx, vf->priv->ctx2, src, stride, y, h, dmpi->planes, dmpi->stride, vf->priv->interlaced); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi=mpi->priv; // printf("vf_scale::put_image(): processing whole frame! dmpi=%p flag=%d\n", @@ -445,7 +445,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ int *table; int *inv_table; int r; @@ -508,7 +508,7 @@ static int control(struct vf_instance* vf, int request, void* data){ // supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800 -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: diff --git a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c index 2ddd0e4ab6..3ebcc17d3e 100644 --- a/libmpcodecs/vf_screenshot.c +++ b/libmpcodecs/vf_screenshot.c @@ -58,7 +58,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -137,7 +137,7 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi) sws_scale(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride); } -static void start_slice(struct vf_instance* vf, mp_image_t *mpi) +static void start_slice(struct vf_instance *vf, mp_image_t *mpi) { vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, mpi->type, mpi->flags, mpi->width, mpi->height); @@ -149,7 +149,7 @@ static void start_slice(struct vf_instance* vf, mp_image_t *mpi) } -static void draw_slice(struct vf_instance* vf, unsigned char** src, +static void draw_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y) { if (vf->priv->store_slices) { @@ -162,7 +162,7 @@ static void draw_slice(struct vf_instance* vf, unsigned char** src, vf_next_draw_slice(vf,src,stride,w,h,x,y); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi) +static void get_image(struct vf_instance *vf, mp_image_t *mpi) { // FIXME: should vf.c really call get_image when using slices?? if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK) @@ -185,7 +185,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi) mpi->priv=(void*)vf->dmpi; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi = (mp_image_t *)mpi->priv; @@ -246,7 +246,7 @@ static int control (vf_instance_t *vf, int request, void *data) //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch(fmt){ case IMGFMT_YV12: diff --git a/libmpcodecs/vf_smartblur.c b/libmpcodecs/vf_smartblur.c index 1961a95a5b..b9e41acc76 100644 --- a/libmpcodecs/vf_smartblur.c +++ b/libmpcodecs/vf_smartblur.c @@ -94,7 +94,7 @@ static int allocStuff(FilterParam *f, int width, int height){ return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -113,7 +113,7 @@ static void freeBuffers(FilterParam *f){ f->filterContext=NULL; } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; freeBuffers(&vf->priv->luma); @@ -180,7 +180,7 @@ static inline void blur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +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; FilterParam *f= &vf->priv; @@ -201,7 +201,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_softpulldown.c b/libmpcodecs/vf_softpulldown.c index a15a43d6c6..ab45c698ce 100644 --- a/libmpcodecs/vf_softpulldown.c +++ b/libmpcodecs/vf_softpulldown.c @@ -35,7 +35,7 @@ struct vf_priv_s { long long out; }; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; int ret = 0; @@ -129,14 +129,14 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return ret; } -static int config(struct vf_instance* vf, +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); } -static void uninit(struct vf_instance* vf) +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); free(vf->priv); diff --git a/libmpcodecs/vf_softskip.c b/libmpcodecs/vf_softskip.c index ac7caf009b..fe572cb0b0 100644 --- a/libmpcodecs/vf_softskip.c +++ b/libmpcodecs/vf_softskip.c @@ -31,7 +31,7 @@ struct vf_priv_s { int skipflag; }; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; @@ -54,7 +54,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return vf_next_put_image(vf, dmpi, pts); } -static int control(struct vf_instance* vf, int request, void* data) +static int control(struct vf_instance *vf, int request, void* data) { switch (request) { case VFCTRL_SKIP_NEXT_FRAME: @@ -65,7 +65,7 @@ static int control(struct vf_instance* vf, int request, void* data) } #if 0 -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - figure out which other formats work */ switch (fmt) { @@ -78,7 +78,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) } #endif -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c index d1951fe718..e53a95174b 100644 --- a/libmpcodecs/vf_spp.c +++ b/libmpcodecs/vf_spp.c @@ -430,7 +430,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri //FIXME reorder for better caching } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int h= (height+16+15)&(~15); @@ -442,7 +442,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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, @@ -459,7 +459,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -511,7 +511,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ if(!vf->priv) return; if(vf->priv->temp) free(vf->priv->temp); @@ -528,7 +528,7 @@ static void uninit(struct vf_instance* vf){ } //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YVU9: case IMGFMT_IF09: @@ -546,7 +546,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ switch(request){ case VFCTRL_QUERY_MAX_PP_LEVEL: return 6; diff --git a/libmpcodecs/vf_swapuv.c b/libmpcodecs/vf_swapuv.c index 3c7e149001..6edb256759 100644 --- a/libmpcodecs/vf_swapuv.c +++ b/libmpcodecs/vf_swapuv.c @@ -32,7 +32,7 @@ //===========================================================================// -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +static void get_image(struct vf_instance *vf, mp_image_t *mpi){ mp_image_t *dmpi= vf_get_image(vf->next, mpi->imgfmt, mpi->type, mpi->flags, mpi->w, mpi->h); @@ -48,7 +48,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->priv=(void*)dmpi; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(mpi->flags&MP_IMGFLAG_DIRECT){ @@ -72,7 +72,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt) { case IMGFMT_YV12: diff --git a/libmpcodecs/vf_telecine.c b/libmpcodecs/vf_telecine.c index 9c08e08899..9071dfab98 100644 --- a/libmpcodecs/vf_telecine.c +++ b/libmpcodecs/vf_telecine.c @@ -33,7 +33,7 @@ struct vf_priv_s { int frame; }; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; int ret; @@ -106,7 +106,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) } #if 0 -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - figure out which other formats work */ switch (fmt) { @@ -118,7 +118,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -126,7 +126,7 @@ static int config(struct vf_instance* vf, } #endif -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_test.c b/libmpcodecs/vf_test.c index f8caea5a6d..aeb2763200 100644 --- a/libmpcodecs/vf_test.c +++ b/libmpcodecs/vf_test.c @@ -46,7 +46,7 @@ struct vf_priv_s { int frame_num; }; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -268,7 +268,7 @@ static void ring2Test(uint8_t *dst, int stride, int off) } } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int frame= vf->priv->frame_num; @@ -306,7 +306,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ return vf_next_query_format(vf,IMGFMT_YV12) & (~VFCAP_CSP_SUPPORTED_BY_HW); } diff --git a/libmpcodecs/vf_tfields.c b/libmpcodecs/vf_tfields.c index 415977bddc..ee50d4f6ca 100644 --- a/libmpcodecs/vf_tfields.c +++ b/libmpcodecs/vf_tfields.c @@ -326,9 +326,9 @@ static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds static void (*qpel_li)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up); static void (*qpel_4tap)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up); -static int continue_buffered_image(struct vf_instance *); +static int continue_buffered_image(struct vf_instance *vf); -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { vf->priv->buffered_mpi = mpi; vf->priv->buffered_pts = pts; @@ -451,7 +451,7 @@ static int continue_buffered_image(struct vf_instance *vf) return ret; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - figure out which formats exactly work */ switch (fmt) { @@ -466,7 +466,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -482,7 +482,7 @@ static int config(struct vf_instance* vf, return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_tile.c b/libmpcodecs/vf_tile.c index 0930a00c87..ad3d662875 100644 --- a/libmpcodecs/vf_tile.c +++ b/libmpcodecs/vf_tile.c @@ -83,7 +83,7 @@ struct vf_priv_s { }; -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -106,7 +106,7 @@ static int config(struct vf_instance* vf, } /* Filter handler */ -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; struct vf_priv_s *priv; @@ -191,14 +191,14 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) } } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { /* free local data */ free(vf->priv); } /* rgb/bgr 12->32 supported & some Yxxx */ -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { switch (fmt) { /* rgb 12...32 bit */ diff --git a/libmpcodecs/vf_tinterlace.c b/libmpcodecs/vf_tinterlace.c index 24c8c06017..91ceb6074b 100644 --- a/libmpcodecs/vf_tinterlace.c +++ b/libmpcodecs/vf_tinterlace.c @@ -37,7 +37,7 @@ struct vf_priv_s { mp_image_t *dmpi; }; -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) { int ret = 0; mp_image_t *dmpi; @@ -176,7 +176,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts) return ret; } -static int query_format(struct vf_instance* vf, unsigned int fmt) +static int query_format(struct vf_instance *vf, unsigned int fmt) { /* FIXME - figure out which other formats work */ switch (fmt) { @@ -188,7 +188,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt) return 0; } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) { @@ -204,7 +204,7 @@ static int config(struct vf_instance* vf, return 0; } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { free(vf->priv); } diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c index 5d6b33f290..ae5f13654f 100644 --- a/libmpcodecs/vf_unsharp.c +++ b/libmpcodecs/vf_unsharp.c @@ -126,7 +126,7 @@ static void unsharp( uint8_t *dst, uint8_t *src, int dstStride, int srcStride, i //===========================================================================// -static int config( struct vf_instance* vf, +static int config( struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt ) { @@ -159,7 +159,7 @@ static int config( struct vf_instance* vf, //===========================================================================// -static void get_image( struct vf_instance* vf, mp_image_t *mpi ) { +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 ) @@ -178,7 +178,7 @@ static void get_image( struct vf_instance* vf, mp_image_t *mpi ) { mpi->flags |= MP_IMGFLAG_DIRECT; } -static int put_image( struct vf_instance* vf, mp_image_t *mpi, double pts) { +static int put_image( struct vf_instance *vf, mp_image_t *mpi, double pts) { mp_image_t *dmpi; if( !(mpi->flags & MP_IMGFLAG_DIRECT) ) @@ -204,7 +204,7 @@ static int put_image( struct vf_instance* vf, mp_image_t *mpi, double pts) { return vf_next_put_image( vf, dmpi, pts); } -static void uninit( struct vf_instance* vf ) { +static void uninit( struct vf_instance *vf ) { unsigned int z; FilterParam *fp; @@ -227,7 +227,7 @@ static void uninit( struct vf_instance* vf ) { //===========================================================================// -static int query_format( struct vf_instance* vf, unsigned int fmt ) { +static int query_format( struct vf_instance *vf, unsigned int fmt ) { switch(fmt) { case IMGFMT_YV12: case IMGFMT_I420: diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c index 1a7d4402a2..ad311ca9b7 100644 --- a/libmpcodecs/vf_uspp.c +++ b/libmpcodecs/vf_uspp.c @@ -204,7 +204,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds } } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int i; @@ -245,7 +245,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); } -static void get_image(struct vf_instance* vf, mp_image_t *mpi){ +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, @@ -262,7 +262,7 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ mpi->flags|=MP_IMGFLAG_DIRECT; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ @@ -297,7 +297,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ return vf_next_put_image(vf,dmpi, pts); } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ int i; if(!vf->priv) return; @@ -316,7 +316,7 @@ static void uninit(struct vf_instance* vf){ } //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: @@ -328,7 +328,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ switch(request){ case VFCTRL_QUERY_MAX_PP_LEVEL: return 8; diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c index adee2a3a4c..3d48b5fce0 100644 --- a/libmpcodecs/vf_vo.c +++ b/libmpcodecs/vf_vo.c @@ -49,10 +49,10 @@ struct vf_priv_s { }; #define video_out (vf->priv->vo) -static int query_format(struct vf_instance* vf, unsigned int fmt); /* forward declaration */ -static void draw_slice(struct vf_instance *vf, unsigned char **src, int *stride, int w,int h, int x, int y); +static int query_format(struct vf_instance *vf, unsigned int fmt); /* forward declaration */ +static void draw_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y); -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -93,7 +93,7 @@ static int config(struct vf_instance* vf, return 1; } -static int control(struct vf_instance* vf, int request, void* data) +static int control(struct vf_instance *vf, int request, void* data) { switch(request){ case VFCTRL_GET_DEINTERLACE: @@ -167,7 +167,7 @@ static int control(struct vf_instance* vf, int request, void* data) return CONTROL_UNKNOWN; } -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ int flags = vo_control(video_out, VOCTRL_QUERY_FORMAT, &fmt); // draw_slice() accepts stride, draw_frame() doesn't: if(flags) @@ -176,7 +176,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return flags; } -static void get_image(struct vf_instance* vf, +static void get_image(struct vf_instance *vf, mp_image_t *mpi){ if (!video_out->config_ok) return; @@ -186,7 +186,7 @@ static void get_image(struct vf_instance* vf, vo_control(video_out, VOCTRL_GET_IMAGE, mpi); } -static int put_image(struct vf_instance* vf, +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ if(!video_out->config_ok) return 0; // vo not configured? // first check, maybe the vo/vf plugin implements draw_image using mpi: @@ -204,19 +204,19 @@ static int put_image(struct vf_instance* vf, return 1; } -static void start_slice(struct vf_instance* vf, +static void start_slice(struct vf_instance *vf, mp_image_t *mpi) { if(!video_out->config_ok) return; // vo not configured? vo_control(video_out, VOCTRL_START_SLICE,mpi); } -static void draw_slice(struct vf_instance* vf, +static void draw_slice(struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y){ if(!video_out->config_ok) return; // vo not configured? vo_draw_slice(video_out, src,stride,w,h,x,y); } -static void uninit(struct vf_instance* vf) +static void uninit(struct vf_instance *vf) { if (vf->priv) { /* Allow VO (which may live on to work with another instance of vf_vo) diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index e1a08c737a..bcca97398a 100644 --- a/libmpcodecs/vf_yadif.c +++ b/libmpcodecs/vf_yadif.c @@ -364,7 +364,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int #endif } -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int i, j; @@ -384,7 +384,7 @@ static int config(struct vf_instance* vf, static int continue_buffered_image(struct vf_instance *vf); -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ int tff; if(vf->priv->parity < 0) { @@ -441,7 +441,7 @@ static int continue_buffered_image(struct vf_instance *vf) return ret; } -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ int i; if(!vf->priv) return; @@ -455,7 +455,7 @@ static void uninit(struct vf_instance* vf){ } //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: @@ -467,7 +467,7 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ return 0; } -static int control(struct vf_instance* vf, int request, void* data){ +static int control(struct vf_instance *vf, int request, void* data){ switch (request){ case VFCTRL_GET_DEINTERLACE: *(int*)data = vf->priv->do_deinterlace; diff --git a/libmpcodecs/vf_yuvcsp.c b/libmpcodecs/vf_yuvcsp.c index db310a1da9..792fcaceb4 100644 --- a/libmpcodecs/vf_yuvcsp.c +++ b/libmpcodecs/vf_yuvcsp.c @@ -34,7 +34,7 @@ struct vf_priv_s { //===========================================================================// -static int config(struct vf_instance* vf, +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); @@ -48,7 +48,7 @@ static inline int clamp_c(int x){ return (x > 240) ? 240 : (x < 16) ? 16 : x; } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ int i,j; uint8_t *y_in, *cb_in, *cr_in; uint8_t *y_out, *cb_out, *cr_out; @@ -82,12 +82,12 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// /* -static void uninit(struct vf_instance* vf){ +static void uninit(struct vf_instance *vf){ free(vf->priv); } */ -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_I420: diff --git a/libmpcodecs/vf_yvu9.c b/libmpcodecs/vf_yvu9.c index c8aa6bcfb4..1e4e7be561 100644 --- a/libmpcodecs/vf_yvu9.c +++ b/libmpcodecs/vf_yvu9.c @@ -32,7 +32,7 @@ //===========================================================================// -static int config(struct vf_instance* vf, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ @@ -44,7 +44,7 @@ static int config(struct vf_instance* vf, return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_YV12); } -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ mp_image_t *dmpi; int y,w,h; @@ -79,7 +79,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ //===========================================================================// -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ if (fmt == IMGFMT_YVU9 || fmt == IMGFMT_IF09) return vf_next_query_format(vf,IMGFMT_YV12) & (~VFCAP_CSP_SUPPORTED_BY_HW); return 0; diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index 3d90052b5e..0b87d01ce8 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -667,7 +667,7 @@ struct vf_priv_s { * arrange to dispatch to the config() entry pointer for the one * selected. */ -static int config(struct vf_instance* vf, int width, int height, int d_width, +static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ struct vf_priv_s *priv = vf->priv; float aspect_decision; @@ -827,7 +827,7 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, * \param mpi pointer to mp_image_t structure * \param pts */ -static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ struct vf_priv_s *priv = vf->priv; int size = 0; int i; @@ -856,7 +856,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ * Given the image format specified by \a fmt, this routine is called * to ask if the format is supported or not. */ -static int query_format(struct vf_instance* vf, unsigned int fmt){ +static int query_format(struct vf_instance *vf, unsigned int fmt){ VERBOSE("query_format() called\n"); switch (fmt) { diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index d946dca0c1..eedde00fd6 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -73,8 +73,8 @@ static const unsigned char sipr_swaps[38][2] = { #define ATRC_FLAVORS 8 #define COOK_FLAVORS 34 static const int sipr_fl2bps[SIPR_FLAVORS] = { 813, 1062, 625, 2000 }; -static const int atrc_fl2bps[ATRC_FLAVORS] = - { 8269, 11714, 13092, 16538, 18260, 22050, 33075, 44100 }; +static const int atrc_fl2bps[ATRC_FLAVORS] = { + 8269, 11714, 13092, 16538, 18260, 22050, 33075, 44100 }; static const int cook_fl2bps[COOK_FLAVORS] = { 1000, 1378, 2024, 2584, 4005, 5513, 8010, 4005, 750, 2498, 4048, 5513, 8010, 11973, 8010, 2584, 4005, 2067, 2584, 2584, diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c index f7b2a5b0b7..c5ef3b91c3 100644 --- a/libvo/vo_mpegpes.c +++ b/libvo/vo_mpegpes.c @@ -199,7 +199,8 @@ static int my_write(const unsigned char* data,int len){ return orig_len; } -static void send_pes_packet(unsigned char* data,int len,int id,int timestamp){ +static void send_pes_packet(unsigned char* data, int len, int id, int timestamp) +{ send_mpeg_pes_packet (data, len, id, timestamp, 1, my_write); } diff --git a/playtreeparser.h b/playtreeparser.h index 1af06d2ef3..a3d729fdb3 100644 --- a/playtreeparser.h +++ b/playtreeparser.h @@ -33,7 +33,7 @@ struct stream; typedef struct play_tree_parser { - struct stream* stream; + struct stream *stream; struct m_config *mconfig; char *buffer,*iter,*line; int buffer_size , buffer_end; diff --git a/stream/cache2.c b/stream/cache2.c index e0f67dd9d4..7afcbf1b5b 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -88,13 +88,15 @@ static int min_fill=0; int cache_fill_status=0; -static void cache_stats(cache_vars_t* s){ +static void cache_stats(cache_vars_t *s) +{ int newb=s->max_filepos-s->read_filepos; // new bytes in the buffer mp_msg(MSGT_CACHE,MSGL_INFO,"0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos); mp_msg(MSGT_CACHE,MSGL_INFO,"%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size); } -static int cache_read(cache_vars_t* s,unsigned char* buf,int size){ +static int cache_read(cache_vars_t *s, unsigned char *buf, int size) +{ int total=0; while(size>0){ int pos,newb,len; @@ -140,7 +142,8 @@ static int cache_read(cache_vars_t* s,unsigned char* buf,int size){ return total; } -static int cache_fill(cache_vars_t* s){ +static int cache_fill(cache_vars_t *s) +{ int back,back2,newb,space,len,pos; off_t read=s->read_filepos; diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index a006047871..27c0350d22 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -212,7 +212,8 @@ static int dvd_next_cell(dvd_priv_t *d) { return next_cell; } -static int dvd_read_sector(dvd_priv_t *d,unsigned char* data) { +static int dvd_read_sector(dvd_priv_t *d, unsigned char *data) +{ int len; if(d->packs_left==0) { @@ -332,7 +333,8 @@ read_next: return d->cur_pack-1; } -static void dvd_seek(dvd_priv_t *d,int pos) { +static void dvd_seek(dvd_priv_t *d, int pos) +{ d->packs_left=-1; d->cur_pack=pos; @@ -370,7 +372,8 @@ static void dvd_seek(dvd_priv_t *d,int pos) { d->angle_seek=1; } -static void dvd_close(dvd_priv_t *d) { +static void dvd_close(dvd_priv_t *d) +{ ifoClose(d->vts_file); ifoClose(d->vmg_file); DVDCloseFile(d->title); diff --git a/stream/stream_vstream.c b/stream/stream_vstream.c index 6c2de6f49a..3bc096f71b 100644 --- a/stream/stream_vstream.c +++ b/stream/stream_vstream.c @@ -94,7 +94,7 @@ static int seek(stream_t *s,off_t newpos) { return 1; } -static int control(struct stream *s,int cmd,void *arg) { +static int control(struct stream *s, int cmd, void *arg) { return STREAM_UNSUPPORTED; } -- 2.11.4.GIT