This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository legacy-imlib2.
View the commit online.
commit d563cee17d0a3a38038156f4afd9c59e93279701
Author: Chema Gonzalez <che...@meta.com>
AuthorDate: Sun May 18 19:15:10 2025 -0700
Y4M loader: fix support for full-range mono
Tested:
```
feh test/images/img-8x8.mono10.full_range.y4m
feh test/images/img-8x8.mono.full_range.y4m
```
---
src/modules/loaders/loader_y4m.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/modules/loaders/loader_y4m.c b/src/modules/loaders/loader_y4m.c
index 8761c68..2250054 100644
--- a/src/modules/loaders/loader_y4m.c
+++ b/src/modules/loaders/loader_y4m.c
@@ -431,6 +431,14 @@ conv_mono(const uint8_t *y, int y_stride, const uint8_t *u, int u_stride,
return I400ToARGB(y, y_stride, dst, dst_stride, width, height);
}
+static int
+conv_mono_full(const uint8_t *y, int y_stride, const uint8_t *u, int u_stride,
+ const uint8_t *v, int v_stride, uint8_t *dst, int dst_stride,
+ int width, int height)
+{
+ return J400ToARGB(y, y_stride, dst, dst_stride, width, height);
+}
+
static int
_load(ImlibImage *im, int load_data)
{
@@ -494,7 +502,10 @@ _load(ImlibImage *im, int load_data)
{
case Y4M_PARSE_CS_MONO:
case Y4M_PARSE_CS_MONO10:
- conv = conv_mono;
+ if (y4m.range == Y4M_PARSE_RANGE_FULL)
+ conv = conv_mono_full;
+ else
+ conv = conv_mono;
break;
case Y4M_PARSE_CS_422:
case Y4M_PARSE_CS_422P10:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.