ffmpegcolorspace: add perf-log-category and log suboptimal operation

Log if we use an intermediate colorspace for conversion.
This commit is contained in:
Stefan Kost 2009-10-08 17:49:39 +03:00
parent 2b579aaa86
commit f2d1c9b0b7
2 changed files with 6 additions and 0 deletions

View file

@ -41,6 +41,7 @@
GST_DEBUG_CATEGORY (ffmpegcolorspace_debug);
#define GST_CAT_DEFAULT ffmpegcolorspace_debug
GST_DEBUG_CATEGORY (GST_CAT_PERFORMANCE);
/* elementfactory information */
static const GstElementDetails ffmpegcsp_details =
@ -488,6 +489,7 @@ gst_ffmpegcolorspace_register (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (ffmpegcolorspace_debug, "ffmpegcolorspace", 0,
"FFMPEG-based colorspace converter");
GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
/* template caps */
caps = gst_ffmpegcsp_codectype_to_caps (CODEC_TYPE_VIDEO, NULL);

View file

@ -35,6 +35,8 @@
#include <string.h>
#include <stdlib.h>
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
#define xglue(x, y) x ## y
#define glue(x, y) xglue(x, y)
@ -3121,6 +3123,8 @@ img_convert (AVPicture * dst, int dst_pix_fmt,
return 0;
}
no_chroma_filter:
GST_CAT_INFO (GST_CAT_PERFORMANCE, "no direct path to convert colorspace "
"from %s -> %s", src_pix->name, dst_pix->name);
/* try to use an intermediate format */
if (src_pix_fmt == PIX_FMT_YUV422 || dst_pix_fmt == PIX_FMT_YUV422) {