OLD | NEW |
1 /* | 1 /* |
2 * MPEG Audio header decoder | 2 * MPEG Audio header decoder |
3 * Copyright (c) 2001, 2002 Fabrice Bellard | 3 * Copyright (c) 2001, 2002 Fabrice Bellard |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 /** | 22 /** |
23 * @file libavcodec/mpegaudiodecheader.c | 23 * @file libavcodec/mpegaudiodecheader.c |
24 * MPEG Audio header decoder. | 24 * MPEG Audio header decoder. |
25 */ | 25 */ |
26 | 26 |
27 //#define DEBUG | 27 //#define DEBUG |
28 #include "avcodec.h" | 28 #include "avcodec.h" |
29 #include "mpegaudio.h" | 29 #include "mpegaudio.h" |
30 #include "mpegaudiodata.h" | 30 #include "mpegaudiodata.h" |
| 31 #include "mpegaudiodecheader.h" |
31 | 32 |
32 | 33 |
33 int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) | 34 int ff_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header) |
34 { | 35 { |
35 int sample_rate, frame_size, mpeg25, padding; | 36 int sample_rate, frame_size, mpeg25, padding; |
36 int sample_rate_index, bitrate_index; | 37 int sample_rate_index, bitrate_index; |
37 if (header & (1<<20)) { | 38 if (header & (1<<20)) { |
38 s->lsf = (header & (1<<19)) ? 0 : 1; | 39 s->lsf = (header & (1<<19)) ? 0 : 1; |
39 mpeg25 = 0; | 40 mpeg25 = 0; |
40 } else { | 41 } else { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 dprintf(NULL, "i-"); | 101 dprintf(NULL, "i-"); |
101 } | 102 } |
102 dprintf(NULL, "stereo"); | 103 dprintf(NULL, "stereo"); |
103 } else { | 104 } else { |
104 dprintf(NULL, "mono"); | 105 dprintf(NULL, "mono"); |
105 } | 106 } |
106 dprintf(NULL, "\n"); | 107 dprintf(NULL, "\n"); |
107 #endif | 108 #endif |
108 return 0; | 109 return 0; |
109 } | 110 } |
OLD | NEW |