• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:avctx

308 static av_cold int g726_encode_init(AVCodecContext *avctx)
310 G726Context* c = avctx->priv_data;
312 if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL &&
313 avctx->sample_rate != 8000) {
314 av_log(avctx, AV_LOG_ERROR, "Sample rates other than 8kHz are not "
319 av_assert0(avctx->sample_rate > 0);
321 if(avctx->channels != 1){
322 av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n");
326 if (avctx->bit_rate)
327 c->code_size = (avctx->bit_rate + avctx->sample_rate/2) / avctx->sample_rate;
330 avctx->bit_rate = c->code_size * avctx->sample_rate;
331 avctx->bits_per_coded_sample = c->code_size;
337 avctx->frame_size = ((int[]){ 4096, 2736, 2048, 1640 })[c->code_size - 2];
342 static int g726_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
345 G726Context *c = avctx->priv_data;
351 if ((ret = ff_alloc_packet2(avctx, avpkt, out_size)) < 0)
401 static av_cold int g726_decode_init(AVCodecContext *avctx)
403 G726Context* c = avctx->priv_data;
405 if(avctx->channels > 1){
406 avpriv_request_sample(avctx, "Decoding more than one channel");
409 avctx->channels = 1;
410 avctx->channel_layout = AV_CH_LAYOUT_MONO;
412 c->little_endian = !strcmp(avctx->codec->name, "g726le");
414 c->code_size = avctx->bits_per_coded_sample;
416 av_log(avctx, AV_LOG_ERROR, "Invalid number of bits %d\n", c->code_size);
421 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
426 static int g726_decode_frame(AVCodecContext *avctx, void *data,
432 G726Context *c = avctx->priv_data;
441 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
453 av_log(avctx, AV_LOG_ERROR, "Frame invalidly split, missing parser?\n");
460 static void g726_decode_flush(AVCodecContext *avctx)
462 G726Context *c = avctx->priv_data;