Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f91f049a
Commit
f91f049a
authored
Nov 10, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add yuv4xxp12 and yuv4xxp14 pixel formats to y4m encoder and decoder.
Reviewed-by: Paul B Mahol
parent
8b67ec77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
yuv4mpeg.c
libavformat/yuv4mpeg.c
+56
-0
No files found.
libavformat/yuv4mpeg.c
View file @
f91f049a
...
...
@@ -98,6 +98,24 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf)
case
AV_PIX_FMT_YUV444P10
:
colorspace
=
" C444p10 XYSCSS=444P10"
;
break
;
case
AV_PIX_FMT_YUV420P12
:
colorspace
=
" C420p12 XYSCSS=420P12"
;
break
;
case
AV_PIX_FMT_YUV422P12
:
colorspace
=
" C422p12 XYSCSS=422P12"
;
break
;
case
AV_PIX_FMT_YUV444P12
:
colorspace
=
" C444p12 XYSCSS=444P12"
;
break
;
case
AV_PIX_FMT_YUV420P14
:
colorspace
=
" C420p14 XYSCSS=420P14"
;
break
;
case
AV_PIX_FMT_YUV422P14
:
colorspace
=
" C422p14 XYSCSS=422P14"
;
break
;
case
AV_PIX_FMT_YUV444P14
:
colorspace
=
" C444p14 XYSCSS=444P14"
;
break
;
case
AV_PIX_FMT_YUV420P16
:
colorspace
=
" C420p16 XYSCSS=420P16"
;
break
;
...
...
@@ -168,6 +186,12 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
case
AV_PIX_FMT_YUV420P10
:
case
AV_PIX_FMT_YUV422P10
:
case
AV_PIX_FMT_YUV444P10
:
case
AV_PIX_FMT_YUV420P12
:
case
AV_PIX_FMT_YUV422P12
:
case
AV_PIX_FMT_YUV444P12
:
case
AV_PIX_FMT_YUV420P14
:
case
AV_PIX_FMT_YUV422P14
:
case
AV_PIX_FMT_YUV444P14
:
case
AV_PIX_FMT_YUV420P16
:
case
AV_PIX_FMT_YUV422P16
:
case
AV_PIX_FMT_YUV444P16
:
...
...
@@ -237,6 +261,12 @@ static int yuv4_write_header(AVFormatContext *s)
case
AV_PIX_FMT_YUV420P10
:
case
AV_PIX_FMT_YUV422P10
:
case
AV_PIX_FMT_YUV444P10
:
case
AV_PIX_FMT_YUV420P12
:
case
AV_PIX_FMT_YUV422P12
:
case
AV_PIX_FMT_YUV444P12
:
case
AV_PIX_FMT_YUV420P14
:
case
AV_PIX_FMT_YUV422P14
:
case
AV_PIX_FMT_YUV444P14
:
case
AV_PIX_FMT_YUV420P16
:
case
AV_PIX_FMT_YUV422P16
:
case
AV_PIX_FMT_YUV444P16
:
...
...
@@ -254,6 +284,8 @@ static int yuv4_write_header(AVFormatContext *s)
"yuv444p, yuv422p, yuv420p, yuv411p and gray8 pixel formats. "
"And using 'strict -1' also yuv444p9, yuv422p9, yuv420p9, "
"yuv444p10, yuv422p10, yuv420p10, "
"yuv444p12, yuv422p12, yuv420p12, "
"yuv444p14, yuv422p14, yuv420p14, "
"yuv444p16, yuv422p16, yuv420p16 "
"and gray16 pixel formats. "
"Use -pix_fmt to select one.
\n
"
);
...
...
@@ -341,6 +373,18 @@ static int yuv4_read_header(AVFormatContext *s)
pix_fmt
=
AV_PIX_FMT_YUV422P16
;
}
else
if
(
strncmp
(
"444p16"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV444P16
;
}
else
if
(
strncmp
(
"420p14"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV420P14
;
}
else
if
(
strncmp
(
"422p14"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV422P14
;
}
else
if
(
strncmp
(
"444p14"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV444P14
;
}
else
if
(
strncmp
(
"420p12"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV420P12
;
}
else
if
(
strncmp
(
"422p12"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV422P12
;
}
else
if
(
strncmp
(
"444p12"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV444P12
;
}
else
if
(
strncmp
(
"420p10"
,
tokstart
,
6
)
==
0
)
{
pix_fmt
=
AV_PIX_FMT_YUV420P10
;
}
else
if
(
strncmp
(
"422p10"
,
tokstart
,
6
)
==
0
)
{
...
...
@@ -434,6 +478,18 @@ static int yuv4_read_header(AVFormatContext *s)
alt_pix_fmt
=
AV_PIX_FMT_YUV422P10
;
else
if
(
strncmp
(
"444P10"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV444P10
;
else
if
(
strncmp
(
"420P12"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV420P12
;
else
if
(
strncmp
(
"422P12"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV422P12
;
else
if
(
strncmp
(
"444P12"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV444P12
;
else
if
(
strncmp
(
"420P14"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV420P14
;
else
if
(
strncmp
(
"422P14"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV422P14
;
else
if
(
strncmp
(
"444P14"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV444P14
;
else
if
(
strncmp
(
"420P16"
,
tokstart
,
6
)
==
0
)
alt_pix_fmt
=
AV_PIX_FMT_YUV420P16
;
else
if
(
strncmp
(
"422P16"
,
tokstart
,
6
)
==
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