libheif icon indicating copy to clipboard operation
libheif copied to clipboard

Error in encoding big images with CTU size 16

Open keni7385 opened this issue 10 months ago • 4 comments

Hello,

I am using libheif to encode large images via x265 encoder. I am interested in testing the smallest CTU size (16). I receive the Invalid Image size error. For squared images with size HxH, this happens for H>1488.

For convenience, we can reproduce the error using heif-enc on a 2048x2048 test image:

 heif-enc -p x265:ctu=16  man4.jpg man4_ctu16.heic
Could not encode HEIF/AVIF file: Encoder plugin generated an error: Invalid image size

It works fine with a smaller image, e.g. 1024x1024, or with higher ctu:

 heif-enc -p x265:ctu=16  man1.jpg man1_ctu16.heic
 heif-enc -p x265:ctu=32  man4.jpg man4_ctu32.heic
 heif-enc -p x265:ctu=64  man4.jpg man4_ctu64.heic

It seems to be independent on the image content, at least with the samples I have tried.

I am using libheif v1.17.6 and x265 v3.5.


test_images.zip

keni7385 avatar Apr 12 '24 15:04 keni7385