Lines Matching defs:avctx

94 static av_cold int encode_init(AVCodecContext *avctx)
96 EXRContext *s = avctx->priv_data;
100 switch (avctx->pix_fmt) {
125 s->nb_scanlines = avctx->height;
129 s->nb_scanlines = (avctx->height + s->scanline_height - 1) / s->scanline_height;
142 static av_cold int encode_close(AVCodecContext *avctx)
144 EXRContext *s = avctx->priv_data;
351 static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
354 EXRContext *s = avctx->priv_data;
358 int64_t out_size = 2048LL + avctx->height * 16LL +
359 av_image_get_buffer_size(avctx->pix_fmt,
360 avctx->width,
361 avctx->height, 64) * 3LL / 2;
363 if ((ret = ff_get_encode_buffer(avctx, pkt, out_size, 0)) < 0)
392 bytestream2_put_le32(pb, avctx->width - 1);
393 bytestream2_put_le32(pb, avctx->height - 1);
399 bytestream2_put_le32(pb, avctx->width - 1);
400 bytestream2_put_le32(pb, avctx->height - 1);
414 if (avctx->sample_aspect_ratio.num && avctx->sample_aspect_ratio.den) {
417 bytestream2_put_le32(pb, av_float2int(av_q2d(avctx->sample_aspect_ratio)));
420 if (avctx->framerate.num && avctx->framerate.den) {
423 bytestream2_put_le32(pb, avctx->framerate.num);
424 bytestream2_put_le32(pb, avctx->framerate.den);
453 offset = bytestream2_tell_p(pb) + avctx->height * 8LL;
457 for (int y = 0; y < avctx->height; y++) {
459 offset += avctx->width * s->planes * 4 + 8;
462 for (int y = 0; y < avctx->height; y++) {
464 bytestream2_put_le32(pb, s->planes * avctx->width * 4);
468 avctx->width * 4);
472 for (int y = 0; y < avctx->height; y++) {
474 offset += avctx->width * s->planes * 2 + 8;
477 for (int y = 0; y < avctx->height; y++) {
479 bytestream2_put_le32(pb, s->planes * avctx->width * 2);