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
3e70c702
Commit
3e70c702
authored
Feb 10, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: support setting the chroma intra matrix
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cbcfd7da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
ffmpeg.h
ffmpeg.h
+2
-0
ffmpeg_opt.c
ffmpeg_opt.c
+14
-0
No files found.
ffmpeg.h
View file @
3e70c702
...
...
@@ -171,6 +171,8 @@ typedef struct OptionsContext {
int
nb_intra_matrices
;
SpecifierOpt
*
inter_matrices
;
int
nb_inter_matrices
;
SpecifierOpt
*
chroma_intra_matrices
;
int
nb_chroma_intra_matrices
;
SpecifierOpt
*
top_field_first
;
int
nb_top_field_first
;
SpecifierOpt
*
metadata_map
;
...
...
ffmpeg_opt.c
View file @
3e70c702
...
...
@@ -1265,6 +1265,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
char
*
frame_size
=
NULL
;
char
*
frame_pix_fmt
=
NULL
;
char
*
intra_matrix
=
NULL
,
*
inter_matrix
=
NULL
;
char
*
chroma_intra_matrix
=
NULL
;
int
do_pass
=
0
;
int
i
;
...
...
@@ -1297,6 +1298,16 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
}
parse_matrix_coeffs
(
video_enc
->
intra_matrix
,
intra_matrix
);
}
MATCH_PER_STREAM_OPT
(
chroma_intra_matrices
,
str
,
chroma_intra_matrix
,
oc
,
st
);
if
(
chroma_intra_matrix
)
{
uint16_t
*
p
=
av_mallocz
(
sizeof
(
*
video_enc
->
chroma_intra_matrix
)
*
64
);
if
(
!
p
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Could not allocate memory for intra matrix.
\n
"
);
exit_program
(
1
);
}
av_codec_set_chroma_intra_matrix
(
video_enc
,
p
);
parse_matrix_coeffs
(
p
,
chroma_intra_matrix
);
}
MATCH_PER_STREAM_OPT
(
inter_matrices
,
str
,
inter_matrix
,
oc
,
st
);
if
(
inter_matrix
)
{
if
(
!
(
video_enc
->
inter_matrix
=
av_mallocz
(
sizeof
(
*
video_enc
->
inter_matrix
)
*
64
)))
{
...
...
@@ -2860,6 +2871,9 @@ const OptionDef options[] = {
{
"inter_matrix"
,
OPT_VIDEO
|
HAS_ARG
|
OPT_EXPERT
|
OPT_STRING
|
OPT_SPEC
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
inter_matrices
)
},
"specify inter matrix coeffs"
,
"matrix"
},
{
"chroma_intra_matrix"
,
OPT_VIDEO
|
HAS_ARG
|
OPT_EXPERT
|
OPT_STRING
|
OPT_SPEC
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
chroma_intra_matrices
)
},
"specify intra matrix coeffs"
,
"matrix"
},
{
"top"
,
OPT_VIDEO
|
HAS_ARG
|
OPT_EXPERT
|
OPT_INT
|
OPT_SPEC
|
OPT_INPUT
|
OPT_OUTPUT
,
{
.
off
=
OFFSET
(
top_field_first
)
},
"top=1/bottom=0/auto=-1 field first"
,
""
},
...
...
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