From: Martijn van Beurden <mvanb1@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Add 32 bit-per-sample capability to FLAC encoder
Date: Fri, 17 Dec 2021 21:08:30 +0100
Message-ID: <CADQbU6-KMsR-C5RdoAri+7EOiJKOeOitOrY2d67yyE7GcBZBjg@mail.gmail.com> (raw)
In-Reply-To: <20211217114330.GI2829255@pb2>
Op vr 17 dec. 2021 om 12:43 schreef Michael Niedermayer
<michael@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-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2021-12-17 20:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 19:43 Martijn van Beurden
2021-12-16 21:09 ` Paul B Mahol
2021-12-17 6:13 ` Martijn van Beurden
2021-12-17 11:34 ` Michael Niedermayer
2021-12-17 11:43 ` Michael Niedermayer
2021-12-17 20:08 ` Martijn van Beurden [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADQbU6-KMsR-C5RdoAri+7EOiJKOeOitOrY2d67yyE7GcBZBjg@mail.gmail.com \
--to=mvanb1@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git