• 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

76     AVCodecContext *avctx;
84 int shift = av_get_bytes_per_sample(s->avctx->sample_fmt) * 8 -
85 s->avctx->bits_per_raw_sample;
96 if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S32P)
374 if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S32P) {
375 int shift = 32 - s->avctx->bits_per_raw_sample;
380 put_sbits(pb, s->avctx->bits_per_raw_sample,
387 put_sbits(pb, s->avctx->bits_per_raw_sample,
391 s->write_sample_size = s->avctx->bits_per_raw_sample - s->extra_bits +
447 const enum AlacRawDataBlockType *ch_elements = ff_alac_channel_elements[s->avctx->channels - 1];
448 const uint8_t *ch_map = ff_alac_channel_layout_offsets[s->avctx->channels - 1];
454 while (ch < s->avctx->channels) {
480 static av_cold int alac_encode_close(AVCodecContext *avctx)
482 AlacEncodeContext *s = avctx->priv_data;
484 av_freep(&avctx->extradata);
485 avctx->extradata_size = 0;
489 static av_cold int alac_encode_init(AVCodecContext *avctx)
491 AlacEncodeContext *s = avctx->priv_data;
495 avctx->frame_size = s->frame_size = DEFAULT_FRAME_SIZE;
497 if (avctx->sample_fmt == AV_SAMPLE_FMT_S32P) {
498 if (avctx->bits_per_raw_sample != 24)
499 av_log(avctx, AV_LOG_WARNING, "encoding as 24 bits-per-sample\n");
500 avctx->bits_per_raw_sample = 24;
502 avctx->bits_per_raw_sample = 16;
507 if (avctx->compression_level == FF_COMPRESSION_DEFAULT)
510 s->compression_level = av_clip(avctx->compression_level, 0, 2);
518 s->max_coded_frame_size = get_max_frame_size(avctx->frame_size,
519 avctx->channels,
520 avctx->bits_per_raw_sample);
522 avctx->extradata = av_mallocz(ALAC_EXTRADATA_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
523 if (!avctx->extradata) {
527 avctx->extradata_size = ALAC_EXTRADATA_SIZE;
529 alac_extradata = avctx->extradata;
532 AV_WB32(alac_extradata+12, avctx->frame_size);
533 AV_WB8 (alac_extradata+17, avctx->bits_per_raw_sample);
534 AV_WB8 (alac_extradata+21, avctx->channels);
537 avctx->sample_rate * avctx->channels * avctx->bits_per_raw_sample); // average bitrate
538 AV_WB32(alac_extradata+32, avctx->sample_rate);
548 if (avctx->min_prediction_order >= 0) {
549 if (avctx->min_prediction_order < MIN_LPC_ORDER ||
550 avctx->min_prediction_order > ALAC_MAX_LPC_ORDER) {
551 av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n",
552 avctx->min_prediction_order);
557 s->min_prediction_order = avctx->min_prediction_order;
561 if (avctx->max_prediction_order >= 0) {
562 if (avctx->max_prediction_order < MIN_LPC_ORDER ||
563 avctx->max_prediction_order > ALAC_MAX_LPC_ORDER) {
564 av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n",
565 avctx->max_prediction_order);
570 s->max_prediction_order = avctx->max_prediction_order;
574 av_log(avctx, AV_LOG_ERROR,
581 s->avctx = avctx;
583 if ((ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size,
591 alac_encode_close(avctx);
595 static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
598 AlacEncodeContext *s = avctx->priv_data;
604 max_frame_size = get_max_frame_size(s->frame_size, avctx->channels,
605 avctx->bits_per_raw_sample);
609 if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * max_frame_size)) < 0)
615 s->extra_bits = avctx->bits_per_raw_sample - 16;