]> git.sesse.net Git - vlc/commitdiff
Split Avutil<->VLC chroma conversions functions from avcodec.h so that swscale doesn...
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 22 Jul 2010 10:59:03 +0000 (12:59 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 22 Jul 2010 11:00:13 +0000 (13:00 +0200)
modules/codec/avcodec/Modules.am
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/chroma.c
modules/codec/avcodec/chroma.h [new file with mode: 0644]
modules/demux/avformat/demux.c
modules/video_filter/swscale.c

index 2a40979a0fb0195364bd4254ad2ef478ffd36783..4ffe18d7d203f349202bf994740ad1bf3335a154 100644 (file)
@@ -7,6 +7,7 @@ libavcodec_plugin_la_SOURCES = \
        deinterlace.c \
        avutil.h \
        fourcc.c \
+       chroma.h \
        chroma.c \
        vaapi.c \
        dxva2.c \
index b3b3feb54c322b402b219f842166cc70ce7a8f2a..c5b844f21caefc651c70a239a8d23f73245796bd 100644 (file)
@@ -47,6 +47,7 @@
 
 #include "avcodec.h"
 #include "avutil.h"
+#include "chroma.h"
 
 #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 25, 0 )
 #   error You must update libavcodec to a version >= 52.25.0
index 605168034a00b8ad86c9bcfa833f3b259646b2e2..33c4c178175ec2b95ecf86358b53fc928e4edcd9 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include "chroma.h"
 /* VLC <-> avcodec tables */
 int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
                     int *pi_ffmpeg_codec, const char **ppsz_name );
 int GetVlcFourcc( int i_ffmpeg_codec, int *pi_cat,
                   vlc_fourcc_t *pi_fourcc, const char **ppsz_name );
-int TestFfmpegChroma( const int i_ffmpeg_id, const vlc_fourcc_t i_vlc_fourcc );
-int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fmt );
-int GetVlcChroma( video_format_t *fmt, const int i_ffmpeg_chroma );
 void GetVlcAudioFormat( vlc_fourcc_t *, unsigned *pi_bits, int i_sample_fmt );
 
-
 picture_t * DecodeVideo    ( decoder_t *, block_t ** );
 aout_buffer_t * DecodeAudio( decoder_t *, block_t ** );
 subpicture_t *DecodeSubtitle( decoder_t *p_dec, block_t ** );
index 2a248b4dbb3d2a159bd4e34b9d278b3139e031ba..4c198f666cafa5f5d110beaae1875de5d8d3bdb3 100644 (file)
 #include <vlc_common.h>
 #include <vlc_codec.h>
 
-#ifdef HAVE_LIBAVCODEC_AVCODEC_H
-#   include <libavcodec/avcodec.h>
-#elif defined(HAVE_FFMPEG_AVCODEC_H)
-#   include <ffmpeg/avcodec.h>
-#else
-#   include <avcodec.h>
-#endif
-#include "avcodec.h"
+#include <libavutil/avutil.h>
+#include "chroma.h"
 
 /*****************************************************************************
  * Chroma fourcc -> ffmpeg_id mapping
diff --git a/modules/codec/avcodec/chroma.h b/modules/codec/avcodec/chroma.h
new file mode 100644 (file)
index 0000000..0a0970a
--- /dev/null
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * avcodec.h: decoder and encoder using libavcodec
+ *****************************************************************************
+ * Copyright (C) 2001-2008 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Laurent Aimar <fenrir@via.ecp.fr>
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/* VLC <-> avutil tables */
+
+#ifndef _VLC_AVUTIL_CHROMA_H
+#define _VLC_AVUTIL_CHROMA_H 1
+
+int TestFfmpegChroma( const int i_ffmpeg_id, const vlc_fourcc_t i_vlc_fourcc );
+int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fmt );
+int GetVlcChroma( video_format_t *fmt, const int i_ffmpeg_chroma );
+
+#endif
index 4ad3ccbe8280c8a73b3ddc5dc04abfb40efcf976..a8042b8e5d0299bfa0cac9ca5bc47bb9eb61f3a3 100644 (file)
@@ -46,6 +46,7 @@
 #endif
 
 #include "../../codec/avcodec/avcodec.h"
+#include "../../codec/avcodec/chroma.h"
 #include "avformat.h"
 #include "../xiph.h"
 #include "../vobsub.h"
index 8c1d879908f50b834257290dc770693cf96c2c11..421c84e05e2909d5e93f458bd62a22d2ae9d7de6 100644 (file)
 
 #ifdef HAVE_LIBSWSCALE_SWSCALE_H
 #   include <libswscale/swscale.h>
-#   include <libavcodec/avcodec.h>
 #elif defined(HAVE_FFMPEG_SWSCALE_H)
 #   include <ffmpeg/swscale.h>
-#   include <ffmpeg/avcodec.h>
 #endif
 
+#include "../codec/avcodec/chroma.h" // Chroma Avutil <-> VLC conversion
+
 /* Gruikkkkkkkkkk!!!!! */
-#include "../codec/avcodec/avcodec.h"
 #undef AVPALETTE_SIZE
-
 #define AVPALETTE_SIZE (256 * sizeof(uint32_t))
 
 /*****************************************************************************