• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:avctx

91 static av_cold int adpcm_decode_init(AVCodecContext * avctx)
93 ADPCMDecodeContext *c = avctx->priv_data;
97 switch(avctx->codec->id) {
108 if (avctx->channels < min_channels || avctx->channels > max_channels) {
109 av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
113 switch(avctx->codec->id) {
118 if (avctx->bits_per_coded_sample != 4) {
119 av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n");
124 if (avctx->extradata && avctx->extradata_size == 2 * 4) {
125 c->status[0].predictor = AV_RL32(avctx->extradata);
126 c->status[1].predictor = AV_RL32(avctx->extradata + 4);
132 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
135 avctx->coded_frame = &c->frame;
263 static int xa_decode(AVCodecContext *avctx,
277 av_log(avctx, AV_LOG_ERROR,
310 av_log(avctx, AV_LOG_ERROR,
351 static int get_nb_samples(AVCodecContext *avctx, const uint8_t *buf,
354 ADPCMDecodeContext *s = avctx->priv_data;
356 int ch = avctx->channels;
362 switch (avctx->codec->id) {
387 switch (avctx->codec->id) {
397 switch (avctx->codec->id) {
424 switch (avctx->codec->id) {
443 if (avctx->block_align > 0)
444 buf_size = FFMIN(buf_size, avctx->block_align);
451 if (avctx->block_align > 0)
452 buf_size = FFMIN(buf_size, avctx->block_align);
456 if (avctx->block_align > 0)
457 buf_size = FFMIN(buf_size, avctx->block_align);
465 switch (avctx->codec->id) {
528 static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
533 ADPCMDecodeContext *c = avctx->priv_data;
542 nb_samples = get_nb_samples(avctx, buf, buf_size, &coded_samples);
544 av_log(avctx, AV_LOG_ERROR, "invalid number of samples in packet\n");
550 if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
551 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
560 av_log(avctx, AV_LOG_WARNING, "mismatch in coded sample count\n");
566 st = avctx->channels == 2 ? 1 : 0;
568 switch(avctx->codec->id) {
572 for (channel = 0; channel < avctx->channels; channel++) {
598 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i\n", cs->step_index);
606 samples += avctx->channels;
608 samples += avctx->channels;
614 if (avctx->block_align != 0 && buf_size > avctx->block_align)
615 buf_size = avctx->block_align;
617 for(i=0; i<avctx->channels; i++){
623 av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i\n", cs->step_index);
626 if (*src++) av_log(avctx, AV_LOG_ERROR, "unused byte should be null but is %d!!\n", src[-1]); /* unused */
630 for (i = 0; i < avctx->channels; i++) {
635 samples += avctx->channels;
637 samples += avctx->channels;
639 samples -= 8 * avctx->channels - 1;
641 samples += 7 * avctx->channels;
645 for (i = 0; i < avctx->channels; i++)
648 for (i = 0; i < avctx->channels; i++) {
653 for (i = 0; i < avctx->channels; i++) {
659 samples += avctx->channels;
661 samples += avctx->channels;
669 if (avctx->block_align != 0 && buf_size > avctx->block_align)
670 buf_size = avctx->block_align;
701 if (avctx->block_align != 0 && buf_size > avctx->block_align)
702 buf_size = avctx->block_align;
704 for (channel = 0; channel < avctx->channels; channel++) {
725 if (avctx->block_align != 0 && buf_size > avctx->block_align)
726 buf_size = avctx->block_align;
768 for (channel = 0; channel < avctx->channels; channel++) {
799 if ((ret = xa_decode(avctx, samples, src, &c->status[0],
800 &c->status[1], avctx->channels)) < 0)
885 for(channel = 0; channel < avctx->channels; channel++) {
893 for(channel = 0; channel < avctx->channels; channel++) {
903 src+=avctx->channels;
916 const int big_endian = avctx->codec->id == CODEC_ID_ADPCM_EA_R3;
928 for (channel=0; channel<avctx->channels; channel++) {
931 + (avctx->channels-channel-1) * 4;
937 if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) {
954 samplesC += avctx->channels;
975 samplesC += avctx->channels;
982 av_log(avctx, AV_LOG_WARNING, "per-channel sample count mismatch\n");
986 if (avctx->codec->id != CODEC_ID_ADPCM_EA_R1) {
997 for (channel=0; channel<avctx->channels; channel++) {
1000 for (n=0; n<4; n++, s+=32*avctx->channels) {
1004 for (s2=s, i=0; i<2; i++, src+=2, s2+=avctx->channels)
1009 s = &samples[m*avctx->channels + channel];
1010 for (n=0; n<4; n++, src++, s+=32*avctx->channels) {
1011 for (s2=s, i=0; i<8; i+=4, s2+=avctx->channels) {
1013 int pred = s2[-1*avctx->channels] * coeff[0][n]
1014 + s2[-2*avctx->channels] * coeff[1][n];
1023 if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) {
1038 if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV)
1065 if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_4) {
1072 } else if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_3) {
1110 while (get_bits_count(&gb) <= size - 22*avctx->channels) {
1111 for (i = 0; i < avctx->channels; i++) {
1116 for (count = 0; get_bits_count(&gb) <= size - nb_bits*avctx->channels && count < 4095; count++) {
1119 for (i = 0; i < avctx->channels; i++) {