[babl] babl: check both source/dest bits/component in bad_idea()
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: check both source/dest bits/component in bad_idea()
- Date: Mon, 25 Sep 2017 19:00:30 +0000 (UTC)
commit f56dbf115cd31ba6e591827388bdd3f65c86b289
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Sep 25 21:00:08 2017 +0200
babl: check both source/dest bits/component in bad_idea()
babl/babl-fish-path.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c
index 6b2874b..2a71464 100644
--- a/babl/babl-fish-path.c
+++ b/babl/babl-fish-path.c
@@ -165,7 +165,8 @@ bad_idea (const Babl *from, const Babl *to, const Babl *format)
{
return 1;
}
- if (from->format.type[0]->bits > format->format.type[0]->bits)
+ if (from->format.type[0]->bits > format->format.type[0]->bits &&
+ to->format.type[0]->bits > format->format.type[0]->bits)
{
/* XXX: perhaps we especially avoid going to half-float, when
* going between u16 formats as well? */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]