x265 does not allow image sizes smaller than a CTU

Issue #475 new
Dirk Farin created an issue

When encoding an image with size smaller than one CTU, the error "x265 [error]: Picture size must be at least one CTU" is generated. While this error sounds valid at first sight, it is not actually true, as in this case, a video with a single CTU should be generated, with the same non-multiples of CTU-size handling as for any other kind of image size.

Hence, I think that only this parameter check is wrong and the encoder should be capable of handling small sizes without any other modifications. Probably it can be simply removed.

The check is in source/common/param.cpp:1481.

PS: I am the author of libheif, and using x265 for encoding HEIF images. I run into this issue when people try to encode very small images (e.g. icons).

Comments (0)

  1. Log in to comment