• 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

78 static int set_chroma_format(AVCodecContext *avctx)
84 SchroEncoderParams *p_schro_params = avctx->priv_data;
87 if (schro_pixel_format_map[idx].ff_pix_fmt == avctx->pix_fmt) {
94 av_log(avctx, AV_LOG_ERROR,
101 static av_cold int libschroedinger_encode_init(AVCodecContext *avctx)
103 SchroEncoderParams *p_schro_params = avctx->priv_data;
113 av_log(avctx, AV_LOG_ERROR,
119 preset = ff_get_schro_video_format_preset(avctx);
123 p_schro_params->format->width = avctx->width;
124 p_schro_params->format->height = avctx->height;
126 if (set_chroma_format(avctx) == -1)
129 if (avctx->color_primaries == AVCOL_PRI_BT709) {
131 } else if (avctx->color_primaries == AVCOL_PRI_BT470BG) {
133 } else if (avctx->color_primaries == AVCOL_PRI_SMPTE170M) {
137 if (avctx->colorspace == AVCOL_SPC_BT709) {
139 } else if (avctx->colorspace == AVCOL_SPC_BT470BG) {
143 if (avctx->color_trc == AVCOL_TRC_BT709) {
149 av_log(avctx, AV_LOG_ERROR,
155 p_schro_params->format->frame_rate_numerator = avctx->time_base.den;
156 p_schro_params->format->frame_rate_denominator = avctx->time_base.num;
158 p_schro_params->frame_size = avpicture_get_size(avctx->pix_fmt,
159 avctx->width,
160 avctx->height);
162 avctx->coded_frame = av_frame_alloc();
163 if (!avctx->coded_frame)
166 if (!avctx->gop_size) {
171 if (avctx->coder_type == FF_CODER_TYPE_VLC)
176 "au_distance", avctx->gop_size);
177 avctx->has_b_frames = 1;
182 if (avctx->flags & CODEC_FLAG_QSCALE) {
183 if (!avctx->global_quality) {
194 quality = avctx->global_quality / FF_QP2LAMBDA;
206 "bitrate", avctx->bit_rate);
209 if (avctx->flags & CODEC_FLAG_INTERLACED_ME)
216 !(avctx->flags & CODEC_FLAG_CLOSED_GOP));
228 schro_debug_set_level(avctx->debug);
237 static SchroFrame *libschroedinger_frame_from_data(AVCodecContext *avctx,
240 SchroEncoderParams *p_schro_params = avctx->priv_data;
245 in_frame = ff_create_schro_frame(avctx, p_schro_params->frame_format);
248 avpicture_layout((const AVPicture *)frame, avctx->pix_fmt,
249 avctx->width, avctx->height,
264 static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
268 SchroEncoderParams *p_schro_params = avctx->priv_data;
286 SchroFrame *in_frame = libschroedinger_frame_from_data(avctx, frame);
363 av_log(avctx, AV_LOG_ERROR, "Unknown Schro Encoder state\n");
382 if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0)
386 avctx->coded_frame->key_frame = p_frame_output->key_frame;
391 avctx->coded_frame->pts = p_frame_output->frame_num;
416 static int libschroedinger_encode_close(AVCodecContext *avctx)
418 SchroEncoderParams *p_schro_params = avctx->priv_data;
435 av_frame_free(&avctx->coded_frame);