Op vr 17 dec. 2021 om 12:43 schreef Michael Niedermayer
<mich...@niedermayer.cc>:
> > +                sub->coefs[i] = sub->coefs[i]*0.98;
>                                                  ^^^^
> This is ugly, the amount of actual overflow should be known at this point
> so no arbitrary downscale should be needed here


Many thanks for the suggestion, I didn't think of using a more
intelligent approach. I'll work something out.


> > +                if (!ff_flacdsp_lpc_encode_c_32_overflow_detect(res, smp, 
> > n, sub->order,
> > +                                                                
> > sub->coefs, sub->shift)) {
> > +                    sub->type = sub->type_code = FLAC_SUBFRAME_VERBATIM;
> > +                    memcpy(res, smp, n * sizeof(int32_t));
> > +                    return subframe_count_exact(s, sub, 0);
>
> How often does this occur ?


Depends on the content. On low dynamic range, distorted, overdriven
sounds like certain kinds of metal, this happens on about half of the
subframes. On most popular music, up to about 5%. On classical music
never. For the intended use (archiving of tape recordings with ample
headroom) probably never as well. A more intelligent approach as
suggested could bring these numbers down.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to