[libav-devel] [rfc] a replacement decoder

Kostya Shishkov kostya.shishkov at gmail.com
Tue Nov 1 11:28:20 CET 2011


On Sun, Oct 30, 2011 at 12:30:17PM -0700, Ronald S. Bultje wrote:
> Hi,
> 
> On Sun, Oct 30, 2011 at 11:05 AM, Kostya Shishkov
> <kostya.shishkov at gmail.com> wrote:
> > Here's a new hit from Elvis Presley - You're The Devil in Disguise.
> > Nothing to do with Apple this time though.
> [..]
> > static inline void fill_64(uint8_t *dst, const uint64_t pix, int32_t n, int32_t row_offset)
> > {
> >     for (; n > 0; dst += row_offset, n--)
> >       *((uint64_t *)(dst)) = pix;
> > }
> 
> AV_WN64A().

done
 
> > static inline uint64_t replicate64(uint64_t a) {
> > #if HAVE_BIGENDIAN
> >     a &= 0xFF00FF00FF00FF00;
> >     a |= a >> 8;
> > #else
> >     a &= 0x00FF00FF00FF00FF;
> >     a |= a << 8;
> > #endif
> >     return a;
> > }
> 
> 0x00FF...ULL please.

done

> > #define DECODE_CELL_TEMPLATE(h_zoom, v_zoom, PREPARE_DELTA, APPLY_DELTA,\
> >                              RLE_BLOCK_ACTION, RLE_CODE_ACTION)\
> 
> OK, I hate long macros, they are impossible to debug. Can this be made
> inline please?

here you are
 
> How does performance compare with current indeo3.c?

Looks like new decoder is slower but that does not really matter for it still
very fast for practical purposes. On 1.2GHz i7:
320x240 24 fps 210 sec file   old - 2.25 sec new - 2.9 sec
156x120 15 fps 546 sec file   old - 1.14 sec new - 1.42 sec

At least new decoder is much more secure and doesn't lose buffers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indeo3.c
Type: text/x-csrc
Size: 38384 bytes
Desc: not available
URL: <http://lists.libav.org/pipermail/libav-devel/attachments/20111101/395d28be/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indeo3data.h
Type: text/x-chdr
Size: 18536 bytes
Desc: not available
URL: <http://lists.libav.org/pipermail/libav-devel/attachments/20111101/395d28be/attachment-0001.h>


More information about the libav-devel mailing list