Replies: 1 comment
-
Well, first, let me give the disclaimer that webp is not a very commonly used format by most OIIO power users (it never comes up in a VFX or animation context, that I've ever heard), so it's possible that there are performance problems lurking that we just haven't noticed. As general advice, I will say that the following applies to all image types:
Assuming all this is squared away, next I would recommend just benchmarking webp reads against other formats like TIFF or maybe PNG. Is it slow compared to other formats? If it seems slow in comparison to other formats we support, then there are several other avenues to pursue. There may be improvements possible in our webpinput.cpp (glancing at it, I can think of several, but let's establish if this is the case before I go into a lengthy explanation). It could, I'm sorry, also turn out to be that we are doing fine on the OIIO side, but that the webp library we are depending on is not very performant. Or that the OIIO+webp is fine, but your app is where the trouble is. Or it could be that it's all written as good as it can be, but there's just a maximum rate at which the webp can be read from disk and decoded. But like I said, the first step is to try the general suggestions above, and then to benchmark against other OIIO-supported file types (as close to apples-to-apples comparison as possible -- same image, same channels, same data type). |
Beta Was this translation helpful? Give feedback.
-
here is what i tried, i use ImageInput::open() function to load the webp file in thread and read image data to a vector by using the function read_scanlines(int subimage...).
it will get what i want but a little bit slow for me.
what is fastest way to do this?
thanks.
Beta Was this translation helpful? Give feedback.
All reactions