Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b4302875
Commit
b4302875
authored
Jul 14, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify vlc fourcc/ffmpeg pix format conversion.
parent
1b281d5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
31 deletions
+37
-31
modules/codec/avcodec/chroma.h
modules/codec/avcodec/chroma.h
+37
-31
No files found.
modules/codec/avcodec/chroma.h
View file @
b4302875
...
...
@@ -25,6 +25,16 @@
/*****************************************************************************
* Chroma fourcc -> ffmpeg_id mapping
*****************************************************************************/
#define VLC_FF( fcc, fav ) \
{ VLC_FOURCC fcc, fav }
#if defined(WORDS_BIGENDIAN)
# define VLC_FF_RGB_DEFAULT( fcc, le, be ) VLC_FF( fcc, be )
#else
# define VLC_FF_RGB_DEFAULT( fcc, le, be ) VLC_FF( fcc, le )
#endif
static
const
struct
{
vlc_fourcc_t
i_chroma
;
...
...
@@ -33,43 +43,39 @@ static const struct
}
chroma_table
[]
=
{
/* Planar YUV formats */
{
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
),
PIX_FMT_YUV444P
},
/* Hack */
{
VLC_FOURCC
(
'I'
,
'4'
,
'4'
,
'4'
),
PIX_FMT_YUV444P
},
{
VLC_FOURCC
(
'J'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'4'
,
'1'
,
'1'
),
PIX_FMT_YUV411P
),
VLC_FF
(
(
'I'
,
'4'
,
'1'
,
'0'
),
PIX_FMT_YUV410P
),
VLC_FF
(
(
'Y'
,
'V'
,
'U'
,
'9'
),
PIX_FMT_YUV410P
),
/* Packed YUV formats */
{
VLC_FOURCC
(
'Y'
,
'U'
,
'Y'
,
'2'
),
PIX_FMT_YUV422
}
,
{
VLC_FOURCC
(
'Y'
,
'U'
,
'Y'
,
'V'
),
PIX_FMT_YUV422
}
,
{
VLC_FOURCC
(
'U'
,
'Y'
,
'V'
,
'Y'
),
PIX_FMT_UYVY422
}
,
VLC_FF
(
(
'Y'
,
'U'
,
'Y'
,
'2'
),
PIX_FMT_YUV422
)
,
VLC_FF
(
(
'Y'
,
'U'
,
'Y'
,
'V'
),
PIX_FMT_YUV422
)
,
VLC_FF
(
(
'U'
,
'Y'
,
'V'
,
'Y'
),
PIX_FMT_UYVY422
)
,
/* Packed RGB formats */
#if defined(WORDS_BIGENDIAN)
{
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'8'
),
PIX_FMT_BGR8
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'5'
),
PIX_FMT_BGR555
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
),
PIX_FMT_BGR565
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'2'
,
'4'
),
PIX_FMT_BGR24
},
#else
#if defined(PIX_FMT_RGB8)
{
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'8'
),
PIX_FMT_RGB8
},
#endif
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'5'
),
PIX_FMT_RGB555
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
),
PIX_FMT_RGB565
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'2'
,
'4'
),
PIX_FMT_RGB24
},
#endif
{
VLC_FOURCC
(
'R'
,
'V'
,
'3'
,
'2'
),
PIX_FMT_RGBA32
},
VLC_FF_RGB_DEFAULT
(
(
'R'
,
'G'
,
'B'
,
'8'
),
PIX_FMT_RGB8
,
PIX_FMT_BGR8
),
VLC_FF_RGB_DEFAULT
(
(
'R'
,
'V'
,
'1'
,
'5'
),
PIX_FMT_RGB555
,
PIX_FMT_BGR555
),
VLC_FF_RGB_DEFAULT
(
(
'R'
,
'V'
,
'1'
,
'6'
),
PIX_FMT_RGB565
,
PIX_FMT_BGR565
),
VLC_FF_RGB_DEFAULT
(
(
'R'
,
'V'
,
'2'
,
'4'
),
PIX_FMT_RGB24
,
PIX_FMT_BGR24
),
VLC_FF
(
(
'R'
,
'V'
,
'3'
,
'2'
),
PIX_FMT_RGBA32
),
// FIXME is that wanted
#if defined(PIX_FMT_RGBA)
{
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
),
PIX_FMT_RGBA
}
,
VLC_FF
(
(
'R'
,
'G'
,
'B'
,
'A'
),
PIX_FMT_RGBA
)
,
#endif
{
VLC_FOURCC
(
'G'
,
'R'
,
'E'
,
'Y'
),
PIX_FMT_GRAY8
}
,
VLC_FF
(
(
'G'
,
'R'
,
'E'
,
'Y'
),
PIX_FMT_GRAY8
)
,
{
0
,
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