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
80861b6e
Commit
80861b6e
authored
Jun 24, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added planar I420 9/10-bit VLC_CODEC_* definitions and fallbacks.
parent
11353001
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
149 additions
and
12 deletions
+149
-12
include/vlc_fourcc.h
include/vlc_fourcc.h
+22
-3
src/misc/fourcc.c
src/misc/fourcc.c
+127
-9
No files found.
include/vlc_fourcc.h
View file @
80861b6e
...
...
@@ -126,14 +126,32 @@
#define VLC_CODEC_I410 VLC_FOURCC('I','4','1','0')
/* Planar YUV 4:1:1 Y:U:V */
#define VLC_CODEC_I411 VLC_FOURCC('I','4','1','1')
/* Planar YUV 4:2:0 Y:U:V */
/* Planar YUV 4:2:0 Y:U:V
8-bit
*/
#define VLC_CODEC_I420 VLC_FOURCC('I','4','2','0')
/* Planar YUV 4:2:2 Y:U:V */
/* Planar YUV 4:2:0 Y:U:V 9-bit stored on 16 bits */
#define VLC_CODEC_I420_9L VLC_FOURCC('I','0','9','L')
#define VLC_CODEC_I420_9B VLC_FOURCC('I','0','9','B')
/* Planar YUV 4:2:0 Y:U:V 10-bit stored on 16 bits */
#define VLC_CODEC_I420_10L VLC_FOURCC('I','0','A','L')
#define VLC_CODEC_I420_10B VLC_FOURCC('I','0','A','B')
/* Planar YUV 4:2:2 Y:U:V 8-bit */
#define VLC_CODEC_I422 VLC_FOURCC('I','4','2','2')
/* Planar YUV 4:2:2 Y:U:V 9-bit stored on 16 bits */
#define VLC_CODEC_I422_9L VLC_FOURCC('I','2','9','L')
#define VLC_CODEC_I422_9B VLC_FOURCC('I','2','9','B')
/* Planar YUV 4:2:2 Y:U:V 10-bit stored on 16 bits */
#define VLC_CODEC_I422_10L VLC_FOURCC('I','2','A','L')
#define VLC_CODEC_I422_10B VLC_FOURCC('I','2','A','B')
/* Planar YUV 4:4:0 Y:U:V */
#define VLC_CODEC_I440 VLC_FOURCC('I','4','4','0')
/* Planar YUV 4:4:4 Y:U:V */
/* Planar YUV 4:4:4 Y:U:V
8-bit
*/
#define VLC_CODEC_I444 VLC_FOURCC('I','4','4','4')
/* Planar YUV 4:2:2 Y:U:V 9-bit stored on 16 bits */
#define VLC_CODEC_I444_9L VLC_FOURCC('I','4','9','L')
#define VLC_CODEC_I444_9B VLC_FOURCC('I','4','9','B')
/* Planar YUV 4:2:2 Y:U:V 10-bit stored on 16 bits */
#define VLC_CODEC_I444_10L VLC_FOURCC('I','4','A','L')
#define VLC_CODEC_I444_10B VLC_FOURCC('I','4','A','B')
/* Planar YUV 4:2:0 Y:U:V full scale */
#define VLC_CODEC_J420 VLC_FOURCC('J','4','2','0')
/* Planar YUV 4:2:2 Y:U:V full scale */
...
...
@@ -328,6 +346,7 @@
# define VLC_CODEC_U16I VLC_CODEC_U16L
# define VLC_CODEC_S24I VLC_CODEC_S24L
# define VLC_CODEC_S32I VLC_CODEC_S32L
#else
# define VLC_CODEC_S16N VLC_CODEC_S16L
# define VLC_CODEC_U16N VLC_CODEC_U16L
...
...
src/misc/fourcc.c
View file @
80861b6e
...
...
@@ -724,6 +724,32 @@ static const entry_t p_list_video[] = {
B
(
VLC_CODEC_NV12
,
"Planar Y, Packet UV (420)"
),
A
(
"NV12"
),
B
(
VLC_CODEC_I420_9L
,
"Planar 4:2:0 YUV 9-bit LE"
),
A
(
"I09L"
),
B
(
VLC_CODEC_I420_9B
,
"Planar 4:2:0 YUV 9-bit BE"
),
A
(
"I09B"
),
B
(
VLC_CODEC_I422_9L
,
"Planar 4:2:2 YUV 9-bit LE"
),
A
(
"I29L"
),
B
(
VLC_CODEC_I422_9B
,
"Planar 4:2:2 YUV 9-bit BE"
),
A
(
"I29B"
),
B
(
VLC_CODEC_I444_9L
,
"Planar 4:4:4 YUV 9-bit LE"
),
A
(
"I49L"
),
B
(
VLC_CODEC_I444_9B
,
"Planar 4:4:4 YUV 9-bit BE"
),
A
(
"I49B"
),
B
(
VLC_CODEC_I420_10L
,
"Planar 4:2:0 YUV 10-bit LE"
),
A
(
"I0AL"
),
B
(
VLC_CODEC_I420_10B
,
"Planar 4:2:0 YUV 10-bit BE"
),
A
(
"I0AB"
),
B
(
VLC_CODEC_I422_10L
,
"Planar 4:2:2 YUV 10-bit LE"
),
A
(
"I2AL"
),
B
(
VLC_CODEC_I422_10B
,
"Planar 4:2:2 YUV 10-bit BE"
),
A
(
"I2AB"
),
B
(
VLC_CODEC_I444_10L
,
"Planar 4:4:4 YUV 10-bit LE"
),
A
(
"I4AL"
),
B
(
VLC_CODEC_I444_10B
,
"Planar 4:4:4 YUV 10-bit BE"
),
A
(
"I4AB"
),
/* Videogames Codecs */
/* Interplay MVE */
...
...
@@ -1379,15 +1405,24 @@ const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
#define VLC_CODEC_YUV_PLANAR_420 \
VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420
#define VLC_CODEC_YUV_PLANAR_420_16 \
VLC_CODEC_I420_10L, VLC_CODEC_I420_10B, VLC_CODEC_I420_9L, VLC_CODEC_I420_9B
#define VLC_CODEC_YUV_PLANAR_422 \
VLC_CODEC_I422, VLC_CODEC_J422
#define VLC_CODEC_YUV_PLANAR_422_16 \
VLC_CODEC_I422_10L, VLC_CODEC_I422_10B, VLC_CODEC_I422_9L, VLC_CODEC_I422_9B
#define VLC_CODEC_YUV_PLANAR_440 \
VLC_CODEC_I440, VLC_CODEC_J440
#define VLC_CODEC_YUV_PLANAR_444 \
VLC_CODEC_I444, VLC_CODEC_J444
#define VLC_CODEC_YUV_PLANAR_444_16 \
VLC_CODEC_I444_10L, VLC_CODEC_I444_10B, VLC_CODEC_I444_9L, VLC_CODEC_I444_9B
#define VLC_CODEC_YUV_PACKED \
VLC_CODEC_YUYV, VLC_CODEC_YVYU, \
VLC_CODEC_UYVY, VLC_CODEC_VYUY
...
...
@@ -1407,6 +1442,22 @@ static const vlc_fourcc_t p_YV12_fallback[] = {
VLC_CODEC_YV12
,
VLC_CODEC_I420
,
VLC_CODEC_J420
,
VLC_CODEC_FALLBACK_420
,
0
};
#define VLC_CODEC_FALLBACK_420_16 \
VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420, VLC_CODEC_FALLBACK_420
static
const
vlc_fourcc_t
p_I420_9L_fallback
[]
=
{
VLC_CODEC_I420_9L
,
VLC_CODEC_I420_9B
,
VLC_CODEC_FALLBACK_420_16
,
0
};
static
const
vlc_fourcc_t
p_I420_9B_fallback
[]
=
{
VLC_CODEC_I420_9B
,
VLC_CODEC_I420_9L
,
VLC_CODEC_FALLBACK_420_16
,
0
};
static
const
vlc_fourcc_t
p_I420_10L_fallback
[]
=
{
VLC_CODEC_I420_10L
,
VLC_CODEC_I420_10B
,
VLC_CODEC_FALLBACK_420_16
,
0
};
static
const
vlc_fourcc_t
p_I420_10B_fallback
[]
=
{
VLC_CODEC_I420_10B
,
VLC_CODEC_I420_10L
,
VLC_CODEC_FALLBACK_420_16
,
0
};
#define VLC_CODEC_FALLBACK_422 \
VLC_CODEC_YUV_PACKED, VLC_CODEC_YUV_PLANAR_420, \
VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
...
...
@@ -1419,6 +1470,22 @@ static const vlc_fourcc_t p_J422_fallback[] = {
VLC_CODEC_J422
,
VLC_CODEC_I422
,
VLC_CODEC_FALLBACK_422
,
0
};
#define VLC_CODEC_FALLBACK_422_16 \
VLC_CODEC_I422, VLC_CODEC_J422, VLC_CODEC_FALLBACK_422
static
const
vlc_fourcc_t
p_I422_9L_fallback
[]
=
{
VLC_CODEC_I422_9L
,
VLC_CODEC_I422_9B
,
VLC_CODEC_FALLBACK_422_16
,
0
};
static
const
vlc_fourcc_t
p_I422_9B_fallback
[]
=
{
VLC_CODEC_I422_9B
,
VLC_CODEC_I422_9L
,
VLC_CODEC_FALLBACK_422_16
,
0
};
static
const
vlc_fourcc_t
p_I422_10L_fallback
[]
=
{
VLC_CODEC_I422_10L
,
VLC_CODEC_I422_10B
,
VLC_CODEC_FALLBACK_422_16
,
0
};
static
const
vlc_fourcc_t
p_I422_10B_fallback
[]
=
{
VLC_CODEC_I422_10B
,
VLC_CODEC_I422_10L
,
VLC_CODEC_FALLBACK_422_16
,
0
};
#define VLC_CODEC_FALLBACK_444 \
VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PACKED, \
VLC_CODEC_YUV_PLANAR_420, VLC_CODEC_YUV_PLANAR_440, \
...
...
@@ -1431,6 +1498,22 @@ static const vlc_fourcc_t p_J444_fallback[] = {
VLC_CODEC_J444
,
VLC_CODEC_I444
,
VLC_CODEC_FALLBACK_444
,
0
};
#define VLC_CODEC_FALLBACK_444_16 \
VLC_CODEC_I444, VLC_CODEC_J444, VLC_CODEC_FALLBACK_444
static
const
vlc_fourcc_t
p_I444_9L_fallback
[]
=
{
VLC_CODEC_I444_9L
,
VLC_CODEC_I444_9B
,
VLC_CODEC_FALLBACK_444_16
,
0
};
static
const
vlc_fourcc_t
p_I444_9B_fallback
[]
=
{
VLC_CODEC_I444_9B
,
VLC_CODEC_I444_9L
,
VLC_CODEC_FALLBACK_444_16
,
0
};
static
const
vlc_fourcc_t
p_I444_10L_fallback
[]
=
{
VLC_CODEC_I444_10L
,
VLC_CODEC_I444_10B
,
VLC_CODEC_FALLBACK_444_16
,
0
};
static
const
vlc_fourcc_t
p_I444_10B_fallback
[]
=
{
VLC_CODEC_I444_10B
,
VLC_CODEC_I444_10L
,
VLC_CODEC_FALLBACK_444_16
,
0
};
static
const
vlc_fourcc_t
p_I440_fallback
[]
=
{
VLC_CODEC_I440
,
VLC_CODEC_YUV_PLANAR_420
,
...
...
@@ -1477,16 +1560,30 @@ static const vlc_fourcc_t p_VYUY_fallback[] = {
static
const
vlc_fourcc_t
*
pp_YUV_fallback
[]
=
{
p_YV12_fallback
,
p_I420_fallback
,
p_I420_9L_fallback
,
p_I420_9B_fallback
,
p_I420_10L_fallback
,
p_I420_10B_fallback
,
p_J420_fallback
,
p_I422_fallback
,
p_I422_9L_fallback
,
p_I422_9B_fallback
,
p_I422_10L_fallback
,
p_I422_10B_fallback
,
p_J422_fallback
,
p_I444_fallback
,
p_J444_fallback
,
p_I444_9L_fallback
,
p_I444_9B_fallback
,
p_I444_10L_fallback
,
p_I444_10B_fallback
,
p_I440_fallback
,
p_YUYV_fallback
,
p_YVYU_fallback
,
p_UYVY_fallback
,
p_VYUY_fallback
,
NULL
,
};
...
...
@@ -1497,6 +1594,9 @@ static const vlc_fourcc_t p_list_YUV[] = {
VLC_CODEC_YUV_PLANAR_444
,
VLC_CODEC_YUV_PACKED
,
VLC_CODEC_I411
,
VLC_CODEC_YUV_PLANAR_410
,
VLC_CODEC_Y211
,
VLC_CODEC_YUV_PLANAR_420_16
,
VLC_CODEC_YUV_PLANAR_422_16
,
VLC_CODEC_YUV_PLANAR_444_16
,
0
,
};
...
...
@@ -1610,13 +1710,16 @@ bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
return
false
;
}
#define PLANAR(n, w_den, h_den) \
#define PLANAR(n, w_den, h_den
, size
) \
{ .plane_count = n, \
.p = { {.w = {1, 1}, .h = {1, 1}}, \
{.w = {1,w_den}, .h = {1,h_den}}, \
{.w = {1,w_den}, .h = {1,h_den}}, \
{.w = {1, 1}, .h = {1, 1}} }, \
.pixel_size = 1 }
.pixel_size = size }
#define PLANAR_8(n, w_den, h_den) PLANAR(n, w_den, h_den, 1)
#define PLANAR_16(n, w_den, h_den) PLANAR(n, w_den, h_den, 2)
#define PACKED_FMT(size) \
{ .plane_count = 1, \
...
...
@@ -1628,13 +1731,26 @@ static const struct
vlc_fourcc_t
p_fourcc
[
6
];
vlc_chroma_description_t
description
;
}
p_list_chroma_description
[]
=
{
{
{
VLC_CODEC_I411
,
0
},
PLANAR
(
3
,
4
,
1
)
},
{
{
VLC_CODEC_YUV_PLANAR_410
,
0
},
PLANAR
(
3
,
4
,
4
)
},
{
{
VLC_CODEC_YUV_PLANAR_420
,
0
},
PLANAR
(
3
,
2
,
2
)
},
{
{
VLC_CODEC_YUV_PLANAR_422
,
0
},
PLANAR
(
3
,
2
,
1
)
},
{
{
VLC_CODEC_YUV_PLANAR_440
,
0
},
PLANAR
(
3
,
1
,
2
)
},
{
{
VLC_CODEC_YUV_PLANAR_444
,
0
},
PLANAR
(
3
,
1
,
1
)
},
{
{
VLC_CODEC_YUVA
,
0
},
PLANAR
(
4
,
1
,
1
)
},
{
{
VLC_CODEC_I411
,
0
},
PLANAR_8
(
3
,
4
,
1
)
},
{
{
VLC_CODEC_YUV_PLANAR_410
,
0
},
PLANAR_8
(
3
,
4
,
4
)
},
{
{
VLC_CODEC_YUV_PLANAR_420
,
0
},
PLANAR_8
(
3
,
2
,
2
)
},
{
{
VLC_CODEC_YUV_PLANAR_422
,
0
},
PLANAR_8
(
3
,
2
,
1
)
},
{
{
VLC_CODEC_YUV_PLANAR_440
,
0
},
PLANAR_8
(
3
,
1
,
2
)
},
{
{
VLC_CODEC_YUV_PLANAR_444
,
0
},
PLANAR_8
(
3
,
1
,
1
)
},
{
{
VLC_CODEC_YUVA
,
0
},
PLANAR_8
(
4
,
1
,
1
)
},
{
{
VLC_CODEC_I420_10L
,
VLC_CODEC_I420_10B
,
0
},
PLANAR_16
(
3
,
2
,
2
)
},
{
{
VLC_CODEC_I420_9L
,
VLC_CODEC_I420_9B
,
0
},
PLANAR_16
(
3
,
2
,
2
)
},
{
{
VLC_CODEC_I422_10L
,
VLC_CODEC_I422_10B
,
0
},
PLANAR_16
(
3
,
2
,
1
)
},
{
{
VLC_CODEC_I422_9L
,
VLC_CODEC_I422_9B
,
0
},
PLANAR_16
(
3
,
2
,
1
)
},
{
{
VLC_CODEC_I444_10L
,
VLC_CODEC_I444_10B
,
0
},
PLANAR_16
(
3
,
1
,
1
)
},
{
{
VLC_CODEC_I444_9L
,
VLC_CODEC_I444_9B
,
0
},
PLANAR_16
(
3
,
1
,
1
)
},
{
{
VLC_CODEC_YUV_PACKED
,
0
},
PACKED_FMT
(
2
)
},
{
{
VLC_CODEC_RGB8
,
VLC_CODEC_GREY
,
...
...
@@ -1650,6 +1766,8 @@ static const struct
};
#undef PACKED_FMT
#undef PLANAR_16
#undef PLANAR_8
#undef PLANAR
const
vlc_chroma_description_t
*
vlc_fourcc_GetChromaDescription
(
vlc_fourcc_t
i_fourcc
)
...
...
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