summaryrefslogtreecommitdiff
path: root/libavcodec/dnxhddata.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2013-01-26 12:46:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-27 18:44:16 +0100
commit9d602a0b0e955ac8553b16fc1b98731d66fdde2b (patch)
treee78db148e64e338c99512e5dbd478a1f41d3c350 /libavcodec/dnxhddata.c
parent5b83b2da08b4be31fc421a698ea649799e0848c7 (diff)
lavc/dnxhdenc: print valid profiles when codec parameters are invalid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dnxhddata.c')
-rw-r--r--libavcodec/dnxhddata.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c
index 71cb333822..669b8067e9 100644
--- a/libavcodec/dnxhddata.c
+++ b/libavcodec/dnxhddata.c
@@ -1064,3 +1064,19 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
}
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);
+ }
+ }
+}