FFmpeg
Loading...
Searching...
No Matches
flac.h
Go to the documentation of this file.
1/*
2 * FLAC (Free Lossless Audio Codec) common stuff
3 * Copyright (c) 2008 Justin Ruggles
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22/**
23 * @file
24 * FLAC (Free Lossless Audio Codec) common stuff
25 */
26
27#ifndef AVCODEC_FLAC_H
28#define AVCODEC_FLAC_H
29
31
32#define FLAC_STREAMINFO_SIZE 34
33#define FLAC_MAX_CHANNELS 8
34#define FLAC_MIN_BLOCKSIZE 16
35#define FLAC_MAX_BLOCKSIZE 65535
36#define FLAC_MIN_FRAME_SIZE 10
37
38enum {
43};
44
45enum {
54};
55
56/**
57 * Parse the metadata block parameters from the header.
58 * @param[in] block_header header data, at least 4 bytes
59 * @param[out] last indicator for last metadata block
60 * @param[out] type metadata block type
61 * @param[out] size metadata block size
62 */
63static av_always_inline void flac_parse_block_header(const uint8_t *block_header,
64 int *last, int *type, int *size)
65{
66 int tmp = *block_header;
67 if (last)
68 *last = tmp & 0x80;
69 if (type)
70 *type = tmp & 0x7F;
71 if (size)
72 *size = AV_RB24(block_header + 1);
73}
74
75#endif /* AVCODEC_FLAC_H */
@ FLAC_CHMODE_RIGHT_SIDE
Definition flac.h:41
@ FLAC_CHMODE_MID_SIDE
Definition flac.h:42
@ FLAC_CHMODE_LEFT_SIDE
Definition flac.h:40
@ FLAC_CHMODE_INDEPENDENT
Definition flac.h:39
@ FLAC_METADATA_TYPE_APPLICATION
Definition flac.h:48
@ FLAC_METADATA_TYPE_SEEKTABLE
Definition flac.h:49
@ FLAC_METADATA_TYPE_INVALID
Definition flac.h:53
@ FLAC_METADATA_TYPE_PADDING
Definition flac.h:47
@ FLAC_METADATA_TYPE_CUESHEET
Definition flac.h:51
@ FLAC_METADATA_TYPE_PICTURE
Definition flac.h:52
@ FLAC_METADATA_TYPE_VORBIS_COMMENT
Definition flac.h:50
@ FLAC_METADATA_TYPE_STREAMINFO
Definition flac.h:46
static av_always_inline void flac_parse_block_header(const uint8_t *block_header, int *last, int *type, int *size)
Parse the metadata block parameters from the header.
Definition flac.h:63
cl_device_type type
#define AV_RB24(x)
#define av_always_inline
Definition attributes.h:72
static uint8_t tmp[40]
Definition aes_ctr.c:52
int size