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
7b874dcc
Commit
7b874dcc
authored
May 12, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1: Add PIX_FMT_YUV420P9 support.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
7a3a2598
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
ffv1.c
libavcodec/ffv1.c
+11
-1
No files found.
libavcodec/ffv1.c
View file @
7b874dcc
...
...
@@ -973,6 +973,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx
->
coded_frame
=
&
s
->
picture
;
switch
(
avctx
->
pix_fmt
){
case
PIX_FMT_YUV420P9
:
case
PIX_FMT_YUV420P10
:
case
PIX_FMT_YUV422P10
:
s
->
packed_at_lsb
=
1
;
...
...
@@ -1624,6 +1625,15 @@ static int read_header(FFV1Context *f){
av_log
(
f
->
avctx
,
AV_LOG_ERROR
,
"format not supported
\n
"
);
return
-
1
;
}
}
else
if
(
f
->
avctx
->
bits_per_raw_sample
==
9
)
{
switch
(
16
*
f
->
chroma_h_shift
+
f
->
chroma_v_shift
){
case
0x00
:
f
->
avctx
->
pix_fmt
=
PIX_FMT_YUV444P16
;
break
;
case
0x10
:
f
->
avctx
->
pix_fmt
=
PIX_FMT_YUV422P16
;
break
;
case
0x11
:
f
->
avctx
->
pix_fmt
=
PIX_FMT_YUV420P9
;
f
->
packed_at_lsb
=
1
;
break
;
default
:
av_log
(
f
->
avctx
,
AV_LOG_ERROR
,
"format not supported
\n
"
);
return
-
1
;
}
}
else
if
(
f
->
avctx
->
bits_per_raw_sample
==
10
)
{
switch
(
16
*
f
->
chroma_h_shift
+
f
->
chroma_v_shift
){
case
0x00
:
f
->
avctx
->
pix_fmt
=
PIX_FMT_YUV444P16
;
break
;
...
...
@@ -1838,7 +1848,7 @@ AVCodec ff_ffv1_encoder = {
encode_frame
,
common_end
,
.
capabilities
=
CODEC_CAP_SLICE_THREADS
,
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_YUV444P
,
PIX_FMT_YUV422P
,
PIX_FMT_YUV411P
,
PIX_FMT_YUV410P
,
PIX_FMT_RGB32
,
PIX_FMT_YUV420P16
,
PIX_FMT_YUV422P16
,
PIX_FMT_YUV444P16
,
PIX_FMT_YUV420P10
,
PIX_FMT_YUV422P10
,
PIX_FMT_NONE
},
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_YUV444P
,
PIX_FMT_YUV422P
,
PIX_FMT_YUV411P
,
PIX_FMT_YUV410P
,
PIX_FMT_RGB32
,
PIX_FMT_YUV420P16
,
PIX_FMT_YUV422P16
,
PIX_FMT_YUV444P16
,
PIX_FMT_YUV420P
9
,
PIX_FMT_YUV420P
10
,
PIX_FMT_YUV422P10
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFmpeg video codec #1"
),
};
#endif
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