Mercurial > libavcodec.hg
comparison eac3dec.c @ 8545:a5402e89a80c libavcodec
Factorise enum of AC3 error types to be usable by AAC in the ADTS patch that
will follow
Patch by Alex Converse ( alex converse gmail com )
author | superdump |
---|---|
date | Wed, 07 Jan 2009 18:10:10 +0000 |
parents | f93efc084e41 |
children | 323e4f591d7a |
comparison
equal
deleted
inserted
replaced
8544:0ae8629baf6f | 8545:a5402e89a80c |
---|---|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 */ | 21 */ |
22 | 22 |
23 #include "avcodec.h" | 23 #include "avcodec.h" |
24 #include "internal.h" | 24 #include "internal.h" |
25 #include "aac_ac3_parser.h" | |
25 #include "ac3.h" | 26 #include "ac3.h" |
26 #include "ac3_parser.h" | 27 #include "ac3_parser.h" |
27 #include "ac3dec.h" | 28 #include "ac3dec.h" |
28 #include "ac3dec_data.h" | 29 #include "ac3dec_data.h" |
29 | 30 |
182 /* An E-AC-3 stream can have multiple independent streams which the | 183 /* An E-AC-3 stream can have multiple independent streams which the |
183 application can select from. each independent stream can also contain | 184 application can select from. each independent stream can also contain |
184 dependent streams which are used to add or replace channels. */ | 185 dependent streams which are used to add or replace channels. */ |
185 if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { | 186 if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { |
186 ff_log_missing_feature(s->avctx, "Dependent substream decoding", 1); | 187 ff_log_missing_feature(s->avctx, "Dependent substream decoding", 1); |
187 return AC3_PARSE_ERROR_FRAME_TYPE; | 188 return AAC_AC3_PARSE_ERROR_FRAME_TYPE; |
188 } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { | 189 } else if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { |
189 av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); | 190 av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); |
190 return AC3_PARSE_ERROR_FRAME_TYPE; | 191 return AAC_AC3_PARSE_ERROR_FRAME_TYPE; |
191 } | 192 } |
192 | 193 |
193 /* The substream id indicates which substream this frame belongs to. each | 194 /* The substream id indicates which substream this frame belongs to. each |
194 independent stream has its own substream id, and the dependent streams | 195 independent stream has its own substream id, and the dependent streams |
195 associated to an independent stream have matching substream id's. */ | 196 associated to an independent stream have matching substream id's. */ |
196 if (s->substreamid) { | 197 if (s->substreamid) { |
197 /* only decode substream with id=0. skip any additional substreams. */ | 198 /* only decode substream with id=0. skip any additional substreams. */ |
198 ff_log_missing_feature(s->avctx, "Additional substreams", 1); | 199 ff_log_missing_feature(s->avctx, "Additional substreams", 1); |
199 return AC3_PARSE_ERROR_FRAME_TYPE; | 200 return AAC_AC3_PARSE_ERROR_FRAME_TYPE; |
200 } | 201 } |
201 | 202 |
202 if (s->bit_alloc_params.sr_code == EAC3_SR_CODE_REDUCED) { | 203 if (s->bit_alloc_params.sr_code == EAC3_SR_CODE_REDUCED) { |
203 /* The E-AC-3 specification does not tell how to handle reduced sample | 204 /* The E-AC-3 specification does not tell how to handle reduced sample |
204 rates in bit allocation. The best assumption would be that it is | 205 rates in bit allocation. The best assumption would be that it is |