Coder Social home page Coder Social logo

Provide key frame list. about libavif HOT 5 CLOSED

aomediacodec avatar aomediacodec commented on July 20, 2024
Provide key frame list.

from libavif.

Comments (5)

joedrago avatar joedrago commented on July 20, 2024

I'm adding stss parsing now (it works locally), but what kind of API are you looking for here?

Possibilities:

  • avifDecoderIsKeyframe(decoder, frameIndex) // 0-based
  • avifDecoderGetNearestKeyframe(decoder, frameIndex) // 0-based
  • exposing the internal syncSample table

With this new keyframe data, I'm experimenting now with an avifDecoderGetNthImage(decoder, frameIndex) which will flush the codec, find the nearest keyframe, and decode up to it. If you had that, would knowing which are keyframes be less interesting?

from libavif.

dalecurtis avatar dalecurtis commented on July 20, 2024

I think both are required for our use case. The first or last API would be best since the Blink decoded image cache tries to be smart about what it can evict and what it doesn't need to decode using knowledge of which frames depend on what.

Later when it tries to refill some of the cache, the GetNthImage you propose would be useful to avoid spinning all the way from the beginning in the worst case (or over several keyframes in the average case).

from libavif.

joedrago avatar joedrago commented on July 20, 2024

Alright, I'll add all 3 calls hinted at above and see that goes.

from libavif.

joedrago avatar joedrago commented on July 20, 2024

Alright, v0.3.10 should have all of the goodies.

from libavif.

dalecurtis avatar dalecurtis commented on July 20, 2024

Thanks!

from libavif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.