[FFmpeg-devel] [PATCH] swscale-test: add md5 output

Ramiro Polla ramiro.polla
Thu Aug 19 05:44:17 CEST 2010


On Tue, Aug 17, 2010 at 9:14 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Aug 16, 2010 at 05:09:35PM -0300, Ramiro Polla wrote:
[...]
>> @@ -135,6 +137,19 @@
>> ? ? ?sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride);
>> ? ? ?sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);
>>
>> + ? ?for (i = 0; i < 4; i++) {
>> + ? ? ? ?if (!dstStride[i])
>> + ? ? ? ? ? ?break;
>> + ? ? ? ?if (dstW == dstStride[i]) {
>> + ? ? ? ? ? ?checksum = av_adler32_update(checksum, dst[i], dstW * dstH);
>> + ? ? ? ?} else {
>> + ? ? ? ? ? ?for (j = 0; j < dstH; j++) {
>> + ? ? ? ? ? ? ? ?checksum = av_adler32_update(checksum,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? dst[i] + j * dstStride[i], dstW);
>
> this wont work with 16bit per sample formats nor with 1 bit per sample ...

It seems using dstStride was fine since it was filled by
av_fill_image_linesizes().

BTW we're currently allocating stride*height for all planes, it'd be
nice if there was a function that could give back the result of the
size[] calculation from av_fill_image_pointers() (Stefano might want
to do this =).

> also why adler32 and not crc32 ?

I don't know enough to choose one or the other. I chose AV_CRC_32_IEEE
for this new patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale-test-crc.diff
Type: application/octet-stream
Size: 1422 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100819/37d25676/attachment.obj>



More information about the ffmpeg-devel mailing list