x264enc: Reduce log spam about bit depth support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/85>
This commit is contained in:
Jan Alexander Steffens (heftig) 2021-09-21 14:56:23 +02:00
parent fbe2ea6e38
commit de465be3e4

View file

@ -222,8 +222,6 @@ gst_x264_enc_add_x264_chroma_format (GstStructure * s,
if (vtable_8bit) { if (vtable_8bit) {
gint chroma_format = *vtable_8bit->x264_chroma_format; gint chroma_format = *vtable_8bit->x264_chroma_format;
GST_INFO ("8-bit depth supported");
if ((chroma_format == 0 || chroma_format == X264_CSP_I444) && allow_444) { if ((chroma_format == 0 || chroma_format == X264_CSP_I444) && allow_444) {
g_value_set_string (&fmt, "Y444"); g_value_set_string (&fmt, "Y444");
gst_value_list_append_value (&fmts, &fmt); gst_value_list_append_value (&fmts, &fmt);
@ -247,8 +245,6 @@ gst_x264_enc_add_x264_chroma_format (GstStructure * s,
if (vtable_10bit) { if (vtable_10bit) {
gint chroma_format = *vtable_10bit->x264_chroma_format; gint chroma_format = *vtable_10bit->x264_chroma_format;
GST_INFO ("10-bit depth supported");
if ((chroma_format == 0 || chroma_format == X264_CSP_I444) && allow_444) { if ((chroma_format == 0 || chroma_format == X264_CSP_I444) && allow_444) {
if (G_BYTE_ORDER == G_LITTLE_ENDIAN) if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
g_value_set_string (&fmt, "Y444_10LE"); g_value_set_string (&fmt, "Y444_10LE");
@ -295,8 +291,10 @@ load_x264_libraries (void)
{ {
if (*default_vtable.x264_bit_depth == 8) { if (*default_vtable.x264_bit_depth == 8) {
vtable_8bit = &default_vtable; vtable_8bit = &default_vtable;
GST_INFO ("8-bit depth supported");
} else if (*default_vtable.x264_bit_depth == 10) { } else if (*default_vtable.x264_bit_depth == 10) {
vtable_10bit = &default_vtable; vtable_10bit = &default_vtable;
GST_INFO ("10-bit depth supported");
} }
#ifdef HAVE_X264_ADDITIONAL_LIBRARIES #ifdef HAVE_X264_ADDITIONAL_LIBRARIES
{ {
@ -308,8 +306,10 @@ load_x264_libraries (void)
if (vtable) { if (vtable) {
if (!vtable_8bit && *vtable->x264_bit_depth == 8) { if (!vtable_8bit && *vtable->x264_bit_depth == 8) {
GST_INFO ("8-bit depth support loaded from %s", *p);
vtable_8bit = vtable; vtable_8bit = vtable;
} else if (!vtable_10bit && *vtable->x264_bit_depth == 10) { } else if (!vtable_10bit && *vtable->x264_bit_depth == 10) {
GST_INFO ("10-bit depth support loaded from %s", *p);
vtable_10bit = vtable; vtable_10bit = vtable;
} else { } else {
unload_x264 (vtable); unload_x264 (vtable);
@ -334,11 +334,14 @@ static gboolean
load_x264_libraries (void) load_x264_libraries (void)
{ {
#if X264_BIT_DEPTH == 0 /* all */ #if X264_BIT_DEPTH == 0 /* all */
GST_INFO ("8-bit depth and 10-bit depth supported");
vtable_8bit = &default_vtable; vtable_8bit = &default_vtable;
vtable_10bit = &default_vtable; vtable_10bit = &default_vtable;
#elif X264_BIT_DEPTH == 8 #elif X264_BIT_DEPTH == 8
GST_INFO ("Only 8-bit depth supported");
vtable_8bit = &default_vtable; vtable_8bit = &default_vtable;
#elif X264_BIT_DEPTH == 10 #elif X264_BIT_DEPTH == 10
GST_INFO ("Only 10-bit depth supported");
vtable_10bit = &default_vtable; vtable_10bit = &default_vtable;
#else #else
#error "unexpected X264_BIT_DEPTH value" #error "unexpected X264_BIT_DEPTH value"