Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
62f5e601
Commit
62f5e601
authored
Aug 16, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ffv1enc: Add RGB48 support
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
a95fdac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
ffv1enc.c
libavcodec/ffv1enc.c
+11
-1
ffv1enc_template.c
libavcodec/ffv1enc_template.c
+6
-0
No files found.
libavcodec/ffv1enc.c
View file @
62f5e601
...
...
@@ -624,6 +624,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
s
->
chroma_planes
=
1
;
s
->
bits_per_raw_sample
=
8
;
break
;
case
AV_PIX_FMT_RGB48
:
s
->
colorspace
=
1
;
s
->
chroma_planes
=
1
;
s
->
bits_per_raw_sample
=
16
;
s
->
use32bit
=
1
;
if
(
avctx
->
strict_std_compliance
>
FF_COMPLIANCE_EXPERIMENTAL
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"16bit RGB is experimental and under development, only use it for experiments
\n
"
);
return
AVERROR_INVALIDDATA
;
}
break
;
case
AV_PIX_FMT_0RGB32
:
s
->
colorspace
=
1
;
s
->
chroma_planes
=
1
;
...
...
@@ -1287,7 +1297,7 @@ AVCodec ff_ffv1_encoder = {
AV_PIX_FMT_GRAY16
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GBRP9
,
AV_PIX_FMT_GBRP10
,
AV_PIX_FMT_GBRP12
,
AV_PIX_FMT_GBRP14
,
AV_PIX_FMT_YA8
,
AV_PIX_FMT_GBRP16
,
AV_PIX_FMT_GBRP16
,
AV_PIX_FMT_RGB48
,
AV_PIX_FMT_NONE
},
...
...
libavcodec/ffv1enc_template.c
View file @
62f5e601
...
...
@@ -129,6 +129,7 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[3],
const
int
ring_size
=
s
->
context_model
?
3
:
2
;
TYPE
*
sample
[
4
][
3
];
int
lbd
=
s
->
bits_per_raw_sample
<=
8
;
int
packed
=
!
src
[
1
];
int
bits
=
s
->
bits_per_raw_sample
>
0
?
s
->
bits_per_raw_sample
:
8
;
int
offset
=
1
<<
bits
;
...
...
@@ -150,6 +151,11 @@ static int RENAME(encode_rgb_frame)(FFV1Context *s, const uint8_t *src[3],
g
=
(
v
>>
8
)
&
0xFF
;
r
=
(
v
>>
16
)
&
0xFF
;
a
=
v
>>
24
;
}
else
if
(
packed
)
{
const
uint16_t
*
p
=
((
const
uint16_t
*
)(
src
[
0
]
+
x
*
6
+
stride
[
0
]
*
y
));
r
=
p
[
0
];
g
=
p
[
1
];
b
=
p
[
2
];
}
else
if
(
sizeof
(
TYPE
)
==
4
)
{
g
=
*
((
const
uint16_t
*
)(
src
[
0
]
+
x
*
2
+
stride
[
0
]
*
y
));
b
=
*
((
const
uint16_t
*
)(
src
[
1
]
+
x
*
2
+
stride
[
1
]
*
y
));
...
...
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