summaryrefslogtreecommitdiff
path: root/libavcodec/flac.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-28 15:21:27 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-02 11:55:22 +0200
commit17b1375965593e688c3e12ddbbb7298c5140b9e1 (patch)
treeea3914945e99be0a4bfb06a3c762b2f3e6e240df /libavcodec/flac.c
parentff1f5b407df8e8740eb6eeee83b202284f6ace7a (diff)
avcodec/flac: Move ff_flac_get_max_frame_size() to flacenc.c
It is its only user. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/flac.c')
-rw-r--r--libavcodec/flac.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/libavcodec/flac.c b/libavcodec/flac.c
index dd68830622..03c7bfb9e6 100644
--- a/libavcodec/flac.c
+++ b/libavcodec/flac.c
@@ -145,27 +145,6 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
return 0;
}
-int ff_flac_get_max_frame_size(int blocksize, int ch, int bps)
-{
- /* Technically, there is no limit to FLAC frame size, but an encoder
- should not write a frame that is larger than if verbatim encoding mode
- were to be used. */
-
- int count;
-
- count = 16; /* frame header */
- count += ch * ((7+bps+7)/8); /* subframe headers */
- if (ch == 2) {
- /* for stereo, need to account for using decorrelation */
- count += (( 2*bps+1) * blocksize + 7) / 8;
- } else {
- count += ( ch*bps * blocksize + 7) / 8;
- }
- count += 2; /* frame footer */
-
- return count;
-}
-
int ff_flac_is_extradata_valid(AVCodecContext *avctx,
enum FLACExtradataFormat *format,
uint8_t **streaminfo_start)