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 ba27bcea47b2907959e4b119285d10c04057070b
Author: Chema Gonzalez <che...@meta.com>
AuthorDate: Wed Sep 25 02:26:36 2024 -0700

    Y4M loader: add support for images with no framerate info
    
    I got one from gpac:
    
    ```
    $ gpac -i lena.490x490.unc uncvdec -o /tmp/output.y4m
    $ xxd /tmp/output.y4m
    00000000: 5955 5634 4d50 4547 3220 5734 3930 2048  YUV4MPEG2 W490 H
    00000010: 3439 3020 4131 3a31 2049 7020 4334 3230  490 A1:1 Ip C420
    00000020: 6d70 6567 320a 4652 414d 450a 7272 7170  mpeg2.FRAME.rrqp
    ...
    ```
    
    Tested:
    
    Before:
    ```
    $ IMLIB2_DEBUG=31:0 IMLIB2_LOADER_PATH=./src/modules/loaders/.libs/ LD_LIBRARY_PATH=./src/lib/.libs:${LD_LIBRARY_PATH} ./src/bin/imlib2_view /tmp/output.y4m
    No loadable image
    ```
    
    After:
    ```
    $ IMLIB2_DEBUG=31:0 IMLIB2_LOADER_PATH=./src/modules/loaders/.libs/ LD_LIBRARY_PATH=./src/lib/.libs:${LD_LIBRARY_PATH} ./src/bin/imlib2_view /tmp/output.y4m
    ```
---
 src/modules/loaders/loader_y4m.c                          |   2 ++
 test/images/img-8x8.yuv420p10.full_range.framerate_no.y4m | Bin 0 -> 262 bytes
 2 files changed, 2 insertions(+)

diff --git a/src/modules/loaders/loader_y4m.c b/src/modules/loaders/loader_y4m.c
index 22740b8..01e558c 100644
--- a/src/modules/loaders/loader_y4m.c
+++ b/src/modules/loaders/loader_y4m.c
@@ -126,6 +126,8 @@ y4m__parse_params(Y4mParse *res, const uint8_t **start, const uint8_t *end)
     // default values
     res->range = Y4M_PARSE_RANGE_UNSPECIFIED;
     res->depth = 8;
+    res->fps_num = 1;
+    res->fps_den = 1;
 
     for (;;)
     {
diff --git a/test/images/img-8x8.yuv420p10.full_range.framerate_no.y4m b/test/images/img-8x8.yuv420p10.full_range.framerate_no.y4m
new file mode 100644
index 0000000..7545468
Binary files /dev/null and b/test/images/img-8x8.yuv420p10.full_range.framerate_no.y4m differ

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to