Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b0e1d0d9
Commit
b0e1d0d9
authored
May 08, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1enc: support PIX_FMT_YUV420P10 & PIX_FMT_YUV422P10
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
74bf9d62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
ffv1.c
libavcodec/ffv1.c
+13
-3
No files found.
libavcodec/ffv1.c
View file @
b0e1d0d9
...
@@ -252,6 +252,7 @@ typedef struct FFV1Context{
...
@@ -252,6 +252,7 @@ typedef struct FFV1Context{
int
colorspace
;
int
colorspace
;
int_fast16_t
*
sample_buffer
;
int_fast16_t
*
sample_buffer
;
int
gob_count
;
int
gob_count
;
int
packed_at_lsb
;
int
quant_table_count
;
int
quant_table_count
;
...
@@ -609,8 +610,14 @@ static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride,
...
@@ -609,8 +610,14 @@ static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride,
}
}
encode_line
(
s
,
w
,
sample
,
plane_index
,
8
);
encode_line
(
s
,
w
,
sample
,
plane_index
,
8
);
}
else
{
}
else
{
for
(
x
=
0
;
x
<
w
;
x
++
){
if
(
s
->
packed_at_lsb
){
sample
[
0
][
x
]
=
((
uint16_t
*
)(
src
+
stride
*
y
))[
x
]
>>
(
16
-
s
->
avctx
->
bits_per_raw_sample
);
for
(
x
=
0
;
x
<
w
;
x
++
){
sample
[
0
][
x
]
=
((
uint16_t
*
)(
src
+
stride
*
y
))[
x
];
}
}
else
{
for
(
x
=
0
;
x
<
w
;
x
++
){
sample
[
0
][
x
]
=
((
uint16_t
*
)(
src
+
stride
*
y
))[
x
]
>>
(
16
-
s
->
avctx
->
bits_per_raw_sample
);
}
}
}
encode_line
(
s
,
w
,
sample
,
plane_index
,
s
->
avctx
->
bits_per_raw_sample
);
encode_line
(
s
,
w
,
sample
,
plane_index
,
s
->
avctx
->
bits_per_raw_sample
);
}
}
...
@@ -966,6 +973,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
...
@@ -966,6 +973,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx
->
coded_frame
=
&
s
->
picture
;
avctx
->
coded_frame
=
&
s
->
picture
;
switch
(
avctx
->
pix_fmt
){
switch
(
avctx
->
pix_fmt
){
case
PIX_FMT_YUV420P10
:
case
PIX_FMT_YUV422P10
:
s
->
packed_at_lsb
=
1
;
case
PIX_FMT_YUV444P16
:
case
PIX_FMT_YUV444P16
:
case
PIX_FMT_YUV422P16
:
case
PIX_FMT_YUV422P16
:
case
PIX_FMT_YUV420P16
:
case
PIX_FMT_YUV420P16
:
...
@@ -1812,7 +1822,7 @@ AVCodec ff_ffv1_encoder = {
...
@@ -1812,7 +1822,7 @@ AVCodec ff_ffv1_encoder = {
encode_frame
,
encode_frame
,
common_end
,
common_end
,
.
capabilities
=
CODEC_CAP_SLICE_THREADS
,
.
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_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_
YUV420P10
,
PIX_FMT_YUV422P10
,
PIX_FMT_
NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFmpeg video codec #1"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"FFmpeg video codec #1"
),
};
};
#endif
#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