Menu

Properly terminating an encoded sequence

2007-10-25
2013-06-04
  • ToddWilliamson

    ToddWilliamson - 2007-10-25

    Hello,

    I'm trying to integrate the dirac encoder and decoder into a compression test application that I've written so that I can do some head-to-head comparisons.

    I'm finding that if I do the following for N frames:

      dirac_encoder_load
      dirac_encoder_output (loop while this returns ENC_STATE_AVAIL)

    of course, at this point I may not have seen ENC_STATE_AVAIL N times yet, and therefore the endoded stream does not contain all of the images seen so far.  I expected this.

    I was expecting that when I call

      dirac_encoder_end_sequence

    It would add the remaining frames to the supplied buffer, but it doesn't seem to do that.  I couldn't find anything explicit in the documentation about this.

    Do I need to add blank frames to the end (or repeat the final frame) until I get the desired number of encoded frames?  Or am I doing something else wrong?

     
    • Tim Borer

      Tim Borer - 2007-10-26

      I don't think you are doing anything wrong. I think you need to add extra frames. I would probably repeat the last frame rather than use a blank frame. I think that the encoder encodes an integer number of (what in MPEG speak would be) GOPS (groups of pictures). I guess this is probably a bug.

      We are currently reviewing where we go with the API and the code in general. So this will eventually be resolved. But, for now, adding extra pictures is a work around.

      If I seem unsure that is becuase I'm not an expert on this bit of the code. Other Dirac team memebers may comment further (or correct me if I've got it wrong).

       

Log in to post a comment.

MongoDB Logo MongoDB