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
7a3a2598
Commit
7a3a2598
authored
May 12, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1dec: output PIX_FMT_YUV422P10 and PIX_FMT_YUV420P10 when possible.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
518cdff8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
ffv1.c
libavcodec/ffv1.c
+19
-3
No files found.
libavcodec/ffv1.c
View file @
7a3a2598
...
...
@@ -1402,8 +1402,14 @@ static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride,
}
}
else
{
decode_line
(
s
,
w
,
sample
,
plane_index
,
s
->
avctx
->
bits_per_raw_sample
);
for
(
x
=
0
;
x
<
w
;
x
++
){
((
uint16_t
*
)(
src
+
stride
*
y
))[
x
]
=
sample
[
1
][
x
]
<<
(
16
-
s
->
avctx
->
bits_per_raw_sample
);
if
(
s
->
packed_at_lsb
){
for
(
x
=
0
;
x
<
w
;
x
++
){
((
uint16_t
*
)(
src
+
stride
*
y
))[
x
]
=
sample
[
1
][
x
];
}
}
else
{
for
(
x
=
0
;
x
<
w
;
x
++
){
((
uint16_t
*
)(
src
+
stride
*
y
))[
x
]
=
sample
[
1
][
x
]
<<
(
16
-
s
->
avctx
->
bits_per_raw_sample
);
}
}
}
//STOP_TIMER("decode-line")}
...
...
@@ -1618,7 +1624,16 @@ static int read_header(FFV1Context *f){
av_log
(
f
->
avctx
,
AV_LOG_ERROR
,
"format not supported
\n
"
);
return
-
1
;
}
}
else
{
}
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
;
case
0x10
:
f
->
avctx
->
pix_fmt
=
PIX_FMT_YUV422P10
;
f
->
packed_at_lsb
=
1
;
break
;
case
0x11
:
f
->
avctx
->
pix_fmt
=
PIX_FMT_YUV420P10
;
f
->
packed_at_lsb
=
1
;
break
;
default
:
av_log
(
f
->
avctx
,
AV_LOG_ERROR
,
"format not supported
\n
"
);
return
-
1
;
}
}
else
{
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
;
...
...
@@ -1655,6 +1670,7 @@ static int read_header(FFV1Context *f){
for
(
j
=
0
;
j
<
f
->
slice_count
;
j
++
){
FFV1Context
*
fs
=
f
->
slice_context
[
j
];
fs
->
ac
=
f
->
ac
;
fs
->
packed_at_lsb
=
f
->
packed_at_lsb
;
if
(
f
->
version
>=
2
){
fs
->
slice_x
=
get_symbol
(
c
,
state
,
0
)
*
f
->
width
;
...
...
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