pVBuffer – In the OPENMAX DL, it is given that the the pVBuffer input for the current call should contain the pVBuffer output generated by the previous call and each call .

So have taken the first half of the buffer for channel 0 and the second half of the buffer for channel 1 and passing the addresses of the Buffer accordingly from outside the API.

pVPosition- In the OPENMAX DL, it is given that the state variable pVPosition should be initialized to zero and preserved between calls.

I have chosen two pointers to store the actual position, one for channel 0 and one for channel 1, so that the pVPosition value is not changed when we move from channel 0 to channel 1 and will be the previous value when we come back to channel 0 for the next frame.