Chema Gonzalez
a780b47892
Y4M loader: fix support for unexpected framerates
...
Add support for F1:1 images, and in general with any framerate ratio.
Also added "F60:1" mode support.
Tested:
Added a test frame with a 1:1 framerate. This is produced by ffmpeg when
converting from another image format.
```
$ ffmpeg -i in.265 out.y4m
$ head -1 out.y4m
YUV4MPEG2 W490 H490 F1:1 Ip A0:0 C420jpeg XYSCSS=420JPEG XCOLORRANGE=FULL
```
Before
```
$ imlib2_view -v ./test/images/icon-64.framerate_1_1.y4m
Show 0: './test/images/icon-64.framerate_1_1.y4m'
*** Error -2:'Imlib2: No loader for file format' loading image: './test/images/icon-64.framerate_1_1.y4m'
```
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 -v ./test/images/icon-64.framerate_1_1.y4m
Show 0: './test/images/icon-64.framerate_1_1.y4m'
IMG : __imlib_FindCachedImage: './test/images/icon-64.framerate_1_1.y4m' frame 1
IMG : got none
LOAD: __imlib_FindBestLoader: file='./test/images/icon-64.framerate_1_1.y4m' fmt='(null)'
FILE: __imlib_FileExtension: './test/images/icon-64.framerate_1_1.y4m'
FILE: __imlib_FileIsFile: './src/modules/loaders/.libs//y4m.so'
FILE: __imlib_FileStat: './src/modules/loaders/.libs//y4m.so'
LOAD: __imlib_ProduceLoader: ./src/modules/loaders/.libs//y4m.so
LOAD: __imlib_LookupKnownLoader: 'y4m' -> 'y4m': 0x524d50
LOAD: __imlib_FindBestLoader: fmt='y4m': ./src/modules/loaders/.libs//y4m.so
IMG : __imlib_LoadImageWrapper: fmt='y4m' file='./test/images/icon-64.framerate_1_1.y4m'(./test/images/icon-64.framerate_1_1.y4m) frame=1, imm=1
IMG : __imlib_LoadImageWrapper: y4m : ./test/images/icon-64.framerate_1_1.y4m: Elapsed time: 18.099 ms
IMG : __imlib_AddImageToCache: 0x5139e0: './test/images/icon-64.framerate_1_1.y4m' frame 1
```
2023-12-27 14:41:59 -08:00
Chema Gonzalez
0b08655e40
Y4M loader: add support for images with unexpected aspects
...
Tested:
Added a new test case with an unknown aspect (A368:375).
2023-08-16 12:12:53 +02:00
Chema Gonzalez
a88b95c289
Y4M loader: fix support for 420 colorspaces
...
Includes:
* add support for 420mpeg2 (ffmpeg-only)
* add example for 420mpeg2
* add examples for 420, 420paldv
* fix 420jpeg example
2023-08-03 12:34:30 +02:00
NRK
336e9374ff
Y4M loader: use custom y4m parser
...
avoid dependency on liby4m, which has some quality issues and isn't
available on any distros according to repology.
additionally, the new loader now supports:
* loading from memory
* multi-frame images
* mono colourspace y4m images
Fixes: #13
2023-06-21 17:49:20 +02:00
Kim Woelders
924bf0c527
Loaders: Static constify some data that may as well be
2023-06-18 07:12:51 +02:00
NRK
28d9c6b7d2
Y4M loader: check file size before magic check
2023-06-18 07:02:10 +02:00
Kim Woelders
32901e3bab
Y4M loader: Various minor changes
...
- configure.ac: Alphabetic order
- Makefile.am: Alphabetic order, no need for nodelete
- loaders.c: Add to known loaders
- loader_y4m.c: Remove some unneeded headers
2023-03-21 06:48:53 +01:00
Chema Gonzalez
be721b0335
imlib2: added loader for y4m files (uses liby4m and libyuv)
...
Implemented just `_load()` for now.
Summary:
Implements a loader for y4m images. Uses liby4m and libyuv.
Only implements the `_load()` function as of now
Tested:
```
$ ./configure
...
Configuration Options Summary:
Image loaders:
Regular image loaders
GIF.....................: yes
HEIF....................: yes
Y4M.....................: yes
...
$ make -j
...
$ sudo make install
...
$ feh image.y4m
-- image shows up
```
Tested with yuv420p, yuv422p, and yuv444p images.
2023-03-21 06:48:53 +01:00