[FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

Michael Niedermayer michael at niedermayer.cc
Sat Sep 3 02:37:18 EEST 2016


On Fri, Sep 02, 2016 at 04:05:44PM -0700, Jonathan Campbell wrote:
> 
> On 09/02/2016 01:56 PM, Michael Niedermayer wrote:
> >On Fri, Sep 02, 2016 at 01:13:33PM -0700, Jonathan Campbell wrote:
> >>On 09/02/2016 01:01 PM, Michael Niedermayer wrote:
> >>>On Fri, Sep 02, 2016 at 10:19:23AM -0700, Jonathan Campbell wrote:
> >>>[...]
> >>>>CRC computation isn't fast enough? What should I use then? A sum of
> >>>>byte values?
> >>>av_lfg_init() calls av_md5_sum()
> >>>av_md5_sum() is too slow to be called per ac3 frame
> >>>
> >>>[...]
> >>>
> >>>
> >>>_______________________________________________
> >>>ffmpeg-devel mailing list
> >>>ffmpeg-devel at ffmpeg.org
> >>>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>Then for this to work at better performance, I'm going to have to
> >>either directly modify the AVLFG struct state (probably not a good
> >>idea), or add a function to libavutil/lfg.c that allows "fast
> >>seeding" without the use of MD5 which could probably be something as
> >>simple as copy the 32-bit seed 16 times through c->state[] with or
> >>without modification during the loop. Sound good?
> >yes, something like this
> >probably spliting the input into 16 parts get 16 CRCs and use them
> >instead of replication is probably better
> >
> >
> >[...]
> >
> >
> >_______________________________________________
> >ffmpeg-devel mailing list
> >ffmpeg-devel at ffmpeg.org
> >http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> How's this:
> 
> void av_lfg_init_from_data(AVLFG *c, const unsigned char *data,
> unsigned int length) {
>     unsigned int beg, end, segm;
>     const AVCRC *avcrc;

>     uint32_t crc = 0;

1 might be better

should be ok otherwise didnt review it deeply though

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160903/351728a7/attachment.sig>


More information about the ffmpeg-devel mailing list