Commit 5f919fba authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Split Avutil<->VLC chroma conversions functions from avcodec.h so that swscale...

Split Avutil<->VLC chroma conversions functions from avcodec.h so that swscale doesn't depend on libavcodec
parent 378c8027
......@@ -7,6 +7,7 @@ libavcodec_plugin_la_SOURCES = \
deinterlace.c \
avutil.h \
fourcc.c \
chroma.h \
chroma.c \
vaapi.c \
dxva2.c \
......
......@@ -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
......
......@@ -21,17 +21,14 @@
* 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 ** );
......
......@@ -29,14 +29,8 @@
#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
......
/*****************************************************************************
* 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
......@@ -46,6 +46,7 @@
#endif
#include "../../codec/avcodec/avcodec.h"
#include "../../codec/avcodec/chroma.h"
#include "avformat.h"
#include "../xiph.h"
#include "../vobsub.h"
......
......@@ -37,16 +37,14 @@
#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))
/*****************************************************************************
......
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