Lines Matching defs:avctx

137     AVCodecContext *avctx;
387 static av_cold int dirac_decode_init(AVCodecContext *avctx)
389 DiracContext *s = avctx->priv_data;
392 s->avctx = avctx;
400 ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
418 static void dirac_decode_flush(AVCodecContext *avctx)
420 DiracContext *s = avctx->priv_data;
426 static av_cold int dirac_decode_end(AVCodecContext *avctx)
428 DiracContext *s = avctx->priv_data;
431 dirac_decode_flush(avctx);
516 av_log(s->avctx, AV_LOG_ERROR, "Invalid quant\n");
523 av_log(s->avctx, AV_LOG_ERROR, "Unsupported quant %d\n", b->quant);
641 static int decode_subband_arith(AVCodecContext *avctx, void *b)
643 DiracContext *s = avctx->priv_data;
647 static int decode_subband_golomb(AVCodecContext *avctx, void *arg)
649 DiracContext *s = avctx->priv_data;
660 AVCodecContext *avctx = s->avctx;
680 av_log(s->avctx, AV_LOG_ERROR, "Unsupported quant %d\n", b->quant);
695 avctx->execute(avctx, decode_subband_arith, &s->plane[comp].band[level][!!level],
700 avctx->execute(avctx, decode_subband_golomb, bands, ret, num_bands, sizeof(SubBand*));
740 av_log(s->avctx, AV_LOG_ERROR, "Unsupported quant %d\n", quant);
776 static int decode_lowdelay_slice(AVCodecContext *avctx, void *arg)
778 DiracContext *s = avctx->priv_data;
854 av_log(s->avctx, AV_LOG_ERROR, "Invalid quantization index - %i\n", quant_idx);
875 av_log(s->avctx, AV_LOG_ERROR, "end too far away\n");
917 static int decode_hq_slice_row(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
920 DiracContext *s = avctx->priv_data;
934 AVCodecContext *avctx = s->avctx;
945 av_log(s->avctx, AV_LOG_ERROR, "slice params buffer allocation failure\n");
958 if (s->threads_num_buf != avctx->thread_count ||
960 s->threads_num_buf = avctx->thread_count;
962 s->thread_buf = av_realloc_f(s->thread_buf, avctx->thread_count, s->thread_buf_size);
964 av_log(s->avctx, AV_LOG_ERROR, "thread buffer allocation failure\n");
985 av_log(s->avctx, AV_LOG_ERROR, "too many bytes\n");
1004 av_log(s->avctx, AV_LOG_ERROR, "too few slices\n");
1008 avctx->execute2(avctx, decode_hq_slice_row, slices, NULL, s->num_y);
1015 av_log(s->avctx, AV_LOG_ERROR, "too many bytes\n");
1031 avctx->execute(avctx, decode_lowdelay_slice, slices, NULL, slice_num,
1117 av_log(s->avctx, AV_LOG_ERROR, "Block prediction index too high\n");
1139 av_log(s->avctx, AV_LOG_ERROR,
1145 av_log(s->avctx, AV_LOG_ERROR, "Block separation too small\n");
1149 av_log(s->avctx, AV_LOG_ERROR, "Block separation greater than size\n");
1153 av_log(s->avctx, AV_LOG_ERROR, "Unsupported large block size\n");
1161 av_log(s->avctx, AV_LOG_ERROR, "MV precision finer than eighth-pel\n");
1204 av_log(s->avctx, AV_LOG_ERROR, "Unknown picture prediction mode\n");
1217 av_log(s->avctx, AV_LOG_ERROR, "weight_log2denom unsupported or invalid\n");
1241 av_log(s->avctx, AV_LOG_ERROR, errmsg); \
1261 CHECKEDREAD(s->codeblock[i].width , tmp < 1 || tmp > (s->avctx->width >>s->wavelet_depth-i), "codeblock width invalid\n")
1262 CHECKEDREAD(s->codeblock[i].height, tmp < 1 || tmp > (s->avctx->height>>s->wavelet_depth-i), "codeblock height invalid\n")
1276 s->num_x * (uint64_t)s->avctx->width > INT_MAX ||
1277 s->num_y * (uint64_t)s->avctx->height > INT_MAX ||
1278 s->num_x > s->avctx->width ||
1279 s->num_y > s->avctx->height
1281 av_log(s->avctx,AV_LOG_ERROR,"Invalid numx/y\n");
1289 av_log(s->avctx,AV_LOG_ERROR,"Invalid lowdelay.bytes.den\n");
1296 av_log(s->avctx,AV_LOG_ERROR,"too many prefix bytes\n");
1303 av_log(s->avctx,AV_LOG_DEBUG,"Low Delay: Has Custom Quantization Matrix!\n");
1312 av_log(s->avctx,AV_LOG_ERROR,"Mandatory custom low delay matrix missing for depth %d\n", s->wavelet_depth);
1968 static int get_buffer_with_edge(AVCodecContext *avctx, AVFrame *f, int flags)
1972 ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_x_shift,
1977 f->width = avctx->width + 2 * EDGE_WIDTH;
1978 f->height = avctx->height + 2 * EDGE_WIDTH + 2;
1979 ret = ff_get_buffer(avctx, f, flags);
1988 f->width = avctx->width;
1989 f->height = avctx->height;
2009 av_log(s->avctx,AV_LOG_DEBUG,"PICTURE_NUM: %d\n",picnum);
2031 av_log(s->avctx, AV_LOG_DEBUG, "Reference not found\n");
2038 ret = get_buffer_with_edge(s->avctx, s->ref_pics[i]->avframe, AV_GET_BUFFER_FLAG_REF);
2045 av_log(s->avctx, AV_LOG_ERROR, "Reference could not be allocated\n");
2060 av_log(s->avctx, AV_LOG_DEBUG, "Frame to retire not found\n");
2065 av_log(s->avctx, AV_LOG_ERROR, "Reference frame overflow\n");
2121 static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int size)
2123 DiracContext *s = avctx->priv_data;
2142 ret = av_dirac_parse_sequence_header(&dsh, buf + DATA_UNIT_HEADER_SIZE, size - DATA_UNIT_HEADER_SIZE, avctx);
2144 av_log(avctx, AV_LOG_ERROR, "error parsing sequence header");
2148 if (CALC_PADDING((int64_t)dsh->width, MAX_DWT_LEVELS) * CALC_PADDING((int64_t)dsh->height, MAX_DWT_LEVELS) * 5LL > avctx->max_pixels)
2151 ret = ff_set_dimensions(avctx, dsh->width, dsh->height);
2157 ff_set_sar(avctx, dsh->sample_aspect_ratio);
2158 avctx->pix_fmt = dsh->pix_fmt;
2159 avctx->color_range = dsh->color_range;
2160 avctx->color_trc = dsh->color_trc;
2161 avctx->color_primaries = dsh->color_primaries;
2162 avctx->colorspace = dsh->colorspace;
2163 avctx->profile = dsh->profile;
2164 avctx->level = dsh->level;
2165 avctx->framerate = dsh->framerate;
2174 ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,
2199 av_log(avctx, AV_LOG_DEBUG, "Dropping frame without sequence header\n");
2208 av_log(avctx, AV_LOG_ERROR, "framelist full\n");
2217 av_log(avctx, AV_LOG_ERROR, "num_refs of 3\n");
2236 av_log(avctx, AV_LOG_ERROR, "Invalid low delay flag\n");
2240 if ((ret = get_buffer_with_edge(avctx, pic->avframe, (parse_code & 0x0C) == 0x0C ? AV_GET_BUFFER_FLAG_REF : 0)) < 0)
2263 static int dirac_decode_frame(AVCodecContext *avctx, AVFrame *picture,
2266 DiracContext *s = avctx->priv_data;
2303 av_log(s->avctx, AV_LOG_ERROR,
2310 ret = dirac_decode_data_unit(avctx, buf+buf_idx, data_unit_size);
2313 av_log(s->avctx, AV_LOG_ERROR,"Error in dirac_decode_data_unit\n");
2330 av_log(avctx, AV_LOG_ERROR, "Delay frame overflow\n");