[Xvid-devel] bgr_to_yv12_mmx access violation for BGR 1280*1024 image. Is that just me?
Stephan Aßmus
superstippi at gmx.de
Wed Apr 20 20:11:24 CEST 2011
Hi,
Am 20.04.2011 18:37, schrieb Erwin Bellon:
> I wrapped your fine encoder in a DirectShow filter and use that to capture real-time video. That filter works for most image resolutions but for
> 1280 * 1024 RGB 24bit output from a webcam I get a read access violation. Did I supply wrong values or might this conversion be suspect? Interestingly, the memory location that the code tries to read is just beyond the memory for the image frame.
>
> I include the code that calls the assembler routine below, with the parameter values included between ().
>
> case XVID_CSP_BGR:
> safe_packed_conv(
> src[0], (0x26ac0000, and when added 1280*1024*3
> -> address at which access violation occurs)
> src_stride[0], (3840, is a multiple of 4)
> image->y, (I assume that is an output buffer)
> image->u,
> image->v,
> edged_width, (1408)
> edged_width2, (704)
> width, (1280)
> height, (1024)
> (csp& XVID_CSP_VFLIP), (csp = 80000200
> = XVID_CSP_BGR | XVID_CSP_VFLIP)
>
> interlacing?bgri_to_yv12 :bgr_to_yv12, (interlacing = 0)
> interlacing?bgri_to_yv12_c:bgr_to_yv12_c, 3, interlacing);
>
> Any hint would be appreciated. I will in the mean time try to test some more.
It sounds wrong that src stride is a multiple of 4. It should be a
multiple of 3.
Best regards,
-Stephan
More information about the Xvid-devel
mailing list