chromeos / cros-codecs

BSD 3-Clause "New" or "Revised" License
30 stars 11 forks source link

Move some H.264 decoder methods to the DPB #40

Closed Gnurou closed 1 year ago

Gnurou commented 1 year ago

Hi Daniel,

I am thinking about moving these methods to the DPB since they essentially work on it. It seems to make sense from a logical point of view, and another benefit is that by doing so we don't need an exclusive reference on the whole self of the decoder, only on self.dpb. This turns out to be useful in order to extract the state required to decode a frame and maybe factorize the decoder code.

WDYT? If you have no objection I'm planning on doing the same for other similar methods.

dwlsalmeida commented 1 year ago

Hi Alex,

If it makes it easier to refactor as you said I see no problem at all.

Gnurou commented 1 year ago

Thank you! Proceeding with this. Being able to not borrow the full self should allow us to do less dropping/reacquiring of data in order to satisfy the borrow checker.