Lines Matching refs:avctx
52 static av_cold int decode_init(AVCodecContext *avctx)
54 V210DecContext *s = avctx->priv_data;
56 if (avctx->width & 1) {
57 av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n");
60 avctx->pix_fmt = AV_PIX_FMT_YUV422P10;
61 avctx->bits_per_raw_sample = 10;
71 static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
74 V210DecContext *s = avctx->priv_data;
84 int aligned_width = ((avctx->width + 47) / 48) * 48;
88 if (avpkt->size < stride * avctx->height) {
89 if ((((avctx->width + 23) / 24) * 24 * 8) / 3 * avctx->height == avpkt->size) {
90 stride = avpkt->size / avctx->height;
92 av_log(avctx, AV_LOG_WARNING, "Broken v210 with too small padding (64 byte) detected\n");
95 av_log(avctx, AV_LOG_ERROR, "packet too small\n");
107 if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
116 for (h = 0; h < avctx->height; h++) {
120 w = (avctx->width / 6) * 6;
128 if (w < avctx->width - 1) {
133 if (w < avctx->width - 3) {
144 y += pic->linesize[0] / 2 - avctx->width;
145 u += pic->linesize[1] / 2 - avctx->width / 2;
146 v += pic->linesize[2] / 2 - avctx->width / 2;
149 if (avctx->field_order > AV_FIELD_PROGRESSIVE) {
152 if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)