Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtizonia: nBufferSize is not updated on video output port #358

Closed
CapOM opened this issue Jul 25, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@CapOM
Copy link

commented Jul 25, 2017

When vp8dprc.c::update_output_port_params calls "tiz_krn_SetParameter_internal" it results that the video output port does not get its nBufferSize updated. Instead only the input port has its nBufferSize recomputed.
Here is the possible cause:

In https://github.com/tizonia/tizonia-openmax-il/blob/master/libtizonia/src/tizkernel.c#L224 there is A) tiz_port_apply_slaving_behaviour (p_mos_port, ap_port).
I wonder if it should be B) iz_port_apply_slaving_behaviour (ap_port, p_mos_port) instead of above.

Indeed here https://github.com/tizonia/tizonia-openmax-il/blob/master/libtizonia/src/tizvideoport.c#L457 it is defined like this:
videoport_apply_slaving_behaviour (void * ap_obj, void * ap_mos_port)
So the order of the param is not the same.

The exact issue is that https://github.com/tizonia/tizonia-openmax-il/blob/master/libtizonia/src/tizvideoport.c#L485
nBufferSize gets updated on the input port see "p_base->portdef_.nBufferSize = new_buf_sz;" here https://github.com/tizonia/tizonia-openmax-il/blob/master/libtizonia/src/tizvideoport.c#L528
But this value is not reflected back to the output port.

Changing A to B fixes the issue but I guess this is wrong since this is to forward changes from one port to another. But here the nBufferSize is not copied from on port to another. It is computed: "const OMX_U32 new_buf_sz = y_sz + u_sz + v_sz; " so I am confused. Also I am confused because this is done on the bitstream port (ex: input port of a decoder).

Thx in advance for your clarifications !

@juanrubio juanrubio added the bug label Jul 31, 2017

@juanrubio juanrubio added this to the v0.9.0 milestone Jul 31, 2017

@juanrubio juanrubio self-assigned this Jul 31, 2017

@juanrubio juanrubio changed the title nBufferSize not updated on video output port libtizonia: nBufferSize is not updated on video output port Jul 31, 2017

@CapOM

This comment has been minimized.

Copy link
Author

commented Aug 1, 2017

So in the end we only need:
libtizonia/src/tizvideoport.c
if (new_buf_sz != p_base->portdef_.nBufferSize && OMX_VIDEO_CodingUnused == p_base->portdef_.format.video.eCompressionFormat)

I tested that changed and it worked but I do not have the fork at the moment so please submit the change, thx a lot!

@juanrubio

This comment has been minimized.

Copy link
Collaborator

commented Aug 1, 2017

@CapOM : changes are committed here 4ef0f66

Could you please review and close this issue if everything looks ok?

@CapOM

This comment has been minimized.

Copy link
Author

commented Aug 1, 2017

Works. Thx

@CapOM CapOM closed this Aug 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.