annotate aacadtsdec.h @ 12506:747e5f278c4b libavcodec

The debug text output of macroblocks can indicate MB_TYPE_INTERLACED, but it used to do it only for h264 codec. Allow it for other codecs, as mpeg2 and mpeg4 also set this flag.
author iive
date Tue, 21 Sep 2010 22:44:27 +0000
parents 4f06422196ee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12149
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
1 /*
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
2 * AAC ADTS header decoding prototypes and structures
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
3 * Copyright (c) 2003 Fabrice Bellard
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
4 * Copyright (c) 2003 Michael Niedermayer
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
5 *
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
6 * This file is part of FFmpeg.
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
7 *
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
12 *
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
16 * Lesser General Public License for more details.
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
17 *
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
21 */
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
22
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
23 #ifndef AVCODEC_AACADTSDEC_H
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
24 #define AVCODEC_AACADTSDEC_H
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
25
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
26 #include <stdint.h>
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
27 #include "get_bits.h"
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
28
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
29 #define AAC_ADTS_HEADER_SIZE 7
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
30
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
31 typedef struct {
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
32 uint32_t sample_rate;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
33 uint32_t samples;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
34 uint32_t bit_rate;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
35 uint8_t crc_absent;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
36 uint8_t object_type;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
37 uint8_t sampling_index;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
38 uint8_t chan_config;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
39 uint8_t num_aac_frames;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
40 } AACADTSHeaderInfo;
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
41
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
42 /**
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
43 * Parse AAC frame header.
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
44 * Parse the ADTS frame header to the end of the variable header, which is
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
45 * the first 54 bits.
12165
4f06422196ee Restore mistakenly removed [in]/[out] Doxygen parameter attributes.
diego
parents: 12149
diff changeset
46 * @param[in] gbc BitContext containing the first 54 bits of the frame.
4f06422196ee Restore mistakenly removed [in]/[out] Doxygen parameter attributes.
diego
parents: 12149
diff changeset
47 * @param[out] hdr Pointer to struct where header info is written.
12149
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
48 * @return Returns 0 on success, -1 if there is a sync word mismatch,
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
49 * -2 if the version element is invalid, -3 if the sample rate
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
50 * element is invalid, or -4 if the bit rate element is invalid.
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
51 */
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
52 int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
53
e7634f1b6100 Split the ADTS header decoder off of the ADTS parser.
alexc
parents:
diff changeset
54 #endif /* AVCODEC_AACADTSDEC_H */