BinomialLLC / basis_universal

Basis Universal GPU Texture Codec
Apache License 2.0
2.66k stars 260 forks source link

I-frame flag is always false for KTX2 + UASTC videos #259

Open pezcode opened 2 years ago

pezcode commented 2 years ago

I'm using ktx2_transcoder::get_image_level_info to determine if an image layer in a video file is an I-frame that can be seeked to. However, for UASTC-encoded video loaded from KTX2 file, m_iframe_flag is always false.

My workaround is to always assume layer 0 is an I-frame, but it would be nice if this worked the same way as .basis encoded UASTC video.

Relevant piece of code: https://github.com/BinomialLLC/basis_universal/blob/646a9f826131cb0b9e14b5e4740874808315f83a/transcoder/basisu_transcoder.cpp#L17159

richgel999 commented 2 years ago

Got it - good find. Every frame in UASTC is an iframe. Will fix in the Jan. v1.16 release. Thanks for the report!