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
9d602a0b
Commit
9d602a0b
authored
Jan 26, 2013
by
Matthieu Bouron
Committed by
Michael Niedermayer
Jan 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dnxhdenc: print valid profiles when codec parameters are invalid
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5b83b2da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
dnxhddata.c
libavcodec/dnxhddata.c
+16
-0
dnxhddata.h
libavcodec/dnxhddata.h
+1
-0
dnxhdenc.c
libavcodec/dnxhdenc.c
+2
-1
No files found.
libavcodec/dnxhddata.c
View file @
9d602a0b
...
@@ -1064,3 +1064,19 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
...
@@ -1064,3 +1064,19 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
}
}
return
0
;
return
0
;
}
}
void
ff_dnxhd_print_profiles
(
AVCodecContext
*
avctx
,
int
loglevel
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
ff_dnxhd_cid_table
);
i
++
)
{
const
CIDEntry
*
cid
=
&
ff_dnxhd_cid_table
[
i
];
for
(
j
=
0
;
j
<
FF_ARRAY_ELEMS
(
cid
->
bit_rates
);
j
++
)
{
if
(
!
cid
->
bit_rates
[
j
])
break
;
av_log
(
avctx
,
loglevel
,
"Frame size: %dx%d%c; bitrate: %dMbps; pixel format: %s; framerate: %d/%d
\n
"
,
cid
->
width
,
cid
->
height
,
cid
->
interlaced
?
'i'
:
'p'
,
cid
->
bit_rates
[
j
],
cid
->
bit_depth
==
10
?
"yuv422p10"
:
"yuv422p"
,
cid
->
frame_rates
[
j
].
num
,
cid
->
frame_rates
[
j
].
den
);
}
}
}
libavcodec/dnxhddata.h
View file @
9d602a0b
...
@@ -50,6 +50,7 @@ extern av_export const CIDEntry ff_dnxhd_cid_table[];
...
@@ -50,6 +50,7 @@ extern av_export const CIDEntry ff_dnxhd_cid_table[];
int
ff_dnxhd_get_cid_table
(
int
cid
);
int
ff_dnxhd_get_cid_table
(
int
cid
);
int
ff_dnxhd_find_cid
(
AVCodecContext
*
avctx
,
int
bit_depth
);
int
ff_dnxhd_find_cid
(
AVCodecContext
*
avctx
,
int
bit_depth
);
void
ff_dnxhd_print_profiles
(
AVCodecContext
*
avctx
,
int
loglevel
);
int
avpriv_dnxhd_get_frame_size
(
int
cid
);
int
avpriv_dnxhd_get_frame_size
(
int
cid
);
...
...
libavcodec/dnxhdenc.c
View file @
9d602a0b
...
@@ -266,7 +266,8 @@ static int dnxhd_encode_init(AVCodecContext *avctx)
...
@@ -266,7 +266,8 @@ static int dnxhd_encode_init(AVCodecContext *avctx)
ctx
->
cid
=
ff_dnxhd_find_cid
(
avctx
,
bit_depth
);
ctx
->
cid
=
ff_dnxhd_find_cid
(
avctx
,
bit_depth
);
if
(
!
ctx
->
cid
)
{
if
(
!
ctx
->
cid
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"video parameters incompatible with DNxHD
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"video parameters incompatible with DNxHD. Valid DNxHD profiles:
\n
"
);
ff_dnxhd_print_profiles
(
avctx
,
AV_LOG_ERROR
);
return
-
1
;
return
-
1
;
}
}
av_log
(
avctx
,
AV_LOG_DEBUG
,
"cid %d
\n
"
,
ctx
->
cid
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"cid %d
\n
"
,
ctx
->
cid
);
...
...
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