Lines Matching defs:avctx

93             av_log(s->avctx, AV_LOG_ERROR, "chroma dc error\n");
113 av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
117 ff_dlog(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
120 avpriv_request_sample(s->avctx, "PB-frame");
126 av_log(s->avctx, AV_LOG_ERROR, "Invalid qscale value: 0\n");
136 ff_dlog(s->avctx, "DC:%d %d %d\n", s->last_dc[0],
180 av_log(s->avctx, AV_LOG_ERROR, "unknown frame type\n");
185 av_log(s->avctx, AV_LOG_ERROR, "low delay B\n");
189 av_log(s->avctx, AV_LOG_ERROR, "early B-frame\n");
194 av_log(s->avctx, AV_LOG_ERROR, "reserved bit set\n");
200 av_log(s->avctx, AV_LOG_ERROR, "Invalid qscale value: 0\n");
205 s->loop_filter = get_bits1(&s->gb) && !s->avctx->lowres;
212 rpr_max = s->avctx->extradata[1] & 7;
220 if (s->avctx->extradata_size < 8 + 2 * f) {
221 av_log(s->avctx, AV_LOG_ERROR, "Extradata too small.\n");
225 new_w = 4 * ((uint8_t *) s->avctx->extradata)[6 + 2 * f];
226 new_h = 4 * ((uint8_t *) s->avctx->extradata)[7 + 2 * f];
232 AVRational old_aspect = s->avctx->sample_aspect_ratio;
233 av_log(s->avctx, AV_LOG_DEBUG,
235 if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0)
247 s->avctx->sample_aspect_ratio = av_mul_q(old_aspect, (AVRational){2, 1});
249 s->avctx->sample_aspect_ratio = av_mul_q(old_aspect, (AVRational){1, 2});
251 ret = ff_set_dimensions(s->avctx, new_w, new_h);
261 if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
262 av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d/%d\n", f, rpr_bits, rpr_max);
265 if (av_image_check_size(s->width, s->height, 0, s->avctx) < 0)
288 av_log(s->avctx, AV_LOG_DEBUG,
305 if (!s->avctx->lowres)
308 if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
309 av_log(s->avctx, AV_LOG_INFO,
367 static av_cold int rv10_decode_init(AVCodecContext *avctx)
370 RVDecContext *rv = avctx->priv_data;
374 if (avctx->extradata_size < 8) {
375 av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
378 if ((ret = av_image_check_size(avctx->coded_width,
379 avctx->coded_height, 0, avctx)) < 0)
382 ff_mpv_decode_init(s, avctx);
387 s->width = avctx->coded_width;
389 s->height = avctx->coded_height;
391 s->h263_long_vectors = ((uint8_t *) avctx->extradata)[3] & 1;
392 rv->sub_id = AV_RB32((uint8_t *) avctx->extradata + 4);
407 s->avctx->has_b_frames = 1;
411 av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", rv->sub_id);
412 avpriv_request_sample(avctx, "RV1/2 version");
416 if (avctx->debug & FF_DEBUG_PICT_INFO) {
417 av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%"PRIX32"\n", rv->sub_id,
418 ((uint32_t *) avctx->extradata)[0]);
421 avctx->pix_fmt = AV_PIX_FMT_YUV420P;
435 static av_cold int rv10_decode_end(AVCodecContext *avctx)
437 MpegEncContext *s = avctx->priv_data;
443 static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf,
446 RVDecContext *rv = avctx->priv_data;
458 av_log(s->avctx, AV_LOG_ERROR, "HEADER ERROR\n");
464 av_log(s->avctx, AV_LOG_ERROR, "POS ERROR %d %d\n", s->mb_x, s->mb_y);
470 av_log(s->avctx, AV_LOG_ERROR, "COUNT ERROR\n");
484 if ((ret = ff_mpv_frame_start(s, avctx)) < 0)
489 av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
495 ff_dlog(avctx, "qscale=%d\n", s->qscale);
535 ff_tlog(avctx, "**mb x=%d y=%d\n", s->mb_x, s->mb_y);
555 av_log(avctx, AV_LOG_DEBUG, "update size from %d to %d\n",
561 av_log(s->avctx, AV_LOG_ERROR, "ERROR at MB %d %d\n", s->mb_x,
588 static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n)
590 if (avctx->slice_count)
591 return avctx->slice_offset[n];
596 static int rv10_decode_frame(AVCodecContext *avctx, AVFrame *pict,
601 MpegEncContext *s = avctx->priv_data;
606 ff_dlog(avctx, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
613 if (!avctx->slice_count) {
618 av_log(avctx, AV_LOG_ERROR, "Invalid slice count: %d.\n",
627 slice_count = avctx->slice_count;
630 unsigned offset = get_slice_offset(avctx, slices_hdr, i);
639 size = get_slice_offset(avctx, slices_hdr, i + 1) - offset;
644 size2 = get_slice_offset(avctx, slices_hdr, i + 2) - offset;
650 if ((ret = rv10_decode_packet(avctx, buf + offset, size, size2, buf_size)) < 0)