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
9ba7d131
Commit
9ba7d131
authored
Feb 08, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added VLC_CODEC_YV9 and remove default mapping to I410 (close #3288).
They are not the same as the chroma plane are swapped.
parent
d84370a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
9 deletions
+38
-9
include/vlc_fourcc.h
include/vlc_fourcc.h
+2
-0
src/misc/es_format.c
src/misc/es_format.c
+1
-0
src/misc/fourcc.c
src/misc/fourcc.c
+34
-9
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+1
-0
No files found.
include/vlc_fourcc.h
View file @
9ba7d131
...
...
@@ -114,6 +114,8 @@
#define VLC_CODEC_AMV VLC_FOURCC('A','M','V',' ')
/* Planar YUV 4:1:0 Y:V:U */
#define VLC_CODEC_YV9 VLC_FOURCC('Y','V','U','9')
/* Planar YUV 4:2:0 Y:V:U */
#define VLC_CODEC_YV12 VLC_FOURCC('Y','V','1','2')
/* Planar YUV 4:1:0 Y:U:V */
...
...
src/misc/es_format.c
View file @
9ba7d131
...
...
@@ -170,6 +170,7 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
case
VLC_CODEC_J420
:
p_fmt
->
i_bits_per_pixel
=
12
;
break
;
case
VLC_CODEC_YV9
:
case
VLC_CODEC_I410
:
p_fmt
->
i_bits_per_pixel
=
9
;
break
;
...
...
src/misc/fourcc.c
View file @
9ba7d131
...
...
@@ -611,9 +611,10 @@ static const entry_t p_list_video[] = {
B
(
VLC_CODEC_YV12
,
"Planar 4:2:0 YVU"
),
A
(
"YV12"
),
A
(
"yv12"
),
B
(
VLC_CODEC_YV9
,
"Planar 4:1:0 YVU"
),
A
(
"YVU9"
),
B
(
VLC_CODEC_I410
,
"Planar 4:1:0 YUV"
),
A
(
"I410"
),
A
(
"YVU9"
),
B
(
VLC_CODEC_I411
,
"Planar 4:1:1 YUV"
),
A
(
"I411"
),
B
(
VLC_CODEC_I420
,
"Planar 4:2:0 YUV"
),
...
...
@@ -1321,6 +1322,9 @@ const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
/* */
#define VLC_CODEC_YUV_PLANAR_410 \
VLC_CODEC_I410, VLC_CODEC_YV9
#define VLC_CODEC_YUV_PLANAR_420 \
VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420
...
...
@@ -1340,7 +1344,7 @@ const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
#define VLC_CODEC_FALLBACK_420 \
VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PACKED, \
VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
VLC_CODEC_I411, VLC_CODEC_
I
410, VLC_CODEC_Y211
VLC_CODEC_I411, VLC_CODEC_
YUV_PLANAR_
410, VLC_CODEC_Y211
static
const
vlc_fourcc_t
p_I420_fallback
[]
=
{
VLC_CODEC_I420
,
VLC_CODEC_YV12
,
VLC_CODEC_J420
,
VLC_CODEC_FALLBACK_420
,
0
...
...
@@ -1355,7 +1359,7 @@ static const vlc_fourcc_t p_YV12_fallback[] = {
#define VLC_CODEC_FALLBACK_422 \
VLC_CODEC_YUV_PACKED, VLC_CODEC_YUV_PLANAR_420, \
VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
VLC_CODEC_I411, VLC_CODEC_
I
410, VLC_CODEC_Y211
VLC_CODEC_I411, VLC_CODEC_
YUV_PLANAR_
410, VLC_CODEC_Y211
static
const
vlc_fourcc_t
p_I422_fallback
[]
=
{
VLC_CODEC_I422
,
VLC_CODEC_J422
,
VLC_CODEC_FALLBACK_422
,
0
...
...
@@ -1367,7 +1371,7 @@ static const vlc_fourcc_t p_J422_fallback[] = {
#define VLC_CODEC_FALLBACK_444 \
VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PACKED, \
VLC_CODEC_YUV_PLANAR_420, VLC_CODEC_YUV_PLANAR_440, \
VLC_CODEC_I411, VLC_CODEC_
I
410, VLC_CODEC_Y211
VLC_CODEC_I411, VLC_CODEC_
YUV_PLANAR_
410, VLC_CODEC_Y211
static
const
vlc_fourcc_t
p_I444_fallback
[]
=
{
VLC_CODEC_I444
,
VLC_CODEC_J444
,
VLC_CODEC_FALLBACK_444
,
0
...
...
@@ -1382,13 +1386,13 @@ static const vlc_fourcc_t p_I440_fallback[] = {
VLC_CODEC_YUV_PLANAR_422
,
VLC_CODEC_YUV_PLANAR_444
,
VLC_CODEC_YUV_PACKED
,
VLC_CODEC_I411
,
VLC_CODEC_
I
410
,
VLC_CODEC_Y211
,
0
VLC_CODEC_I411
,
VLC_CODEC_
YUV_PLANAR_
410
,
VLC_CODEC_Y211
,
0
};
#define VLC_CODEC_FALLBACK_PACKED \
VLC_CODEC_YUV_PLANAR_422, VLC_CODEC_YUV_PLANAR_420, \
VLC_CODEC_YUV_PLANAR_444, VLC_CODEC_YUV_PLANAR_440, \
VLC_CODEC_I411, VLC_CODEC_
I
410, VLC_CODEC_Y211
VLC_CODEC_I411, VLC_CODEC_
YUV_PLANAR_
410, VLC_CODEC_Y211
static
const
vlc_fourcc_t
p_YUYV_fallback
[]
=
{
VLC_CODEC_YUYV
,
...
...
@@ -1441,7 +1445,7 @@ static const vlc_fourcc_t p_list_YUV[] = {
VLC_CODEC_YUV_PLANAR_440
,
VLC_CODEC_YUV_PLANAR_444
,
VLC_CODEC_YUV_PACKED
,
VLC_CODEC_I411
,
VLC_CODEC_
I
410
,
VLC_CODEC_Y211
,
VLC_CODEC_I411
,
VLC_CODEC_
YUV_PLANAR_
410
,
VLC_CODEC_Y211
,
0
,
};
...
...
@@ -1520,8 +1524,29 @@ const vlc_fourcc_t *vlc_fourcc_GetRGBFallback( vlc_fourcc_t i_fourcc )
bool
vlc_fourcc_AreUVPlanesSwapped
(
vlc_fourcc_t
a
,
vlc_fourcc_t
b
)
{
return
(((
a
==
VLC_CODEC_I420
||
a
==
VLC_CODEC_J420
)
&&
b
==
VLC_CODEC_YV12
)
||
((
b
==
VLC_CODEC_I420
||
b
==
VLC_CODEC_J420
)
&&
a
==
VLC_CODEC_YV12
));
static
const
vlc_fourcc_t
pp_swapped
[][
4
]
=
{
{
VLC_CODEC_YV12
,
VLC_CODEC_I420
,
VLC_CODEC_J420
,
0
},
{
VLC_CODEC_YV9
,
VLC_CODEC_I410
,
0
},
{
0
}
};
for
(
int
i
=
0
;
pp_swapped
[
i
][
0
];
i
++
)
{
if
(
pp_swapped
[
i
][
0
]
==
b
)
{
vlc_fourcc_t
t
=
a
;
a
=
b
;
b
=
t
;
}
if
(
pp_swapped
[
i
][
0
]
!=
a
)
continue
;
for
(
int
j
=
1
;
pp_swapped
[
i
][
j
];
j
++
)
{
if
(
pp_swapped
[
i
][
j
]
==
b
)
return
true
;
}
}
return
false
;
}
bool
vlc_fourcc_IsYUV
(
vlc_fourcc_t
fcc
)
...
...
src/video_output/vout_pictures.c
View file @
9ba7d131
...
...
@@ -745,6 +745,7 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma,
p_picture
->
i_planes
=
3
;
break
;
case
VLC_CODEC_YV9
:
case
VLC_CODEC_I410
:
p_picture
->
p
[
Y_PLANE
].
i_lines
=
i_height_aligned
;
p_picture
->
p
[
Y_PLANE
].
i_visible_lines
=
i_height
;
...
...
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