Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
27237904
Commit
27237904
authored
Sep 06, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/FFmpeg/libavcodec where applicable
parent
aff4cad7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
38 additions
and
44 deletions
+38
-44
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+2
-3
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.c
+1
-2
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/avcodec.h
+2
-2
modules/codec/avcodec/avcommon.h
modules/codec/avcodec/avcommon.h
+2
-2
modules/codec/avcodec/chroma.c
modules/codec/avcodec/chroma.c
+1
-1
modules/codec/avcodec/deinterlace.c
modules/codec/avcodec/deinterlace.c
+1
-2
modules/codec/avcodec/dxva2.c
modules/codec/avcodec/dxva2.c
+1
-1
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+13
-14
modules/codec/avcodec/fourcc.c
modules/codec/avcodec/fourcc.c
+1
-1
modules/codec/avcodec/subtitle.c
modules/codec/avcodec/subtitle.c
+4
-5
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+1
-1
modules/codec/avcodec/vda.c
modules/codec/avcodec/vda.c
+2
-2
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+7
-8
No files found.
modules/codec/avcodec/audio.c
View file @
27237904
/*****************************************************************************
* audio.c: audio decoder using
ffmpeg
library
* audio.c: audio decoder using
libavcodec
library
*****************************************************************************
* Copyright (C) 1999-2003 the VideoLAN team
* $Id$
...
...
@@ -34,7 +34,6 @@
#include <vlc_codec.h>
#include <vlc_avcodec.h>
/* ffmpeg header */
#include <libavcodec/avcodec.h>
#include <libavutil/mem.h>
...
...
@@ -138,7 +137,7 @@ static void InitDecoderConfig( decoder_t *p_dec, AVCodecContext *p_context )
/*****************************************************************************
* InitAudioDec: initialize audio decoder
*****************************************************************************
* The
ffmpeg
codec will be opened, some memory allocated.
* The
avcodec
codec will be opened, some memory allocated.
*****************************************************************************/
int
InitAudioDec
(
decoder_t
*
p_dec
,
AVCodecContext
*
p_context
,
AVCodec
*
p_codec
,
int
i_codec_id
,
const
char
*
psz_namecodec
)
...
...
modules/codec/avcodec/avcodec.c
View file @
27237904
...
...
@@ -35,7 +35,6 @@
#include <vlc_avcodec.h>
#include <vlc_cpu.h>
/* ffmpeg header */
#define HAVE_MMX 1
#include <libavcodec/avcodec.h>
...
...
@@ -454,7 +453,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec )
vlc_avcodec_unlock
();
if
(
ret
<
0
)
return
VLC_EGENERIC
;
msg_Dbg
(
p_dec
,
"
ffmpeg
codec (%s) started"
,
p_sys
->
psz_namecodec
);
msg_Dbg
(
p_dec
,
"
avcodec
codec (%s) started"
,
p_sys
->
psz_namecodec
);
#ifdef HAVE_AVCODEC_MT
if
(
p_dec
->
fmt_in
.
i_cat
==
VIDEO_ES
)
...
...
modules/codec/avcodec/avcodec.h
View file @
27237904
...
...
@@ -74,7 +74,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
#define ERROR_TEXT N_("Error resilience")
#define ERROR_LONGTEXT N_( \
"
FFmpeg
can do error resilience.\n" \
"
libavcodec
can do error resilience.\n" \
"However, with a buggy encoder (such as the ISO MPEG-4 encoder from M$) " \
"this can produce a lot of errors.\n" \
"Valid values range from 0 to 4 (0 disables all errors resilience).")
...
...
@@ -261,7 +261,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
#define ENC_PROFILE_LONGTEXT N_( "Specify the AAC audio profile to use " \
"for encoding the audio bitstream. It takes the following options: " \
"main, low, ssr (not supported),ltp, hev1, hev2 (default: low). " \
"hev1
and hev2 are currently supported only with libfdk-aac enabled ffmpeg/libav
" )
"hev1
and hev2 are currently supported only with libfdk-aac enabled libavcodec
" )
#define AVCODEC_COMMON_MEMBERS \
int i_cat; \
...
...
modules/codec/avcodec/avcommon.h
View file @
27237904
...
...
@@ -61,8 +61,8 @@ static inline void vlc_init_avcodec(void)
# if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 51, 7, 0 )
# include <libavutil/dict.h>
#define AV_OPTIONS_TEXT "
FFmpeg a
dvanced options."
#define AV_OPTIONS_LONGTEXT "
FFmpeg a
dvanced options, in the form {opt=val,opt2=val2} ."
#define AV_OPTIONS_TEXT "
A
dvanced options."
#define AV_OPTIONS_LONGTEXT "
A
dvanced options, in the form {opt=val,opt2=val2} ."
static
inline
AVDictionary
*
vlc_av_get_options
(
const
char
*
psz_opts
)
{
...
...
modules/codec/avcodec/chroma.c
View file @
27237904
...
...
@@ -34,7 +34,7 @@
#include "chroma.h"
/*****************************************************************************
* Chroma fourcc ->
ffmpeg_id
mapping
* Chroma fourcc ->
libavutil pixfmt
mapping
*****************************************************************************/
#if defined(WORDS_BIGENDIAN)
# define VLC_RGB_ES( fcc, leid, beid ) \
...
...
modules/codec/avcodec/deinterlace.c
View file @
27237904
/*****************************************************************************
* deinterlace.c: video filter doing chroma conversion and resizing
* using the
ffmpeg
library
* using the
libavcodec
library
*****************************************************************************
* Copyright (C) 1999-2001 the VideoLAN team
* $Id$
...
...
@@ -33,7 +33,6 @@
#include <vlc_codec.h>
#include <vlc_filter.h>
/* ffmpeg header */
#include <libavcodec/avcodec.h>
#include "avcodec.h"
...
...
modules/codec/avcodec/dxva2.c
View file @
27237904
...
...
@@ -433,7 +433,7 @@ static int Get(vlc_va_t *external, AVFrame *ff)
}
/* Grab an unused surface, in case none are, try the oldest
* XXX using the oldest is a workaround in case a problem happens with
ffmpeg
*/
* XXX using the oldest is a workaround in case a problem happens with
libavcodec
*/
unsigned
i
,
old
;
for
(
i
=
0
,
old
=
0
;
i
<
va
->
surface_count
;
i
++
)
{
vlc_va_surface_t
*
surface
=
&
va
->
surface
[
i
];
...
...
modules/codec/avcodec/encoder.c
View file @
27237904
/*****************************************************************************
* encoder.c: video and audio encoder using the
ffmpeg
library
* encoder.c: video and audio encoder using the
libavcodec
library
*****************************************************************************
* Copyright (C) 1999-2004 the VideoLAN team
* $Id$
...
...
@@ -7,7 +7,7 @@
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.org>
* Christophe Massiot <massiot@via.ecp.fr>
* Part of the file Copyright (C) FF
MPEG
Project Developers
* Part of the file Copyright (C) FF
mpeg
Project Developers
* (mpeg4_default matrixes)
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -40,7 +40,6 @@
#include <vlc_avcodec.h>
#include <vlc_cpu.h>
/* ffmpeg header */
#define HAVE_MMX 1
#include <libavcodec/avcodec.h>
...
...
@@ -84,12 +83,12 @@ struct thread_context_t
};
/*****************************************************************************
* encoder_sys_t :
ffmpeg
encoder descriptor
* encoder_sys_t :
libavcodec
encoder descriptor
*****************************************************************************/
struct
encoder_sys_t
{
/*
*
Ffmpeg
properties
*
libavcodec
properties
*/
AVCodec
*
p_codec
;
AVCodecContext
*
p_context
;
...
...
@@ -276,8 +275,8 @@ int OpenEncoder( vlc_object_t *p_this )
if
(
!
p_codec
)
{
msg_Err
(
p_enc
,
"cannot find encoder %s
\n
"
"*** Your
FFMPEG
installation is crippled. ***
\n
"
"*** Please check with your
FFMPEG
packager. ***
\n
"
"*** Your
Libav/FFmpeg
installation is crippled. ***
\n
"
"*** Please check with your
Libav/FFmpeg
packager. ***
\n
"
"*** This is NOT a VLC media player issue. ***"
,
psz_namecodec
);
dialog_Fatal
(
p_enc
,
_
(
"Streaming / Transcoding failed"
),
_
(
...
...
@@ -285,7 +284,7 @@ int OpenEncoder( vlc_object_t *p_this )
* Downstream packager, you had better not patch this out, or I will be really
* annoyed. Think about it - you don't want to fork the VLC translation files,
* do you? -- Courmisch, 2008-10-22 */
"It seems your
FFMPEG
(libavcodec) installation lacks the following encoder:
\n
"
"It seems your
Libav/FFmpeg
(libavcodec) installation lacks the following encoder:
\n
"
"%s.
\n
"
"If you don't know how to fix this, ask for support from your distribution.
\n
"
"
\n
"
...
...
@@ -374,7 +373,7 @@ int OpenEncoder( vlc_object_t *p_this )
p_sys
->
i_chroma_elim
=
var_GetInteger
(
p_enc
,
ENC_CFG_PREFIX
"chroma-elim-threshold"
);
psz_val
=
var_GetString
(
p_enc
,
ENC_CFG_PREFIX
"aac-profile"
);
/*
ffmpeg
uses faac encoder atm, and it has issues with
/*
libavcodec
uses faac encoder atm, and it has issues with
* other than low-complexity profile, so default to that */
p_sys
->
i_aac_profile
=
FF_PROFILE_AAC_LOW
;
if
(
psz_val
&&
*
psz_val
)
...
...
@@ -390,7 +389,7 @@ int OpenEncoder( vlc_object_t *p_this )
else
if
(
!
strncmp
(
psz_val
,
"ltp"
,
3
)
)
p_sys
->
i_aac_profile
=
FF_PROFILE_AAC_LTP
;
#if LIBAVCODEC_VERSION_CHECK( 54, 19, 0, 35, 100 )
/* These require
ffmpeg
with libfdk-aac */
/* These require
libavcodec
with libfdk-aac */
else
if
(
!
strncmp
(
psz_val
,
"hev2"
,
4
)
)
p_sys
->
i_aac_profile
=
FF_PROFILE_AAC_HE_V2
;
else
if
(
!
strncmp
(
psz_val
,
"hev1"
,
4
)
)
...
...
@@ -627,10 +626,10 @@ int OpenEncoder( vlc_object_t *p_this )
if
(
!
var_GetInteger
(
p_enc
,
ENC_CFG_PREFIX
"keyint"
)
)
p_context
->
gop_size
=
120
;
/* Don't set rc-values atm, they were from time before
libvpx was officially in
ff
mpeg */
libvpx was officially in
FF
mpeg */
//p_context->rc_max_rate = 24 * 1000 * 1000; //24M
//p_context->rc_min_rate = 40 * 1000; // 40k
/* seems that
ff
mpeg presets have 720p as divider for buffers */
/* seems that
FF
mpeg presets have 720p as divider for buffers */
if
(
p_enc
->
fmt_out
.
video
.
i_height
>=
720
)
{
/* Check that we don't overrun users qmin/qmax values */
...
...
@@ -874,7 +873,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
frame
.
linesize
[
i_plane
]
=
p_pict
->
p
[
i_plane
].
i_pitch
;
}
/* Let
ffmpeg
select the frame type */
/* Let
libavcodec
select the frame type */
frame
.
pict_type
=
0
;
frame
.
repeat_pict
=
p_pict
->
i_nb_fields
-
2
;
...
...
@@ -1136,7 +1135,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
}
/*****************************************************************************
* CloseEncoder:
ffmpeg
encoder destruction
* CloseEncoder:
libavcodec
encoder destruction
*****************************************************************************/
void
CloseEncoder
(
vlc_object_t
*
p_this
)
{
...
...
modules/codec/avcodec/fourcc.c
View file @
27237904
...
...
@@ -33,7 +33,7 @@
#include "avcodec.h"
/*****************************************************************************
* Codec fourcc ->
ffmpeg
_id mapping
* Codec fourcc ->
libavcodec Codec
_id mapping
*****************************************************************************/
static
const
struct
{
...
...
modules/codec/avcodec/subtitle.c
View file @
27237904
/*****************************************************************************
* subtitle.c: subtitle decoder using
ffmpeg
library
* subtitle.c: subtitle decoder using
libavcodec
library
*****************************************************************************
* Copyright (C) 2009 Laurent Aimar
* $Id$
...
...
@@ -33,7 +33,6 @@
#include <vlc_codec.h>
#include <vlc_avcodec.h>
/* ffmpeg header */
#include <libavcodec/avcodec.h>
#include <libavutil/mem.h>
#ifdef HAVE_AVCODEC_VAAPI
...
...
@@ -101,7 +100,7 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
}
/* */
msg_Dbg
(
dec
,
"
ffmpeg
codec (%s) started"
,
namecodec
);
msg_Dbg
(
dec
,
"
libavcodec
codec (%s) started"
,
namecodec
);
dec
->
fmt_out
.
i_cat
=
SPU_ES
;
return
VLC_SUCCESS
;
...
...
@@ -186,7 +185,7 @@ void EndSubtitleDec(decoder_t *dec)
}
/**
* Convert a RGBA
ffmpeg
region to our format.
* Convert a RGBA
libavcodec
region to our format.
*/
static
subpicture_region_t
*
ConvertRegionRGBA
(
AVSubtitleRect
*
ffregion
)
{
...
...
@@ -233,7 +232,7 @@ static subpicture_region_t *ConvertRegionRGBA(AVSubtitleRect *ffregion)
}
/**
* Convert a
ffmpeg
subtitle to our format.
* Convert a
libavcodec
subtitle to our format.
*/
static
subpicture_t
*
ConvertSubtitle
(
decoder_t
*
dec
,
AVSubtitle
*
ffsub
,
mtime_t
pts
)
{
...
...
modules/codec/avcodec/vaapi.c
View file @
27237904
/*****************************************************************************
* vaapi.c: VAAPI helpers for the
ffmpeg
decoder
* vaapi.c: VAAPI helpers for the
libavcodec
decoder
*****************************************************************************
* Copyright (C) 2009 Laurent Aimar
* $Id$
...
...
modules/codec/avcodec/vda.c
View file @
27237904
/*****************************************************************************
* vda.c: VDA helpers for the
ffmpeg
decoder
* vda.c: VDA helpers for the
libavcodec
decoder
*****************************************************************************
* Copyright © 2012 VideoLAN
*
...
...
@@ -159,7 +159,7 @@ static int Setup( vlc_va_t *p_external, void **pp_hw_ctx, vlc_fourcc_t *pi_chrom
}
ok:
/* Setup the
ffmpeg
hardware context */
/* Setup the
libavcodec
hardware context */
*
pp_hw_ctx
=
&
p_va
->
hw_ctx
;
*
pi_chroma
=
p_va
->
i_chroma
;
...
...
modules/codec/avcodec/video.c
View file @
27237904
/*****************************************************************************
* video.c: video decoder using the
ffmpeg
library
* video.c: video decoder using the
libavcodec
library
*****************************************************************************
* Copyright (C) 1999-2001 the VideoLAN team
* $Id$
...
...
@@ -43,7 +43,6 @@
#include <vlc_cpu.h>
#include <assert.h>
/* ffmpeg header */
#include <libavcodec/avcodec.h>
#include <libavutil/mem.h>
#ifdef HAVE_AVCODEC_VAAPI
...
...
@@ -258,7 +257,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
if
(
var_CreateGetBool
(
p_dec
,
"avcodec-fast"
)
)
p_sys
->
p_context
->
flags2
|=
CODEC_FLAG2_FAST
;
/* *****
ffmpeg
frame skipping ***** */
/* *****
libavcodec
frame skipping ***** */
p_sys
->
b_hurry_up
=
var_CreateGetBool
(
p_dec
,
"avcodec-hurry-up"
);
switch
(
var_CreateGetInteger
(
p_dec
,
"avcodec-skip-frame"
)
)
...
...
@@ -307,7 +306,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
}
p_sys
->
i_skip_idct
=
p_sys
->
p_context
->
skip_idct
;
/* *****
ffmpeg
direct rendering ***** */
/* *****
libavcodec
direct rendering ***** */
p_sys
->
b_direct_rendering
=
false
;
p_sys
->
i_direct_rendering_used
=
-
1
;
if
(
var_CreateGetBool
(
p_dec
,
"avcodec-dr"
)
&&
...
...
@@ -327,7 +326,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys
->
b_direct_rendering
=
true
;
}
/*
ffmpeg
doesn't properly release old pictures when frames are skipped */
/*
libavcodec
doesn't properly release old pictures when frames are skipped */
//if( p_sys->b_hurry_up ) p_sys->b_direct_rendering = false;
if
(
p_sys
->
b_direct_rendering
)
{
...
...
@@ -373,13 +372,13 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
#ifdef HAVE_AVCODEC_MT
if
(
p_sys
->
p_context
->
thread_type
&
FF_THREAD_FRAME
)
{
msg_Warn
(
p_dec
,
"threaded frame decoding is not compatible with
ffmpeg
-hw, disabled"
);
msg_Warn
(
p_dec
,
"threaded frame decoding is not compatible with
libavcodec
-hw, disabled"
);
p_sys
->
p_context
->
thread_type
&=
~
FF_THREAD_FRAME
;
}
if
(
(
p_sys
->
p_context
->
thread_type
&
FF_THREAD_SLICE
)
&&
(
i_codec_id
==
CODEC_ID_MPEG1VIDEO
||
i_codec_id
==
CODEC_ID_MPEG2VIDEO
)
)
{
msg_Warn
(
p_dec
,
"threaded slice decoding is not compatible with
ffmpeg
-hw, disabled"
);
msg_Warn
(
p_dec
,
"threaded slice decoding is not compatible with
libavcodec
-hw, disabled"
);
p_sys
->
p_context
->
thread_type
&=
~
FF_THREAD_SLICE
;
}
#endif
...
...
@@ -575,7 +574,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
/*
* Do the actual decoding now */
/* Don't forget that
ffmpeg
requires a little more bytes
/* Don't forget that
libavcodec
requires a little more bytes
* that the real frame size */
if
(
p_block
->
i_buffer
>
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment