Lines Matching defs:avctx
35 static av_cold int v410_decode_init(AVCodecContext *avctx)
37 avctx->pix_fmt = AV_PIX_FMT_YUV444P10;
38 avctx->bits_per_raw_sample = 10;
40 if (avctx->width & 1) {
41 if (avctx->err_recognition & AV_EF_EXPLODE) {
42 av_log(avctx, AV_LOG_ERROR, "v410 requires width to be even.\n");
45 av_log(avctx, AV_LOG_WARNING, "v410 requires width to be even, continuing anyway.\n");
52 static int v410_decode_slice(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
57 int thread_count = av_clip(avctx->thread_count, 1, avctx->height/4);
58 int slice_start = (avctx->height * jobnr) / thread_count;
59 int slice_end = (avctx->height * (jobnr+1)) / thread_count;
70 for (j = 0; j < avctx->width; j++) {
88 static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic,
94 int thread_count = av_clip(avctx->thread_count, 1, avctx->height/4);
96 td.stride = avctx->width * 4;
97 if (avpkt->size < 4 * avctx->height * avctx->width) {
98 av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n");
102 if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0)
110 avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count);