Mercurial > libavcodec.hg
comparison ac3dec.c @ 5390:479d93117d3c libavcodec
use enum value instead of numerical value for acmod
author | jbr |
---|---|
date | Mon, 23 Jul 2007 22:47:49 +0000 |
parents | cf99cf2d3af9 |
children | 6c1633a8dbc3 |
comparison
equal
deleted
inserted
replaced
5389:cf99cf2d3af9 | 5390:479d93117d3c |
---|---|
1346 ctx->cplbndstrc = 0; | 1346 ctx->cplbndstrc = 0; |
1347 if (ctx->cplinu) { /* coupling in use */ | 1347 if (ctx->cplinu) { /* coupling in use */ |
1348 for (i = 0; i < nfchans; i++) | 1348 for (i = 0; i < nfchans; i++) |
1349 ctx->chincpl[i] = get_bits1(gb); | 1349 ctx->chincpl[i] = get_bits1(gb); |
1350 | 1350 |
1351 if (acmod == 0x02) | 1351 if (acmod == AC3_ACMOD_STEREO) |
1352 ctx->phsflginu = get_bits1(gb); //phase flag in use | 1352 ctx->phsflginu = get_bits1(gb); //phase flag in use |
1353 | 1353 |
1354 ctx->cplbegf = get_bits(gb, 4); | 1354 ctx->cplbegf = get_bits(gb, 4); |
1355 ctx->cplendf = get_bits(gb, 4); | 1355 ctx->cplendf = get_bits(gb, 4); |
1356 | 1356 |
1390 cplcomant = (cplcomant | 0x10) << 13; | 1390 cplcomant = (cplcomant | 0x10) << 13; |
1391 ctx->cplco[i][bnd] = cplcomant * scale_factors[cplcoexp + mstrcplco]; | 1391 ctx->cplco[i][bnd] = cplcomant * scale_factors[cplcoexp + mstrcplco]; |
1392 } | 1392 } |
1393 } | 1393 } |
1394 | 1394 |
1395 if (acmod == 0x02 && ctx->phsflginu && (ctx->cplcoe & 1 || ctx->cplcoe & 2)) | 1395 if (acmod == AC3_ACMOD_STEREO && ctx->phsflginu && (ctx->cplcoe & 1 || ctx->cplcoe & 2)) |
1396 for (bnd = 0; bnd < ctx->ncplbnd; bnd++) | 1396 for (bnd = 0; bnd < ctx->ncplbnd; bnd++) |
1397 if (get_bits1(gb)) | 1397 if (get_bits1(gb)) |
1398 ctx->cplco[1][bnd] = -ctx->cplco[1][bnd]; | 1398 ctx->cplco[1][bnd] = -ctx->cplco[1][bnd]; |
1399 } | 1399 } |
1400 | 1400 |
1401 if (acmod == 0x02) {/* rematrixing */ | 1401 if (acmod == AC3_ACMOD_STEREO) {/* rematrixing */ |
1402 ctx->rematstr = get_bits1(gb); | 1402 ctx->rematstr = get_bits1(gb); |
1403 if (ctx->rematstr) { | 1403 if (ctx->rematstr) { |
1404 if (!(ctx->cplinu) || ctx->cplbegf > 2) | 1404 if (!(ctx->cplinu) || ctx->cplbegf > 2) |
1405 for (rbnd = 0; rbnd < 4; rbnd++) | 1405 for (rbnd = 0; rbnd < 4; rbnd++) |
1406 ctx->rematflg[rbnd] = get_bits1(gb); | 1406 ctx->rematflg[rbnd] = get_bits1(gb); |