[vlc-devel] Severe A/V asynchronous with hardware acceleration on android

Martin Storsjö martin at martin.st
Tue May 8 09:26:56 CEST 2012


On Tue, 8 May 2012, ScottLin wrote:

> Works for me, too. Thank you Martin.
> 
> May I ask what is vlc doing when def->format.video.nSliceHeight = 0 ?
> I saw the workaround which makes def->format.video.nSliceHeight = 0 for
> Galaxy S2.
> And what is the relationship between nSliceHeight and nFramHeight ?

The story is, we only get one single buffer returned, where there's 2 or 3 
planes of data stored. There may be padding between the planes. The 
decoder can set nSliceHeight to some value, which normally indicates the 
full size of the plane (distance between the first and the second planes). 
If it isn't set, we assume that there's no extra vertical padding, and the 
second plane starts directly after the first one.

For the omap4 decoders, they did set nSliceHeight properly, and then got 
updated width/height via the crop rect parameter. In your case, the 
nSliceHeight parameter wasn't set at all, only nFrameHeight, which we 
later overwrote with the real height set from the crop rect. In that case, 
we should regard the nFrameHeight value as plane size.

// Martin



More information about the vlc-devel mailing list