Changeset 6c44dd6c in ffmpeg
- Timestamp:
- Feb 14, 2015, 9:32:23 PM (10 years ago)
- Branches:
- master
- Children:
- d2223ec2
- Parents:
- 877c038a (diff), 8a213179 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Michael Niedermayer <michaelni@gmx.at> (02/14/15 21:31:53)
- git-committer:
- Michael Niedermayer <michaelni@gmx.at> (02/14/15 21:32:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libavcodec/dcadec.c
r877c038a r6c44dd6c 52 52 # include "arm/dca.h" 53 53 #endif 54 55 //#define TRACE56 54 57 55 enum DCAMode { … … 512 510 s->current_subsubframe = 0; 513 511 514 #ifdef TRACE515 av_log(s->avctx, AV_LOG_DEBUG, "subframes: %i\n", s->subframes);516 av_log(s->avctx, AV_LOG_DEBUG, "prim channels: %i\n", s->prim_channels);517 for (i = base_channel; i < s->prim_channels; i++) {518 av_log(s->avctx, AV_LOG_DEBUG, "subband activity: %i\n",519 s->subband_activity[i]);520 av_log(s->avctx, AV_LOG_DEBUG, "vq start subband: %i\n",521 s->vq_start_subband[i]);522 av_log(s->avctx, AV_LOG_DEBUG, "joint intensity: %i\n",523 s->joint_intensity[i]);524 av_log(s->avctx, AV_LOG_DEBUG, "transient mode codebook: %i\n",525 s->transient_huffman[i]);526 av_log(s->avctx, AV_LOG_DEBUG, "scale factor codebook: %i\n",527 s->scalefactor_huffman[i]);528 av_log(s->avctx, AV_LOG_DEBUG, "bit allocation quantizer: %i\n",529 s->bitalloc_huffman[i]);530 av_log(s->avctx, AV_LOG_DEBUG, "quant index huff:");531 for (j = 0; j < 11; j++)532 av_log(s->avctx, AV_LOG_DEBUG, " %i", s->quant_index_huffman[i][j]);533 av_log(s->avctx, AV_LOG_DEBUG, "\n");534 av_log(s->avctx, AV_LOG_DEBUG, "scalefac adj:");535 for (j = 0; j < 11; j++)536 av_log(s->avctx, AV_LOG_DEBUG, " %1.3f", s->scalefactor_adj[i][j]);537 av_log(s->avctx, AV_LOG_DEBUG, "\n");538 }539 #endif540 541 512 return 0; 542 513 } … … 600 571 s->output |= DCA_LFE; 601 572 602 #ifdef TRACE603 av_log(s->avctx, AV_LOG_DEBUG, "frame type: %i\n", s->frame_type);604 av_log(s->avctx, AV_LOG_DEBUG, "samples deficit: %i\n", s->samples_deficit);605 av_log(s->avctx, AV_LOG_DEBUG, "crc present: %i\n", s->crc_present);606 av_log(s->avctx, AV_LOG_DEBUG, "sample blocks: %i (%i samples)\n",607 s->sample_blocks, s->sample_blocks * 32);608 av_log(s->avctx, AV_LOG_DEBUG, "frame size: %i bytes\n", s->frame_size);609 av_log(s->avctx, AV_LOG_DEBUG, "amode: %i (%i channels)\n",610 s->amode, dca_channels[s->amode]);611 av_log(s->avctx, AV_LOG_DEBUG, "sample rate: %i Hz\n",612 s->sample_rate);613 av_log(s->avctx, AV_LOG_DEBUG, "bit rate: %i bits/s\n",614 s->bit_rate);615 av_log(s->avctx, AV_LOG_DEBUG, "dynrange: %i\n", s->dynrange);616 av_log(s->avctx, AV_LOG_DEBUG, "timestamp: %i\n", s->timestamp);617 av_log(s->avctx, AV_LOG_DEBUG, "aux_data: %i\n", s->aux_data);618 av_log(s->avctx, AV_LOG_DEBUG, "hdcd: %i\n", s->hdcd);619 av_log(s->avctx, AV_LOG_DEBUG, "ext descr: %i\n", s->ext_descr);620 av_log(s->avctx, AV_LOG_DEBUG, "ext coding: %i\n", s->ext_coding);621 av_log(s->avctx, AV_LOG_DEBUG, "aspf: %i\n", s->aspf);622 av_log(s->avctx, AV_LOG_DEBUG, "lfe: %i\n", s->lfe);623 av_log(s->avctx, AV_LOG_DEBUG, "predictor history: %i\n",624 s->predictor_history);625 av_log(s->avctx, AV_LOG_DEBUG, "header crc: %i\n", s->header_crc);626 av_log(s->avctx, AV_LOG_DEBUG, "multirate inter: %i\n",627 s->multirate_inter);628 av_log(s->avctx, AV_LOG_DEBUG, "version number: %i\n", s->version);629 av_log(s->avctx, AV_LOG_DEBUG, "copy history: %i\n", s->copy_history);630 av_log(s->avctx, AV_LOG_DEBUG,631 "source pcm resolution: %i (%i bits/sample)\n",632 s->source_pcm_res, dca_bits_per_sample[s->source_pcm_res]);633 av_log(s->avctx, AV_LOG_DEBUG, "front sum: %i\n", s->front_sum);634 av_log(s->avctx, AV_LOG_DEBUG, "surround sum: %i\n", s->surround_sum);635 av_log(s->avctx, AV_LOG_DEBUG, "dialog norm: %i\n", s->dialog_norm);636 av_log(s->avctx, AV_LOG_DEBUG, "\n");637 #endif638 639 573 /* Primary audio coding header */ 640 574 s->subframes = get_bits(&s->gb, 4) + 1; … … 840 774 s->lfe_data[j] *= lfe_scale; 841 775 } 842 843 #ifdef TRACE844 av_log(s->avctx, AV_LOG_DEBUG, "subsubframes: %i\n",845 s->subsubframes[s->current_subframe]);846 av_log(s->avctx, AV_LOG_DEBUG, "partial samples: %i\n",847 s->partial_samples[s->current_subframe]);848 849 for (j = base_channel; j < s->prim_channels; j++) {850 av_log(s->avctx, AV_LOG_DEBUG, "prediction mode:");851 for (k = 0; k < s->subband_activity[j]; k++)852 av_log(s->avctx, AV_LOG_DEBUG, " %i", s->prediction_mode[j][k]);853 av_log(s->avctx, AV_LOG_DEBUG, "\n");854 }855 for (j = base_channel; j < s->prim_channels; j++) {856 for (k = 0; k < s->subband_activity[j]; k++)857 av_log(s->avctx, AV_LOG_DEBUG,858 "prediction coefs: %f, %f, %f, %f\n",859 (float) adpcm_vb[s->prediction_vq[j][k]][0] / 8192,860 (float) adpcm_vb[s->prediction_vq[j][k]][1] / 8192,861 (float) adpcm_vb[s->prediction_vq[j][k]][2] / 8192,862 (float) adpcm_vb[s->prediction_vq[j][k]][3] / 8192);863 }864 for (j = base_channel; j < s->prim_channels; j++) {865 av_log(s->avctx, AV_LOG_DEBUG, "bitalloc index: ");866 for (k = 0; k < s->vq_start_subband[j]; k++)867 av_log(s->avctx, AV_LOG_DEBUG, "%2.2i ", s->bitalloc[j][k]);868 av_log(s->avctx, AV_LOG_DEBUG, "\n");869 }870 for (j = base_channel; j < s->prim_channels; j++) {871 av_log(s->avctx, AV_LOG_DEBUG, "Transition mode:");872 for (k = 0; k < s->subband_activity[j]; k++)873 av_log(s->avctx, AV_LOG_DEBUG, " %i", s->transition_mode[j][k]);874 av_log(s->avctx, AV_LOG_DEBUG, "\n");875 }876 for (j = base_channel; j < s->prim_channels; j++) {877 av_log(s->avctx, AV_LOG_DEBUG, "Scale factor:");878 for (k = 0; k < s->subband_activity[j]; k++) {879 if (k >= s->vq_start_subband[j] || s->bitalloc[j][k] > 0)880 av_log(s->avctx, AV_LOG_DEBUG, " %i", s->scale_factor[j][k][0]);881 if (k < s->vq_start_subband[j] && s->transition_mode[j][k])882 av_log(s->avctx, AV_LOG_DEBUG, " %i(t)", s->scale_factor[j][k][1]);883 }884 av_log(s->avctx, AV_LOG_DEBUG, "\n");885 }886 for (j = base_channel; j < s->prim_channels; j++) {887 if (s->joint_intensity[j] > 0) {888 int source_channel = s->joint_intensity[j] - 1;889 av_log(s->avctx, AV_LOG_DEBUG, "Joint scale factor index:\n");890 for (k = s->subband_activity[j]; k < s->subband_activity[source_channel]; k++)891 av_log(s->avctx, AV_LOG_DEBUG, " %i", s->joint_scale_factor[j][k]);892 av_log(s->avctx, AV_LOG_DEBUG, "\n");893 }894 }895 for (j = base_channel; j < s->prim_channels; j++)896 for (k = s->vq_start_subband[j]; k < s->subband_activity[j]; k++)897 av_log(s->avctx, AV_LOG_DEBUG, "VQ index: %i\n", s->high_freq_vq[j][k]);898 if (!base_channel && s->lfe) {899 int lfe_samples = 2 * s->lfe * (4 + block_index);900 int lfe_end_sample = 2 * s->lfe * (4 + block_index + s->subsubframes[s->current_subframe]);901 902 av_log(s->avctx, AV_LOG_DEBUG, "LFE samples:\n");903 for (j = lfe_samples; j < lfe_end_sample; j++)904 av_log(s->avctx, AV_LOG_DEBUG, " %f", s->lfe_data[j]);905 av_log(s->avctx, AV_LOG_DEBUG, "\n");906 }907 #endif908 776 909 777 return 0; … … 1213 1081 /* Check for DSYNC after subsubframe */ 1214 1082 if (s->aspf || subsubframe == s->subsubframes[s->current_subframe] - 1) { 1215 if (0xFFFF == get_bits(&s->gb, 16)) { /* 0xFFFF */ 1216 #ifdef TRACE 1217 av_log(s->avctx, AV_LOG_DEBUG, "Got subframe DSYNC\n"); 1218 #endif 1219 } else { 1083 if (get_bits(&s->gb, 16) != 0xFFFF) { 1220 1084 av_log(s->avctx, AV_LOG_ERROR, "Didn't get subframe DSYNC\n"); 1221 1085 return AVERROR_INVALIDDATA; … … 1383 1247 1384 1248 if (!s->current_subsubframe) { 1385 #ifdef TRACE1386 av_log(s->avctx, AV_LOG_DEBUG, "DSYNC dca_subframe_header\n");1387 #endif1388 1249 /* Read subframe header */ 1389 1250 if ((ret = dca_subframe_header(s, base_channel, block_index))) … … 1392 1253 1393 1254 /* Read subsubframe */ 1394 #ifdef TRACE1395 av_log(s->avctx, AV_LOG_DEBUG, "DSYNC dca_subsubframe\n");1396 #endif1397 1255 if ((ret = dca_subsubframe(s, base_channel, block_index))) 1398 1256 return ret; … … 1405 1263 } 1406 1264 if (s->current_subframe >= s->subframes) { 1407 #ifdef TRACE1408 av_log(s->avctx, AV_LOG_DEBUG, "DSYNC dca_subframe_footer\n");1409 #endif1410 1265 /* Read subframe footer */ 1411 1266 if ((ret = dca_subframe_footer(s, base_channel)))
Note:
See TracChangeset
for help on using the changeset viewer.