[FFmpeg-devel] Indeo3 replacement, take 3
Maxim
max_pole
Fri Oct 30 01:31:21 CET 2009
Vitor Sessak schrieb:
> Maxim wrote:
> [...]
> It is probably missing something like
>
>> if (ctx->frame.data[0])
>> avctx->release_buffer(avctx, &ctx->frame);
>
> in free_frame_buffers()
Thanks! Just added that release_buffer and the error message disappered!
>
>> - compiling with AltiVec enabled on my PPC G5 produces wrong checksums
>> on delta frames. A brief check has shown that "copy_cell" function using
>> DSP util's dsp.put_no_rnd_pixels_tab[0][0]" and
>> dsp.put_no_rnd_pixels_tab[1][0] causes that problem. It just works fine
>> with AltiVec disabled. Could someone skilled in the art help me with it?
>
> I have a guess:
>
> Your code does:
>
>> luma_pitch = FFALIGN(luma_width, 8);
>> chroma_pitch = FFALIGN(chroma_width, 8);
>
> [...]
>
>> ctx->planes[p].pitch = (!p ? luma_pitch : chroma_pitch);
>> ctx->planes[p].width = (!p ? luma_width : chroma_width);
>> ctx->planes[p].height = (!p ? luma_height : chroma_height);
>
> [...]
>
>>
>> /* copy using 16xH blocks */
>> for (i = cell->width >> 2; i > 0; src += 16, dst += 16, i--)
>> ctx->dsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);
>
> And ppc/dsputils_altivec.c says
>
>> /* next one assumes that ((line_size % 16) == 0) */
>> void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int
>> line_size, int h)
>> {
>
> [...]
>
>> c->put_pixels_tab[0][0] = put_pixels16_altivec;
>
> So this should be the culprit. Just align to 16 instead of 8.
>
Just tried it but it works still wrong on delta frames! I'll try to
examine that later...
Regards
Maxim
More information about the ffmpeg-devel
mailing list