Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
deeb99dc
Commit
deeb99dc
authored
Oct 19, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorize avcodec chroma table - another 2kb
parent
a1f8e0eb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
8 deletions
+26
-8
modules/codec/avcodec/Modules.am
modules/codec/avcodec/Modules.am
+1
-1
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/avcodec.h
+5
-0
modules/codec/avcodec/chroma.c
modules/codec/avcodec/chroma.c
+20
-4
modules/codec/avcodec/deinterlace.c
modules/codec/avcodec/deinterlace.c
+0
-1
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+0
-1
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+0
-1
No files found.
modules/codec/avcodec/Modules.am
View file @
deeb99dc
...
@@ -6,7 +6,7 @@ SOURCES_avcodec = \
...
@@ -6,7 +6,7 @@ SOURCES_avcodec = \
deinterlace.c \
deinterlace.c \
avutil.h \
avutil.h \
fourcc.c \
fourcc.c \
chroma.
h
\
chroma.
c
\
$(NULL)
$(NULL)
if ENABLE_SOUT
if ENABLE_SOUT
...
...
modules/codec/avcodec/avcodec.h
View file @
deeb99dc
...
@@ -21,10 +21,15 @@
...
@@ -21,10 +21,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
/* VLC <-> avcodec tables */
int
GetFfmpegCodec
(
vlc_fourcc_t
i_fourcc
,
int
*
pi_cat
,
int
GetFfmpegCodec
(
vlc_fourcc_t
i_fourcc
,
int
*
pi_cat
,
int
*
pi_ffmpeg_codec
,
const
char
**
ppsz_name
);
int
*
pi_ffmpeg_codec
,
const
char
**
ppsz_name
);
int
GetVlcFourcc
(
int
i_ffmpeg_codec
,
int
*
pi_cat
,
int
GetVlcFourcc
(
int
i_ffmpeg_codec
,
int
*
pi_cat
,
vlc_fourcc_t
*
pi_fourcc
,
const
char
**
ppsz_name
);
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
);
picture_t
*
DecodeVideo
(
decoder_t
*
,
block_t
**
);
picture_t
*
DecodeVideo
(
decoder_t
*
,
block_t
**
);
aout_buffer_t
*
DecodeAudio
(
decoder_t
*
,
block_t
**
);
aout_buffer_t
*
DecodeAudio
(
decoder_t
*
,
block_t
**
);
...
...
modules/codec/avcodec/chroma.
h
→
modules/codec/avcodec/chroma.
c
View file @
deeb99dc
/*****************************************************************************
/*****************************************************************************
* chroma.
h
: libavutil <-> libvlc conversion routines
* chroma.
c
: libavutil <-> libvlc conversion routines
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2008 the VideoLAN team
* Copyright (C) 1999-2008 the VideoLAN team
* $Id$
* $Id$
...
@@ -22,6 +22,22 @@
...
@@ -22,6 +22,22 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 021100301, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 021100301, USA.
*****************************************************************************/
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#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"
/*****************************************************************************
/*****************************************************************************
* Chroma fourcc -> ffmpeg_id mapping
* Chroma fourcc -> ffmpeg_id mapping
*****************************************************************************/
*****************************************************************************/
...
@@ -101,7 +117,7 @@ static const struct
...
@@ -101,7 +117,7 @@ static const struct
{
0
,
0
,
0
,
0
,
0
}
{
0
,
0
,
0
,
0
,
0
}
};
};
static
inline
int
TestFfmpegChroma
(
const
int
i_ffmpeg_id
,
const
vlc_fourcc_t
i_vlc_fourcc
)
int
TestFfmpegChroma
(
const
int
i_ffmpeg_id
,
const
vlc_fourcc_t
i_vlc_fourcc
)
{
{
for
(
int
i
=
0
;
chroma_table
[
i
].
i_chroma
!=
0
;
i
++
)
for
(
int
i
=
0
;
chroma_table
[
i
].
i_chroma
!=
0
;
i
++
)
{
{
...
@@ -112,7 +128,7 @@ static inline int TestFfmpegChroma( const int i_ffmpeg_id, const vlc_fourcc_t i_
...
@@ -112,7 +128,7 @@ static inline int TestFfmpegChroma( const int i_ffmpeg_id, const vlc_fourcc_t i_
}
}
/* FIXME special case the RGB formats */
/* FIXME special case the RGB formats */
static
inline
int
GetFfmpegChroma
(
int
*
i_ffmpeg_chroma
,
const
video_format_t
fmt
)
int
GetFfmpegChroma
(
int
*
i_ffmpeg_chroma
,
const
video_format_t
fmt
)
{
{
for
(
int
i
=
0
;
chroma_table
[
i
].
i_chroma
!=
0
;
i
++
)
for
(
int
i
=
0
;
chroma_table
[
i
].
i_chroma
!=
0
;
i
++
)
{
{
...
@@ -130,7 +146,7 @@ static inline int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fm
...
@@ -130,7 +146,7 @@ static inline int GetFfmpegChroma( int *i_ffmpeg_chroma, const video_format_t fm
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
static
inline
int
GetVlcChroma
(
video_format_t
*
fmt
,
const
int
i_ffmpeg_chroma
)
int
GetVlcChroma
(
video_format_t
*
fmt
,
const
int
i_ffmpeg_chroma
)
{
{
/* TODO FIXME for rgb format we HAVE to set rgb mask/shift */
/* TODO FIXME for rgb format we HAVE to set rgb mask/shift */
for
(
int
i
=
0
;
chroma_table
[
i
].
i_chroma
!=
0
;
i
++
)
for
(
int
i
=
0
;
chroma_table
[
i
].
i_chroma
!=
0
;
i
++
)
...
...
modules/codec/avcodec/deinterlace.c
View file @
deeb99dc
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#endif
#endif
#include "avcodec.h"
#include "avcodec.h"
#include "chroma.h"
static
picture_t
*
Deinterlace
(
filter_t
*
p_filter
,
picture_t
*
p_pic
);
static
picture_t
*
Deinterlace
(
filter_t
*
p_filter
,
picture_t
*
p_pic
);
...
...
modules/codec/avcodec/encoder.c
View file @
deeb99dc
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
#endif
#endif
#include "avcodec.h"
#include "avcodec.h"
#include "chroma.h"
#define HURRY_UP_GUARD1 (450000)
#define HURRY_UP_GUARD1 (450000)
#define HURRY_UP_GUARD2 (300000)
#define HURRY_UP_GUARD2 (300000)
...
...
modules/codec/avcodec/video.c
View file @
deeb99dc
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#endif
#endif
#include "avcodec.h"
#include "avcodec.h"
#include "chroma.h"
/*****************************************************************************
/*****************************************************************************
* decoder_sys_t : decoder descriptor
* decoder_sys_t : decoder descriptor
...
...
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