Commit c0662427 authored by Antoine Cellerier's avatar Antoine Cellerier

Img resample based module (functionality untested ... but compilation and...

Img resample based module (functionality untested ... but compilation and loading works). Remove unneeded stuff from swscale.
parent 1ce62168
......@@ -3008,7 +3008,6 @@ then
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${IMGRESAMPLE_CFLAGS}"
CFLAGS="${CFLAGS} ${IMGRESAMPLE_CFLAGS}"
LIBS="${CFLAGS} ${IMGRESAMPLE_LIBS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
AC_CHECK_LIB(avcodec,img_resample,
......@@ -3022,7 +3021,7 @@ then
then
AC_MSG_ERROR([swscale (and its fallback module imgresample) support will be missing. Use --disable-swscale to ignore this error. (This basically means that you will be missing any good software scaling module and some video chroma converters.)])
fi
])
],${IMGRESAMPLE_LIBS})
VLC_RESTORE_FLAGS
],[
AC_MSG_WARN([Could not find libavcodec or libavutil.])
......
......@@ -31,18 +31,14 @@ EXTRA_libavformat_plugin_la_SOURCES = \
SOURCES_swscale = \
swscale.c \
swscale.h \
video_filter.c \
chroma.c \
scale.c \
$(NULL)
# FIXME
SOURCES_imgresample = \
avcodec.c \
avcodec.h \
video.c \
audio.c \
deinterlace.c \
imgresample.c \
imgresample.h \
chroma.c \
video_filter.c \
$(NULL)
SOURCES_postproc = \
......@@ -53,12 +49,14 @@ libvlc_LTLIBRARIES += \
$(LTLIBavcodec) \
$(LTLIBavformat) \
$(LTLIBswscale) \
$(LTLIBimgresample) \
$(LTLIBpostproc)
EXTRA_LTLIBRARIES += \
libavcodec_plugin.la \
libavformat_plugin.la \
libswscale_plugin.la \
libimgresample_plugin.la \
libpostproc_plugin.la
# FIXME SOURCES_ffmpegaltivec = \
......
/*****************************************************************************
* chroma.c: chroma conversion using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 the VideoLAN team
* Copyright (C) 1999-2008 the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
......@@ -31,10 +31,7 @@
#include <vlc_common.h>
#include <vlc_vout.h>
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
#include <vlc_filter.h>
#endif
/* ffmpeg header */
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
......@@ -47,8 +44,8 @@
#include "ffmpeg.h"
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H)
static void ChromaConversion( vout_thread_t *, picture_t *, picture_t * );
static void ChromaConversion( filter_t *, picture_t *, picture_t * );
static picture_t *ChromaConversion_Filter( filter_t *, picture_t * );
/*****************************************************************************
* chroma_sys_t: chroma method descriptor
......@@ -87,7 +84,7 @@ int OpenChroma( vlc_object_t *p_this )
if( i_ffmpeg_chroma[i] < 0 ) return VLC_EGENERIC;
}
p_filter->pf_video_filter_io = ChromaConversion;
p_filter->pf_video_filter = ChromaConversion_Filter;
p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
if( p_filter->p_sys == NULL )
......@@ -95,8 +92,8 @@ int OpenChroma( vlc_object_t *p_this )
return VLC_ENOMEM;
}
p_filter->.p_sys->i_src_vlc_chroma = p_vout->render.i_chroma;
p_filter->p_sys->i_dst_vlc_chroma = p_vout->output.i_chroma;
p_filter->p_sys->i_src_vlc_chroma = p_filter->fmt_in.video.i_chroma;
p_filter->p_sys->i_dst_vlc_chroma = p_filter->fmt_out.video.i_chroma;
p_filter->p_sys->i_src_ffmpeg_chroma = i_ffmpeg_chroma[0];
p_filter->p_sys->i_dst_ffmpeg_chroma = i_ffmpeg_chroma[1];
......@@ -125,6 +122,8 @@ int OpenChroma( vlc_object_t *p_this )
return VLC_SUCCESS;
}
VIDEO_FILTER_WRAPPER( ChromaConversion )
/*****************************************************************************
* ChromaConversion: actual chroma conversion function
*****************************************************************************/
......@@ -200,4 +199,3 @@ void CloseChroma( vlc_object_t *p_this )
}
free( p_filter->p_sys );
}
#endif
This diff is collapsed.
......@@ -51,7 +51,7 @@
#include "ffmpeg.h"
/* Version checking */
#if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) )
#if LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)
/*****************************************************************************
* filter_sys_t : filter descriptor
......
......@@ -49,21 +49,6 @@
#include "ffmpeg.h"
#ifdef HAVE_POSTPROC_POSTPROCESS_H
# include <postproc/postprocess.h>
#else
# include <libpostproc/postprocess.h>
#endif
/*****************************************************************************
* decoder_sys_t: decoder descriptor
*****************************************************************************/
struct decoder_sys_t
{
/* Common part between video and audio decoder */
FFMPEG_COMMON_MEMBERS
};
/****************************************************************************
* Local prototypes
****************************************************************************/
......@@ -78,8 +63,6 @@ static const char *const ppsz_mode_descriptions[] =
* Module descriptor
*****************************************************************************/
vlc_module_begin();
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
/* video filter submodule */
set_description( N_("Video scaling filter") );
set_capability( "video filter2", 1000 );
set_category( CAT_VIDEO );
......@@ -87,25 +70,6 @@ vlc_module_begin();
set_callbacks( OpenScaler, CloseScaler );
add_integer( "swscale-mode", 0, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true );
change_integer_list( pi_mode_values, ppsz_mode_descriptions, 0 );
#else
/* video filter submodule */
set_capability( "video filter2", 50 );
set_callbacks( OpenFilter, CloseFilter );
set_description( N_("FFmpeg video filter") );
/* crop/padd submodule */
add_submodule();
set_capability( "crop padd", 10 );
set_callbacks( OpenCropPadd, CloseFilter );
set_description( N_("FFmpeg crop padd filter") );
/* chroma conversion submodule */
add_submodule();
set_capability( "chroma", 50 );
set_callbacks( OpenChroma, CloseChroma );
set_description( N_("FFmpeg chroma conversion") );
#endif
vlc_module_end();
/*****************************************************************************
......
......@@ -45,7 +45,6 @@
#include "ffmpeg.h"
#if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H)
static int CheckInit( filter_t *p_filter );
static picture_t *Process( filter_t *p_filter, picture_t *p_pic );
......@@ -564,4 +563,3 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
p_pic->pf_release( p_pic );
return p_pic_dst;
}
#endif /* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment