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

Michael Niedermayer michaelni
Thu Aug 19 12:05:56 CEST 2010


On Thu, Aug 19, 2010 at 12:44:17AM -0300, Ramiro Polla wrote:
> 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.

i know enough to have a bad feeling with adler32 and "continous" 8bit data
so thanks for switching to crc


>  swscale-test.c |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> e984bb459c005344f6453cf8644b1ec490c53fa3  swscale-test-crc.diff

looks ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100819/4cdf105b/attachment.pgp>



More information about the ffmpeg-devel mailing list