From e72657f83dc9f31dc0c1eb09ab2e7e704d59643e Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Wed, 10 Aug 2011 02:10:44 +0200 Subject: [PATCH] lavfi: remove mp test wrapper The source was natively integrated into libavfilter, with the name mptestsrc. --- doc/filters.texi | 1 - libavfilter/Makefile | 1 - libavfilter/avfilter.h | 2 +- libavfilter/libmpcodecs/vf_test.c | 333 ------------------------------ libavfilter/vf_mp.c | 1 - 5 files changed, 1 insertion(+), 337 deletions(-) delete mode 100644 libavfilter/libmpcodecs/vf_test.c diff --git a/doc/filters.texi b/doc/filters.texi index 50d933f904..de25130240 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -963,7 +963,6 @@ The list of the currently supported filters follows: @item spp @item swapuv @item telecine -@item test @item tile @item tinterlace @item unsharp diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 4868be7e36..27b6849591 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -126,7 +126,6 @@ OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_softskip.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_spp.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_swapuv.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_telecine.o -OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_test.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_tile.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_tinterlace.o OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/vf_unsharp.o diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index a724b01122..fd660292ae 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -30,7 +30,7 @@ #define LIBAVFILTER_VERSION_MAJOR 2 #define LIBAVFILTER_VERSION_MINOR 29 -#define LIBAVFILTER_VERSION_MICRO 0 +#define LIBAVFILTER_VERSION_MICRO 1 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ diff --git a/libavfilter/libmpcodecs/vf_test.c b/libavfilter/libmpcodecs/vf_test.c deleted file mode 100644 index bef06120e1..0000000000 --- a/libavfilter/libmpcodecs/vf_test.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (C) 2002 Michael Niedermayer - * - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include -#include - -#include "config.h" -#include "mp_msg.h" -#include "help_mp.h" - -#include "img_format.h" -#include "mp_image.h" -#include "vf.h" - -//===========================================================================// - -#include -#include - -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#define ABS(a,b) ((a) > 0 ? (a) : -(a)) - -#define WIDTH 512 -#define HEIGHT 512 - -struct vf_priv_s { - int frame_num; -}; - -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_YV12)<=0){ - mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_WarnNextFilterDoesntSupport, "YV12"); - return 0; - } - - //hmm whats the meaning of these ... ;) - d_width= width= WIDTH; - d_height= height= HEIGHT; - - return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_YV12); -} - -static double c[64]; - -static void initIdct(void) -{ - int i; - - for (i=0; i<8; i++) - { - double s= i==0 ? sqrt(0.125) : 0.5; - int j; - - for(j=0; j<8; j++) - c[i*8+j]= s*cos((3.141592654/8.0)*i*(j+0.5)); - } -} - - -static void idct(uint8_t *dst, int dstStride, int src[64]) -{ - int i, j, k; - double tmp[64]; - - for(i=0; i<8; i++) - { - for(j=0; j<8; j++) - { - double sum= 0.0; - - for(k=0; k<8; k++) - sum+= c[k*8+j]*src[8*i+k]; - - tmp[8*i+j]= sum; - } - } - - for(j=0; j<8; j++) - { - for(i=0; i<8; i++) - { - int v; - double sum= 0.0; - - for(k=0; k<8; k++) - sum+= c[k*8+i]*tmp[8*k+j]; - - v= (int)floor(sum+0.5); - if(v<0) v=0; - else if(v>255) v=255; - - dst[dstStride*i + j] = v; - } - } -} - -static void drawDc(uint8_t *dst, int stride, int color, int w, int h) -{ - int y; - for(y=0; ypriv->frame_num; - - // hope we'll get DR buffer: - dmpi=vf_get_image(vf->next,IMGFMT_YV12, - MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, - WIDTH, HEIGHT); - - // clean - memset(dmpi->planes[0], 0, dmpi->stride[0]*dmpi->h); - memset(dmpi->planes[1], 128, dmpi->stride[1]*dmpi->h>>dmpi->chroma_y_shift); - memset(dmpi->planes[2], 128, dmpi->stride[2]*dmpi->h>>dmpi->chroma_y_shift); - - if(frame%30) - { - switch(frame/30) - { - case 0: dc1Test(dmpi->planes[0], dmpi->stride[0], 256, 256, frame%30); break; - case 1: dc1Test(dmpi->planes[1], dmpi->stride[1], 256, 256, frame%30); break; - case 2: freq1Test(dmpi->planes[0], dmpi->stride[0], frame%30); break; - case 3: freq1Test(dmpi->planes[1], dmpi->stride[1], frame%30); break; - case 4: amp1Test(dmpi->planes[0], dmpi->stride[0], frame%30); break; - case 5: amp1Test(dmpi->planes[1], dmpi->stride[1], frame%30); break; - case 6: cbp1Test(dmpi->planes , dmpi->stride , frame%30); break; - case 7: mv1Test(dmpi->planes[0], dmpi->stride[0], frame%30); break; - case 8: ring1Test(dmpi->planes[0], dmpi->stride[0], frame%30); break; - case 9: ring2Test(dmpi->planes[0], dmpi->stride[0], frame%30); break; - } - } - - frame++; - vf->priv->frame_num= frame; - return vf_next_put_image(vf,dmpi, pts); -} - -//===========================================================================// - -static int query_format(struct vf_instance *vf, unsigned int fmt){ - return vf_next_query_format(vf,IMGFMT_YV12) & (~VFCAP_CSP_SUPPORTED_BY_HW); -} - -static int vf_open(vf_instance_t *vf, char *args){ - vf->config=config; - vf->put_image=put_image; - vf->query_format=query_format; - vf->priv=malloc(sizeof(struct vf_priv_s)); - vf->priv->frame_num= args ? atoi(args) : 0; - initIdct(); - return 1; -} - -const vf_info_t vf_info_test = { - "test pattern generator", - "test", - "Michael Niedermayer", - "", - vf_open, - NULL -}; - -//===========================================================================// diff --git a/libavfilter/vf_mp.c b/libavfilter/vf_mp.c index ea29c9b8d4..30f073c3d4 100644 --- a/libavfilter/vf_mp.c +++ b/libavfilter/vf_mp.c @@ -241,7 +241,6 @@ static const vf_info_t* const filters[]={ &vf_info_spp, &vf_info_swapuv, &vf_info_telecine, - &vf_info_test, &vf_info_tile, &vf_info_tinterlace, &vf_info_unsharp,