• 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

132             av_log(ctx->avctx, AV_LOG_ERROR, "ac-tex damaged at %d %d\n",     \
157 av_dlog(s->avctx, "dc=%d diff=%d\n", dc, diff);
569 av_dlog(s->avctx, "dc=%d\n", block[0]);
735 av_dlog(s->avctx, "decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y);
753 av_log(s->avctx, AV_LOG_ERROR, "skip with previntra\n");
771 av_log(s->avctx, AV_LOG_ERROR,
784 av_log(s->avctx, AV_LOG_ERROR,
793 av_log(s->avctx, AV_LOG_ERROR,
800 av_dlog(s->avctx, "mb_type=%x\n", mb_type);
897 av_dlog(s->avctx, "motion_type=%d\n", motion_type);
954 av_dlog(s->avctx, "fmx=%d\n", val);
959 av_dlog(s->avctx, "fmy=%d\n", val);
982 av_log(s->avctx, AV_LOG_ERROR, "MT_DMV in progressive_sequence\n");
1035 av_log(s->avctx, AV_LOG_ERROR,
1052 av_log(s->avctx, AV_LOG_ERROR,
1115 static av_cold int mpeg_decode_init(AVCodecContext *avctx)
1117 Mpeg1Context *s = avctx->priv_data;
1128 s->mpeg_enc_ctx.avctx = avctx;
1129 s->mpeg_enc_ctx.flags = avctx->flags;
1130 s->mpeg_enc_ctx.flags2 = avctx->flags2;
1137 s->mpeg_enc_ctx.codec_id = avctx->codec->id;
1138 avctx->color_range = AVCOL_RANGE_MPEG;
1139 if (avctx->codec->id == AV_CODEC_ID_MPEG1VIDEO)
1140 avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
1142 avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
1146 static int mpeg_decode_update_thread_context(AVCodecContext *avctx,
1149 Mpeg1Context *ctx = avctx->priv_data, *ctx_from = avctx_from->priv_data;
1153 if (avctx == avctx_from ||
1158 err = ff_mpeg_update_thread_context(avctx, avctx_from);
1213 static inline int uses_vdpau(AVCodecContext *avctx) {
1214 return avctx->pix_fmt == AV_PIX_FMT_VDPAU_MPEG1 || avctx->pix_fmt == AV_PIX_FMT_VDPAU_MPEG2;
1217 static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
1219 Mpeg1Context *s1 = avctx->priv_data;
1223 return ff_thread_get_format(avctx,
1224 avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO ?
1233 static void setup_hwaccel_for_pixfmt(AVCodecContext *avctx)
1236 if (avctx->hwaccel || uses_vdpau(avctx))
1237 if (avctx->idct_algo == FF_IDCT_AUTO)
1238 avctx->idct_algo = FF_IDCT_SIMPLE;
1240 if (avctx->hwaccel && avctx->pix_fmt == AV_PIX_FMT_XVMC) {
1241 Mpeg1Context *s1 = avctx->priv_data;
1246 avctx->xvmc_acceleration = 2;
1253 static int mpeg_decode_postinit(AVCodecContext *avctx)
1255 Mpeg1Context *s1 = avctx->priv_data;
1261 avctx->coded_width != s->width ||
1262 avctx->coded_height != s->height ||
1279 ret = ff_set_dimensions(avctx, s->width, s->height);
1283 if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->bit_rate) {
1284 avctx->rc_max_rate = s->bit_rate;
1285 } else if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && s->bit_rate &&
1287 avctx->bit_rate = s->bit_rate;
1296 avctx->has_b_frames = !s->low_delay;
1298 if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
1300 avctx->time_base.den = ff_mpeg12_frame_rate_tab[s->frame_rate_index].num;
1301 avctx->time_base.num = ff_mpeg12_frame_rate_tab[s->frame_rate_index].den;
1303 avctx->sample_aspect_ratio = av_d2q(1.0 / ff_mpeg1_aspect[s->aspect_ratio_info], 255);
1304 avctx->ticks_per_frame = 1;
1307 av_reduce(&s->avctx->time_base.den,
1308 &s->avctx->time_base.num,
1312 avctx->ticks_per_frame = 2;
1328 s->avctx->sample_aspect_ratio =
1332 s->avctx->sample_aspect_ratio =
1338 // s->avctx->sample_aspect_ratio = av_mul_q(s->avctx->sample_aspect_ratio, (AVRational) {s->width, s->height});
1339 av_dlog(avctx, "A %d/%d\n",
1342 av_dlog(avctx, "B %d/%d\n", s->avctx->sample_aspect_ratio.num,
1343 s->avctx->sample_aspect_ratio.den);
1346 s->avctx->sample_aspect_ratio =
1351 ff_set_sar(s->avctx, s->avctx->sample_aspect_ratio);
1353 avctx->pix_fmt = mpeg_get_pixelformat(avctx);
1354 setup_hwaccel_for_pixfmt(avctx);
1373 static int mpeg1_decode_picture(AVCodecContext *avctx, const uint8_t *buf,
1376 Mpeg1Context *s1 = avctx->priv_data;
1393 if (f_code == 0 && (avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)))
1402 if (f_code == 0 && (avctx->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT)))
1411 if (avctx->debug & FF_DEBUG_PICT_INFO)
1412 av_log(avctx, AV_LOG_DEBUG,
1427 s->avctx->profile = get_bits(&s->gb, 3);
1428 s->avctx->level = get_bits(&s->gb, 4);
1438 s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10;
1447 av_dlog(s->avctx, "sequence extension\n");
1448 s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
1450 if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1451 av_log(s->avctx, AV_LOG_DEBUG,
1453 s->avctx->profile, s->avctx->level, s->progressive_sequence, s->chroma_format,
1454 s->avctx->rc_buffer_size, s->bit_rate);
1465 s->avctx->color_primaries = get_bits(&s->gb, 8);
1466 s->avctx->color_trc = get_bits(&s->gb, 8);
1467 s->avctx->colorspace = get_bits(&s->gb, 8);
1477 if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1478 av_log(s->avctx, AV_LOG_DEBUG, "sde w:%d, h:%d\n", w, h);
1507 if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1508 av_log(s->avctx, AV_LOG_DEBUG,
1524 av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n");
1528 av_log(s->avctx, AV_LOG_DEBUG, "intra matrix specifies invalid DC quantizer %d, ignoring\n", v);
1540 av_dlog(s->avctx, "matrix extension\n");
1562 av_log(s->avctx, AV_LOG_ERROR,
1600 av_dlog(s->avctx, "intra_dc_precision=%d\n", s->intra_dc_precision);
1601 av_dlog(s->avctx, "picture_structure=%d\n", s->picture_structure);
1602 av_dlog(s->avctx, "top field first=%d\n", s->top_field_first);
1603 av_dlog(s->avctx, "repeat first field=%d\n", s->repeat_first_field);
1604 av_dlog(s->avctx, "conceal=%d\n", s->concealment_motion_vectors);
1605 av_dlog(s->avctx, "intra_vlc_format=%d\n", s->intra_vlc_format);
1606 av_dlog(s->avctx, "alternate_scan=%d\n", s->alternate_scan);
1607 av_dlog(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct);
1608 av_dlog(s->avctx, "progressive_frame=%d\n", s->progressive_frame);
1613 AVCodecContext *avctx = s->avctx;
1620 if (ff_MPV_frame_start(s, avctx) < 0)
1662 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME))
1663 ff_thread_finish_setup(avctx);
1668 av_log(s->avctx, AV_LOG_ERROR, "first field missing\n");
1672 if (s->avctx->hwaccel &&
1673 (s->avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) {
1674 if (s->avctx->hwaccel->end_frame(s->avctx) < 0)
1675 av_log(avctx, AV_LOG_ERROR,
1687 if (avctx->hwaccel) {
1688 if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0)
1707 AVCodecContext *avctx = s->avctx;
1708 const int lowres = s->avctx->lowres;
1726 av_log(s->avctx, AV_LOG_ERROR, "qscale == 0\n");
1743 av_log(s->avctx, AV_LOG_ERROR, "first mb_incr damaged\n");
1758 av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n");
1762 if (avctx->hwaccel && avctx->hwaccel->decode_slice) {
1769 if (avctx->hwaccel->decode_slice(avctx, buf_start, buf_end - buf_start) < 0)
1781 if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
1782 av_log(s->avctx, AV_LOG_DEBUG,
1851 const int mb_size = 16 >> s->avctx->lowres;
1863 avctx->profile == 0 && avctx->level == 5 &&
1873 av_log(avctx, AV_LOG_DEBUG, "Invalid MXF data found in video stream\n");
1880 ((avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) && left > 8)) {
1881 av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n",
1907 av_log(s->avctx, AV_LOG_ERROR, "mb incr damaged\n");
1915 av_log(s->avctx, AV_LOG_ERROR, "slice mismatch\n");
1929 av_log(s->avctx, AV_LOG_ERROR,
2018 static int slice_end(AVCodecContext *avctx, AVFrame *pict)
2020 Mpeg1Context *s1 = avctx->priv_data;
2026 if (s->avctx->hwaccel) {
2027 if (s->avctx->hwaccel->end_frame(s->avctx) < 0)
2028 av_log(avctx, AV_LOG_ERROR,
2047 if (avctx->active_thread_type & FF_THREAD_FRAME)
2066 static int mpeg1_decode_sequence(AVCodecContext *avctx,
2069 Mpeg1Context *s1 = avctx->priv_data;
2079 av_log(avctx, AV_LOG_WARNING,
2081 if (avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_COMPLIANT))
2086 av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n");
2087 if (avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_COMPLIANT))
2099 s->avctx->rc_buffer_size = get_bits(&s->gb, 10) * 1024 * 16;
2125 av_log(s->avctx, AV_LOG_ERROR, "sequence header damaged\n");
2137 s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
2143 if (s->avctx->debug & FF_DEBUG_PICT_INFO)
2144 av_log(s->avctx, AV_LOG_DEBUG, "vbv buffer: %d, bitrate:%d\n",
2145 s->avctx->rc_buffer_size, s->bit_rate);
2150 static int vcr2_init_sequence(AVCodecContext *avctx)
2152 Mpeg1Context *s1 = avctx->priv_data;
2162 s->width = avctx->coded_width;
2163 s->height = avctx->coded_height;
2164 avctx->has_b_frames = 0; // true?
2167 avctx->pix_fmt = mpeg_get_pixelformat(avctx);
2168 setup_hwaccel_for_pixfmt(avctx);
2192 s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
2195 s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
2203 static int mpeg_decode_a53_cc(AVCodecContext *avctx,
2206 Mpeg1Context *s1 = avctx->priv_data;
2256 static void mpeg_decode_user_data(AVCodecContext *avctx,
2259 Mpeg1Context *s = avctx->priv_data;
2270 av_log(avctx, AV_LOG_ERROR, "%c", p[i]);
2272 av_log(avctx, AV_LOG_ERROR, "\n");*/
2287 avctx->dtg_active_format = p[0] & 0x0f;
2299 Mpeg1Context *s1 = avctx->priv_data;
2318 } else if (mpeg_decode_a53_cc(avctx, p, buf_size)) {
2323 static void mpeg_decode_gop(AVCodecContext *avctx,
2326 Mpeg1Context *s1 = avctx->priv_data;
2333 tc = avctx->timecode_frame_start = get_bits(&s->gb, 25);
2341 if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
2344 av_log(s->avctx, AV_LOG_DEBUG,
2350 static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
2353 Mpeg1Context *s = avctx->priv_data;
2368 (avctx->active_thread_type & FF_THREAD_SLICE) &&
2369 !avctx->hwaccel) {
2371 av_assert0(avctx->thread_count > 1);
2373 avctx->execute(avctx, slice_decode_thread,
2381 && uses_vdpau(avctx))
2384 ret = slice_end(avctx, picture);
2395 if (avctx->err_recognition & AV_EF_EXPLODE && s2->er.error_count)
2403 if (avctx->debug & FF_DEBUG_STARTCODE)
2404 av_log(avctx, AV_LOG_DEBUG, "%3"PRIX32" at %"PTRDIFF_SPECIFIER" left %d\n",
2411 mpeg1_decode_sequence(avctx, buf_ptr, input_size);
2412 if (buf != avctx->extradata)
2415 av_log(avctx, AV_LOG_ERROR,
2417 if (avctx->err_recognition & AV_EF_EXPLODE)
2426 av_log(avctx, AV_LOG_WARNING, "ignoring extra picture following a frame-picture\n");
2432 av_log(avctx, AV_LOG_ERROR, "Invalid frame dimensions %dx%d.\n",
2441 if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_SLICE) &&
2442 !avctx->hwaccel && s->slice_count) {
2445 avctx->execute(avctx, slice_decode_thread,
2453 ret = mpeg_decode_postinit(avctx);
2455 av_log(avctx, AV_LOG_ERROR,
2461 if (mpeg1_decode_picture(avctx, buf_ptr, input_size) < 0)
2466 av_log(avctx, AV_LOG_ERROR,
2468 if (avctx->err_recognition & AV_EF_EXPLODE)
2480 av_log(avctx, AV_LOG_ERROR,
2482 if (avctx->err_recognition & AV_EF_EXPLODE)
2499 av_log(avctx, AV_LOG_ERROR,
2501 if (avctx->err_recognition & AV_EF_EXPLODE)
2508 mpeg_decode_user_data(avctx, buf_ptr, input_size);
2513 mpeg_decode_gop(avctx, buf_ptr, input_size);
2516 av_log(avctx, AV_LOG_ERROR,
2518 if (avctx->err_recognition & AV_EF_EXPLODE)
2527 av_log(s2->avctx, AV_LOG_ERROR,
2533 av_log(s2->avctx, AV_LOG_ERROR,
2540 av_log(s2->avctx, AV_LOG_WARNING, "invalid frame_pred_frame_dct\n");
2564 av_log(s2->avctx, AV_LOG_ERROR, "slice too small\n");
2569 av_log(s2->avctx, AV_LOG_ERROR,
2594 if ((avctx->skip_frame >= AVDISCARD_NONREF &&
2596 (avctx->skip_frame >= AVDISCARD_NONKEY &&
2598 avctx->skip_frame >= AVDISCARD_ALL) {
2607 if (mb_y < avctx->skip_top ||
2608 mb_y >= s2->mb_height - avctx->skip_bottom)
2613 av_log(avctx, AV_LOG_ERROR, "Missing picture start code\n");
2614 if (avctx->err_recognition & AV_EF_EXPLODE)
2626 av_log(avctx, AV_LOG_ERROR,
2631 if (uses_vdpau(avctx)) {
2637 (avctx->active_thread_type & FF_THREAD_SLICE) &&
2638 !avctx->hwaccel) {
2642 av_assert0(avctx->thread_count > 1);
2663 if (avctx->err_recognition & AV_EF_EXPLODE)
2681 static int mpeg_decode_frame(AVCodecContext *avctx, void *data,
2687 Mpeg1Context *s = avctx->priv_data;
2714 s2->codec_tag = avpriv_toupper4(avctx->codec_tag);
2718 vcr2_init_sequence(avctx);
2722 if (avctx->extradata && !s->extradata_decoded) {
2723 ret = decode_chunks(avctx, picture, got_output,
2724 avctx->extradata, avctx->extradata_size);
2726 av_log(avctx, AV_LOG_ERROR, "picture in extradata\n");
2730 if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE)) {
2736 ret = decode_chunks(avctx, picture, got_output, buf, buf_size);
2743 static void flush(AVCodecContext *avctx)
2745 Mpeg1Context *s = avctx->priv_data;
2749 ff_mpeg_flush(avctx);
2752 static av_cold int mpeg_decode_end(AVCodecContext *avctx)
2754 Mpeg1Context *s = avctx->priv_data;
2825 static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx)
2827 if (avctx->active_thread_type & FF_THREAD_SLICE)
2829 if (!(avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
2831 if (!(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) {
2832 av_dlog(avctx, "mpeg12.c: XvMC decoder will work better if SLICE_FLAG_ALLOW_FIELD is set\n");
2834 mpeg_decode_init(avctx);
2836 avctx->pix_fmt = AV_PIX_FMT_XVMC_MPEG2_IDCT;
2837 avctx->xvmc_acceleration = 2; // 2 - the blocks are packed!