• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:avctx

46 static av_cold int decode_init(AVCodecContext *avctx)
48 ProresContext *ctx = avctx->priv_data;
51 avctx->bits_per_raw_sample = 10;
53 ff_dsputil_init(&ctx->dsp, avctx);
54 ff_blockdsp_init(&ctx->bdsp, avctx);
55 ff_proresdsp_init(&ctx->prodsp, avctx);
67 const int data_size, AVCodecContext *avctx)
74 av_dlog(avctx, "header size %d\n", hdr_size);
76 av_log(avctx, AV_LOG_ERROR, "error, wrong header size\n");
81 av_dlog(avctx, "%.4s version %d\n", buf+4, version);
83 av_log(avctx, AV_LOG_ERROR, "unsupported version: %d\n", version);
89 if (width != avctx->width || height != avctx->height) {
90 av_log(avctx, AV_LOG_ERROR, "picture resolution change: %dx%d -> %dx%d\n",
91 avctx->width, avctx->height, width, height);
99 av_log(avctx, AV_LOG_ERROR, "Invalid alpha mode %d\n", ctx->alpha_info);
102 if (avctx->skip_alpha) ctx->alpha_info = 0;
104 av_dlog(avctx, "frame type %d\n", ctx->frame_type);
115 avctx->pix_fmt = (buf[12] & 0xC0) == 0xC0 ? AV_PIX_FMT_YUVA444P10 : AV_PIX_FMT_YUVA422P10;
117 avctx->pix_fmt = (buf[12] & 0xC0) == 0xC0 ? AV_PIX_FMT_YUV444P10 : AV_PIX_FMT_YUV422P10;
122 av_dlog(avctx, "flags %x\n", flags);
126 av_log(avctx, AV_LOG_ERROR, "Header truncated\n");
137 av_log(avctx, AV_LOG_ERROR, "Header truncated\n");
148 static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, const int buf_size)
150 ProresContext *ctx = avctx->priv_data;
159 av_log(avctx, AV_LOG_ERROR, "error, wrong picture header size\n");
165 av_log(avctx, AV_LOG_ERROR, "error, wrong picture data size\n");
172 av_log(avctx, AV_LOG_ERROR, "unsupported slice resolution: %dx%d\n",
177 ctx->mb_width = (avctx->width + 15) >> 4;
179 ctx->mb_height = (avctx->height + 31) >> 5;
181 ctx->mb_height = (avctx->height + 15) >> 4;
197 av_log(avctx, AV_LOG_ERROR, "error, wrong slice count\n");
224 av_log(avctx, AV_LOG_ERROR, "error, wrong slice data size\n");
235 av_log(avctx, AV_LOG_ERROR, "error, slice out of bounds\n");
241 av_log(avctx, AV_LOG_ERROR, "error wrong mb count y %d h %d\n",
315 static av_always_inline int decode_ac_coeffs(AVCodecContext *avctx, GetBitContext *gb,
318 ProresContext *ctx = avctx->priv_data;
340 av_log(avctx, AV_LOG_ERROR, "ac tex damaged %d, %d\n", pos, max_coeffs);
358 static int decode_slice_luma(AVCodecContext *avctx, SliceContext *slice,
363 ProresContext *ctx = avctx->priv_data;
376 if ((ret = decode_ac_coeffs(avctx, &gb, blocks, blocks_per_slice)) < 0)
391 static int decode_slice_chroma(AVCodecContext *avctx, SliceContext *slice,
396 ProresContext *ctx = avctx->priv_data;
409 if ((ret = decode_ac_coeffs(avctx, &gb, blocks, blocks_per_slice)) < 0)
501 static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int threadnr)
503 ProresContext *ctx = avctx->priv_data;
517 //av_log(avctx, AV_LOG_INFO, "slice %d mb width %d mb x %d y %d\n",
533 av_log(avctx, AV_LOG_ERROR, "invalid plane data size\n");
552 if (avctx->pix_fmt == AV_PIX_FMT_YUV444P10 || avctx->pix_fmt == AV_PIX_FMT_YUVA444P10) {
572 ret = decode_slice_luma(avctx, slice, (uint16_t*)dest_y, luma_stride,
577 if (!(avctx->flags & CODEC_FLAG_GRAY)) {
578 ret = decode_slice_chroma(avctx, slice, (uint16_t*)dest_u, chroma_stride,
584 ret = decode_slice_chroma(avctx, slice, (uint16_t*)dest_v, chroma_stride,
600 static int decode_picture(AVCodecContext *avctx)
602 ProresContext *ctx = avctx->priv_data;
605 avctx->execute2(avctx, decode_slice_thread, NULL, NULL, ctx->slice_count);
614 static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
617 ProresContext *ctx = avctx->priv_data;
624 av_log(avctx, AV_LOG_ERROR, "invalid frame header\n");
636 frame_hdr_size = decode_frame_header(ctx, buf, buf_size, avctx);
643 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
647 pic_size = decode_picture_header(avctx, buf, buf_size);
649 av_log(avctx, AV_LOG_ERROR, "error decoding picture header\n");
653 if ((ret = decode_picture(avctx)) < 0) {
654 av_log(avctx, AV_LOG_ERROR, "error decoding picture\n");
671 static av_cold int decode_close(AVCodecContext *avctx)
673 ProresContext *ctx = avctx->priv_data;