Lines Matching defs:avctx

130     AVCodecContext *avctx;
275 AVCodecContext *avctx = s->avctx;
276 put_vc2_ue_uint(&s->pb, avctx->width);
277 put_vc2_ue_uint(&s->pb, avctx->height);
310 AVCodecContext *avctx = s->avctx;
312 put_vc2_ue_uint(&s->pb, avctx->time_base.den);
313 put_vc2_ue_uint(&s->pb, avctx->time_base.num);
322 AVCodecContext *avctx = s->avctx;
324 put_vc2_ue_uint(&s->pb, avctx->sample_aspect_ratio.num);
325 put_vc2_ue_uint(&s->pb, avctx->sample_aspect_ratio.den);
346 AVCodecContext *avctx = s->avctx;
354 if (avctx->color_primaries == AVCOL_PRI_BT470BG)
356 else if (avctx->color_primaries == AVCOL_PRI_SMPTE170M)
358 else if (avctx->color_primaries == AVCOL_PRI_SMPTE240M)
366 if (avctx->colorspace == AVCOL_SPC_RGB)
368 else if (avctx->colorspace == AVCOL_SPC_YCOCG)
370 else if (avctx->colorspace == AVCOL_SPC_BT470BG)
378 if (avctx->color_trc == AVCOL_TRC_LINEAR)
380 else if (avctx->color_trc == AVCOL_TRC_BT1361_ECG)
617 static int rate_control(AVCodecContext *avctx, void *arg)
669 s->avctx->execute(s->avctx, rate_control, enc_args, NULL, s->num_x*s->num_y,
723 static int encode_hq_slice(AVCodecContext *avctx, void *arg)
796 s->avctx->execute(s->avctx, encode_hq_slice, enc_args, NULL, s->num_x*s->num_y,
839 static int dwt_plane(AVCodecContext *avctx, void *arg)
912 s->avctx->execute(s->avctx, dwt_plane, s->transform_args, NULL, 3,
919 ret = ff_get_encode_buffer(s->avctx, avpkt,
922 av_log(s->avctx, AV_LOG_ERROR, "Error getting output packet.\n");
951 static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
956 VC2EncContext *s = avctx->priv_data;
957 const int bitexact = avctx->flags & AV_CODEC_FLAG_BITEXACT;
961 int64_t r_bitrate = avctx->bit_rate >> (s->interlaced);
963 s->avctx = avctx;
970 s->frame_max_bytes = (av_rescale(r_bitrate, s->avctx->time_base.num,
971 s->avctx->time_base.den) >> 3) - header_size;
1006 static av_cold int vc2_encode_end(AVCodecContext *avctx)
1009 VC2EncContext *s = avctx->priv_data;
1011 av_log(avctx, AV_LOG_INFO, "Qavg: %i\n", s->q_avg);
1023 static av_cold int vc2_encode_init(AVCodecContext *avctx)
1028 const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt);
1030 VC2EncContext *s = avctx->priv_data;
1050 s->interlaced = !((avctx->field_order == AV_FIELD_UNKNOWN) ||
1051 (avctx->field_order == AV_FIELD_PROGRESSIVE));
1055 if (avctx->pix_fmt != fmt->pix_fmt)
1057 if (avctx->time_base.num != fmt->time_base.num)
1059 if (avctx->time_base.den != fmt->time_base.den)
1061 if (avctx->width != fmt->width)
1063 if (avctx->height != fmt->height)
1073 av_log(avctx, AV_LOG_WARNING, "Interlacing enabled!\n");
1077 av_log(avctx, AV_LOG_ERROR, "Slice size is not a power of two!\n");
1081 if ((s->slice_width > avctx->width) ||
1082 (s->slice_height > avctx->height)) {
1083 av_log(avctx, AV_LOG_ERROR, "Slice size is bigger than the image!\n");
1088 if (avctx->strict_std_compliance < FF_COMPLIANCE_STRICT) {
1090 av_log(avctx, AV_LOG_WARNING, "Format does not strictly comply with VC2 specs\n");
1092 av_log(avctx, AV_LOG_WARNING, "Given format does not strictly comply with "
1097 av_log(avctx, AV_LOG_INFO, "Selected base video format = %i (%s)\n",
1102 ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift);
1107 if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) {
1111 } else if (depth == 8 && (avctx->color_range == AVCOL_RANGE_MPEG ||
1112 avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) {
1130 p->width = avctx->width >> (i ? s->chroma_x_shift : 0);
1131 p->height = avctx->height >> (i ? s->chroma_y_shift : 0);