Changeset c0662427d22a4c90a57a051a46a552eaef1f31bf
- Timestamp:
- 03/06/08 12:29:48
(4 months ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1212488988 +0200
- git-parent:
[1ce62168f30a42924db2535fe8c499e1eae5d2bb]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1212487310 +0200
- Message:
Img resample based module (functionality untested ... but compilation and loading works). Remove unneeded stuff from swscale.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rebbc287 |
rc066242 |
|
| 3009 | 3009 | CPPFLAGS="${CPPFLAGS} ${IMGRESAMPLE_CFLAGS}" |
|---|
| 3010 | 3010 | CFLAGS="${CFLAGS} ${IMGRESAMPLE_CFLAGS}" |
|---|
| 3011 | | LIBS="${CFLAGS} ${IMGRESAMPLE_LIBS}" |
|---|
| 3012 | 3011 | AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h) |
|---|
| 3013 | 3012 | AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h) |
|---|
| … | … | |
| 3023 | 3022 | 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.)]) |
|---|
| 3024 | 3023 | fi |
|---|
| 3025 | | ]) |
|---|
| | 3024 | ],${IMGRESAMPLE_LIBS}) |
|---|
| 3026 | 3025 | VLC_RESTORE_FLAGS |
|---|
| 3027 | 3026 | ],[ |
|---|
| rebbc287 |
rc066242 |
|
| 32 | 32 | swscale.c \ |
|---|
| 33 | 33 | swscale.h \ |
|---|
| 34 | | video_filter.c \ |
|---|
| 35 | | chroma.c \ |
|---|
| 36 | 34 | scale.c \ |
|---|
| 37 | 35 | $(NULL) |
|---|
| 38 | 36 | |
|---|
| 39 | | # FIXME |
|---|
| 40 | 37 | SOURCES_imgresample = \ |
|---|
| 41 | | avcodec.c \ |
|---|
| 42 | | avcodec.h \ |
|---|
| 43 | | video.c \ |
|---|
| 44 | | audio.c \ |
|---|
| 45 | | deinterlace.c \ |
|---|
| | 38 | imgresample.c \ |
|---|
| | 39 | imgresample.h \ |
|---|
| | 40 | chroma.c \ |
|---|
| | 41 | video_filter.c \ |
|---|
| 46 | 42 | $(NULL) |
|---|
| 47 | 43 | |
|---|
| … | … | |
| 54 | 50 | $(LTLIBavformat) \ |
|---|
| 55 | 51 | $(LTLIBswscale) \ |
|---|
| | 52 | $(LTLIBimgresample) \ |
|---|
| 56 | 53 | $(LTLIBpostproc) |
|---|
| 57 | 54 | |
|---|
| … | … | |
| 60 | 57 | libavformat_plugin.la \ |
|---|
| 61 | 58 | libswscale_plugin.la \ |
|---|
| | 59 | libimgresample_plugin.la \ |
|---|
| 62 | 60 | libpostproc_plugin.la |
|---|
| 63 | 61 | |
|---|
| ra519cac |
rc066242 |
|
| 2 | 2 | * chroma.c: chroma conversion using ffmpeg library |
|---|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | | * Copyright (C) 1999-2001 the VideoLAN team |
|---|
| | 4 | * Copyright (C) 1999-2008 the VideoLAN team |
|---|
| 5 | 5 | * $Id$ |
|---|
| 6 | 6 | * |
|---|
| … | … | |
| 32 | 32 | #include <vlc_common.h> |
|---|
| 33 | 33 | #include <vlc_vout.h> |
|---|
| 34 | | |
|---|
| 35 | | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 36 | 34 | #include <vlc_filter.h> |
|---|
| 37 | | #endif |
|---|
| 38 | 35 | |
|---|
| 39 | 36 | /* ffmpeg header */ |
|---|
| … | … | |
| 48 | 45 | #include "ffmpeg.h" |
|---|
| 49 | 46 | |
|---|
| 50 | | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 51 | | static void ChromaConversion( vout_thread_t *, picture_t *, picture_t * ); |
|---|
| | 47 | static void ChromaConversion( filter_t *, picture_t *, picture_t * ); |
|---|
| | 48 | static picture_t *ChromaConversion_Filter( filter_t *, picture_t * ); |
|---|
| 52 | 49 | |
|---|
| 53 | 50 | /***************************************************************************** |
|---|
| … | … | |
| 88 | 85 | } |
|---|
| 89 | 86 | |
|---|
| 90 | | p_filter->pf_video_filter_io = ChromaConversion; |
|---|
| | 87 | p_filter->pf_video_filter = ChromaConversion_Filter; |
|---|
| 91 | 88 | |
|---|
| 92 | 89 | p_filter->p_sys = malloc( sizeof( filter_sys_t ) ); |
|---|
| … | … | |
| 96 | 93 | } |
|---|
| 97 | 94 | |
|---|
| 98 | | p_filter->.p_sys->i_src_vlc_chroma = p_vout->render.i_chroma; |
|---|
| 99 | | p_filter->p_sys->i_dst_vlc_chroma = p_vout->output.i_chroma; |
|---|
| | 95 | p_filter->p_sys->i_src_vlc_chroma = p_filter->fmt_in.video.i_chroma; |
|---|
| | 96 | p_filter->p_sys->i_dst_vlc_chroma = p_filter->fmt_out.video.i_chroma; |
|---|
| 100 | 97 | p_filter->p_sys->i_src_ffmpeg_chroma = i_ffmpeg_chroma[0]; |
|---|
| 101 | 98 | p_filter->p_sys->i_dst_ffmpeg_chroma = i_ffmpeg_chroma[1]; |
|---|
| … | … | |
| 126 | 123 | } |
|---|
| 127 | 124 | |
|---|
| | 125 | VIDEO_FILTER_WRAPPER( ChromaConversion ) |
|---|
| | 126 | |
|---|
| 128 | 127 | /***************************************************************************** |
|---|
| 129 | 128 | * ChromaConversion: actual chroma conversion function |
|---|
| … | … | |
| 201 | 200 | free( p_filter->p_sys ); |
|---|
| 202 | 201 | } |
|---|
| 203 | | #endif |
|---|
| r3561b9b |
rc066242 |
|
| 52 | 52 | |
|---|
| 53 | 53 | /* Version checking */ |
|---|
| 54 | | #if ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)) && (LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)) ) |
|---|
| | 54 | #if LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0) |
|---|
| 55 | 55 | |
|---|
| 56 | 56 | /***************************************************************************** |
|---|
| ra519cac |
rc066242 |
|
| 50 | 50 | #include "ffmpeg.h" |
|---|
| 51 | 51 | |
|---|
| 52 | | #ifdef HAVE_POSTPROC_POSTPROCESS_H |
|---|
| 53 | | # include <postproc/postprocess.h> |
|---|
| 54 | | #else |
|---|
| 55 | | # include <libpostproc/postprocess.h> |
|---|
| 56 | | #endif |
|---|
| 57 | | |
|---|
| 58 | | /***************************************************************************** |
|---|
| 59 | | * decoder_sys_t: decoder descriptor |
|---|
| 60 | | *****************************************************************************/ |
|---|
| 61 | | struct decoder_sys_t |
|---|
| 62 | | { |
|---|
| 63 | | /* Common part between video and audio decoder */ |
|---|
| 64 | | FFMPEG_COMMON_MEMBERS |
|---|
| 65 | | }; |
|---|
| 66 | | |
|---|
| 67 | 52 | /**************************************************************************** |
|---|
| 68 | 53 | * Local prototypes |
|---|
| … | … | |
| 79 | 64 | *****************************************************************************/ |
|---|
| 80 | 65 | vlc_module_begin(); |
|---|
| 81 | | #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 82 | | /* video filter submodule */ |
|---|
| 83 | 66 | set_description( N_("Video scaling filter") ); |
|---|
| 84 | 67 | set_capability( "video filter2", 1000 ); |
|---|
| … | … | |
| 88 | 71 | add_integer( "swscale-mode", 0, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true ); |
|---|
| 89 | 72 | change_integer_list( pi_mode_values, ppsz_mode_descriptions, 0 ); |
|---|
| 90 | | |
|---|
| 91 | | #else |
|---|
| 92 | | /* video filter submodule */ |
|---|
| 93 | | set_capability( "video filter2", 50 ); |
|---|
| 94 | | set_callbacks( OpenFilter, CloseFilter ); |
|---|
| 95 | | set_description( N_("FFmpeg video filter") ); |
|---|
| 96 | | |
|---|
| 97 | | /* crop/padd submodule */ |
|---|
| 98 | | add_submodule(); |
|---|
| 99 | | set_capability( "crop padd", 10 ); |
|---|
| 100 | | set_callbacks( OpenCropPadd, CloseFilter ); |
|---|
| 101 | | set_description( N_("FFmpeg crop padd filter") ); |
|---|
| 102 | | |
|---|
| 103 | | /* chroma conversion submodule */ |
|---|
| 104 | | add_submodule(); |
|---|
| 105 | | set_capability( "chroma", 50 ); |
|---|
| 106 | | set_callbacks( OpenChroma, CloseChroma ); |
|---|
| 107 | | set_description( N_("FFmpeg chroma conversion") ); |
|---|
| 108 | | #endif |
|---|
| 109 | 73 | vlc_module_end(); |
|---|
| 110 | 74 | |
|---|
| ra519cac |
rc066242 |
|
| 46 | 46 | #include "ffmpeg.h" |
|---|
| 47 | 47 | |
|---|
| 48 | | #if !defined(HAVE_LIBSWSCALE_SWSCALE_H) && !defined(HAVE_FFMPEG_SWSCALE_H) |
|---|
| 49 | 48 | static int CheckInit( filter_t *p_filter ); |
|---|
| 50 | 49 | static picture_t *Process( filter_t *p_filter, picture_t *p_pic ); |
|---|
| … | … | |
| 565 | 564 | return p_pic_dst; |
|---|
| 566 | 565 | } |
|---|
| 567 | | #endif /* ( (defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) */ |
|---|