[Xvid-devel] bgr_to_yv12_mmx access violation for BGR 1280*1024 image. Is that just me?

Stephan Aßmus superstippi at gmx.de
Thu Apr 21 11:49:10 CEST 2011



Erwin Bellon <erwin.bellon at uzleuven.be> schrieb:

>Stephan,
>
>You mention that for my RGB24 format the stride should be a multiple of
>3. Isn't the stride the number of bytes between the start of one line
>in the image and the next line? I thought that on the Windows platform
>that figure should be a multiple of 4 for packed formats. In this
>specific case there are no padding bytes as 3840 is both a multiple of
>3 and of 4. I calculate the stride using as (((imageWidth *
>nrBitsPerPixel) + 31) & ~31) >> 3, which I assumed to round up to the
>next 4-byte boundary.


You would know best how many Bytes are truely available if you allocate the buffer yourself. If you obtained the buffer from the OS then there should be methods which provide this information.

best regards,
-Stephan 


More information about the Xvid-devel mailing list