Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    424749

Video Encoding Part 5

Sign in to follow this  
_the_phantom_

80 views

If you are wondering what happened to part 4; see below [smile]

Once my brain recovered from friday nights substance abuse (waking up still high on caffine is an... intresting... experiance, heh) I took a poke at the video encoding code again and made a couple of changes under the hood.

Firstly, added multiple colour destination buffers and gave the user the ability to swap between RGB and RGBA. I still need to check it lines up correctly on memory access but meh.

Also, the file is opened on construction as before, however the buffers are also grabbed at construction. The file isn't closed and the buffers aren't released until the class is deleted from memory.

I've also sorted the code out so the framebuffer turns up the right way up now [grin]
This happens at no real extra cost compared to how I was doing it, just needed to do some magic backwards line walking to get the right data at the right point.

Tomorrow I might take a few mins to try and thread this.
The main points of contention are pushing and poping from the two stacks I use to maintain a free/used buffers list.

Main thread pops from the free and pushes to the used.
Encoding thread will pop from the used and push onto the free.
I'll probably just go simple and do it with locks or something like that, unless the locking proves to be a point of contention... which I see as being unlikely at best.

Anyways... I was going to write more, but a mate of mine has just informed me he has a date... so, as I now figure we are living in the end times I don't see the point [wink]

Seriously, it's thrown me, heh
Sign in to follow this  


1 Comment


Recommended Comments

Tell your mate to run! Seriously, girls are nothing but trouble. They will lead you astray. Look at me, how long has it been since you've seen me? QED.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!