Lines Matching defs:avctx
163 av_log(s->avctx, AV_LOG_ERROR, "luma_log2_weight_denom %d is invalid\n", luma_log2_weight_denom);
170 av_log(s->avctx, AV_LOG_ERROR, "chroma_log2_weight_denom %"PRId64" is invalid\n", chroma_log2_weight_denom);
326 AVCodecContext *avctx = s->avctx;
332 avctx->pix_fmt = sps->pix_fmt;
333 avctx->coded_width = sps->width;
334 avctx->coded_height = sps->height;
335 avctx->width = sps->width - ow->left_offset - ow->right_offset;
336 avctx->height = sps->height - ow->top_offset - ow->bottom_offset;
337 avctx->has_b_frames = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics;
338 avctx->profile = sps->ptl.general_ptl.profile_idc;
339 avctx->level = sps->ptl.general_ptl.level_idc;
341 ff_set_sar(avctx, sps->vui.sar);
344 avctx->color_range = sps->vui.video_full_range_flag ? AVCOL_RANGE_JPEG
347 avctx->color_range = AVCOL_RANGE_MPEG;
350 avctx->color_primaries = sps->vui.colour_primaries;
351 avctx->color_trc = sps->vui.transfer_characteristic;
352 avctx->colorspace = sps->vui.matrix_coeffs;
354 avctx->color_primaries = AVCOL_PRI_UNSPECIFIED;
355 avctx->color_trc = AVCOL_TRC_UNSPECIFIED;
356 avctx->colorspace = AVCOL_SPC_UNSPECIFIED;
359 avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
363 avctx->chroma_sample_location = sps->vui.chroma_sample_loc_type_top_field + 1;
365 avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
377 av_reduce(&avctx->framerate.den, &avctx->framerate.num,
383 AVCodecContext *avctx = s->avctx;
386 s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
391 avctx->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;
395 avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
492 return ff_thread_get_format(s->avctx, pix_fmts);
513 s->avctx->pix_fmt = pix_fmt;
524 if (sps->sao_enabled && !s->avctx->hwaccel) {
567 av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n");
583 av_log(s->avctx, AV_LOG_ERROR, "PPS id out of range: %d\n", sh->pps_id);
588 av_log(s->avctx, AV_LOG_ERROR, "PPS changed between slices.\n");
615 s->avctx->pix_fmt = pix_fmt;
632 av_log(s->avctx, AV_LOG_ERROR, "Independent slice segment missing.\n");
640 av_log(s->avctx, AV_LOG_ERROR,
666 av_log(s->avctx, AV_LOG_ERROR, "Unknown slice type: %d.\n",
671 av_log(s->avctx, AV_LOG_ERROR, "Inter slices in an IRAP frame.\n");
689 av_log(s->avctx, AV_LOG_WARNING,
691 if (s->avctx->err_recognition & AV_EF_EXPLODE)
700 ret = ff_hevc_decode_short_term_rps(gb, s->avctx, &sh->slice_rps, s->ps.sps, 1);
709 av_log(s->avctx, AV_LOG_ERROR, "No ref lists in the SPS.\n");
722 av_log(s->avctx, AV_LOG_WARNING, "Invalid long term RPS.\n");
723 if (s->avctx->err_recognition & AV_EF_EXPLODE)
774 av_log(s->avctx, AV_LOG_ERROR, "Too many refs: %d/%d.\n",
783 av_log(s->avctx, AV_LOG_ERROR, "Zero refs for a frame with P or B slices.\n");
819 av_log(s->avctx, AV_LOG_ERROR,
836 av_log(s->avctx, AV_LOG_ERROR,
850 av_log(s->avctx, AV_LOG_ERROR, "Invalid slice cx qp offset.\n");
876 av_log(s->avctx, AV_LOG_ERROR,
910 av_log(s->avctx, AV_LOG_ERROR, "num_entry_point_offsets %d is invalid\n", num_entry_point_offsets);
920 av_log(s->avctx, AV_LOG_ERROR, "offset_len %d is invalid\n", offset_len);
932 av_log(s->avctx, AV_LOG_ERROR, "Failed to allocate memory\n");
951 av_log(s->avctx, AV_LOG_ERROR, "too many slice_header_extension_data_bytes\n");
962 av_log(s->avctx, AV_LOG_ERROR,
973 av_log(s->avctx, AV_LOG_ERROR, "Impossible slice segment.\n");
978 av_log(s->avctx, AV_LOG_ERROR,
1132 av_log(s->avctx, AV_LOG_ERROR,
1151 av_log(s->avctx, AV_LOG_ERROR,
2487 av_log(s->avctx, AV_LOG_ERROR, "Impossible initial tile.\n");
2494 av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment missing\n");
2545 s->avctx->execute(s->avctx, hls_decode_entry, arg, ret , 1, sizeof(int));
2577 ff_thread_await_progress2(s->avctx, ctb_row, thread, SHIFT_CTB_WPP);
2580 ff_thread_report_progress2(s->avctx, ctb_row , thread, SHIFT_CTB_WPP);
2598 ff_thread_report_progress2(s->avctx, ctb_row, thread, 1);
2603 ff_thread_report_progress2(s->avctx, ctb_row ,thread, SHIFT_CTB_WPP);
2609 ff_thread_report_progress2(s->avctx, ctb_row , thread, SHIFT_CTB_WPP);
2619 ff_thread_report_progress2(s->avctx, ctb_row ,thread, SHIFT_CTB_WPP);
2625 ff_thread_report_progress2(s->avctx, ctb_row ,thread, SHIFT_CTB_WPP);
2647 av_log(s->avctx, AV_LOG_ERROR, "WPP ctb addresses are wrong (%d %d %d %d)\n",
2655 ff_alloc_entries(s->avctx, s->sh.num_entry_point_offsets + 1);
2697 av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset table is corrupted\n");
2715 ff_reset_entries(s->avctx);
2723 s->avctx->execute2(s->avctx, hls_decode_entry_wpp, arg, ret, s->sh.num_entry_point_offsets + 1);
2835 av_log(s->avctx, AV_LOG_DEBUG, "Mastering Display Metadata:\n");
2836 av_log(s->avctx, AV_LOG_DEBUG,
2845 av_log(s->avctx, AV_LOG_DEBUG,
2863 av_log(s->avctx, AV_LOG_DEBUG, "Content Light Level Metadata:\n");
2864 av_log(s->avctx, AV_LOG_DEBUG, "MaxCLL=%d, MaxFALL=%d\n",
2909 tc_sd[i + 1] = av_timecode_get_smpte(s->avctx->framerate, drop, hh, mm, ss, ff);
2910 av_timecode_make_smpte_tc_string2(tcbuf, s->avctx->framerate, tc_sd[i + 1], 0, 0);
3035 av_log(s->avctx, AV_LOG_ERROR, "Error constructing the frame RPS.\n");
3042 !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) &&
3043 !s->avctx->hwaccel;
3049 if ((ret = ff_thread_get_buffer(s->avctx, s->ref->frame_grain, 0)) < 0)
3067 if (!s->avctx->hwaccel)
3068 ff_thread_finish_setup(s->avctx);
3092 av_log(s->avctx, AV_LOG_WARNING, "Failed synthesizing film "
3113 if (s->avctx->hwaccel && s->avctx->hwaccel->decode_params) {
3114 ret = s->avctx->hwaccel->decode_params(s->avctx,
3121 ret = ff_hevc_decode_nal_vps(gb, s->avctx, &s->ps);
3126 if (s->avctx->hwaccel && s->avctx->hwaccel->decode_params) {
3127 ret = s->avctx->hwaccel->decode_params(s->avctx,
3134 ret = ff_hevc_decode_nal_sps(gb, s->avctx, &s->ps,
3140 if (s->avctx->hwaccel && s->avctx->hwaccel->decode_params) {
3141 ret = s->avctx->hwaccel->decode_params(s->avctx,
3148 ret = ff_hevc_decode_nal_pps(gb, s->avctx, &s->ps);
3154 if (s->avctx->hwaccel && s->avctx->hwaccel->decode_params) {
3155 ret = s->avctx->hwaccel->decode_params(s->avctx,
3162 ret = ff_hevc_decode_nal_sei(gb, s->avctx, &s->sei, &s->ps, s->nal_unit_type);
3195 (s->avctx->skip_frame >= AVDISCARD_BIDIR && s->sh.slice_type == HEVC_SLICE_B) ||
3196 (s->avctx->skip_frame >= AVDISCARD_NONINTRA && s->sh.slice_type != HEVC_SLICE_I) ||
3197 (s->avctx->skip_frame >= AVDISCARD_NONKEY && !IS_IRAP(s))) {
3225 av_log(s->avctx, AV_LOG_ERROR, "First slice in a frame missing.\n");
3230 av_log(s->avctx, AV_LOG_ERROR,
3240 av_log(s->avctx, AV_LOG_WARNING,
3246 if (s->sh.first_slice_in_pic_flag && s->avctx->hwaccel) {
3247 ret = s->avctx->hwaccel->start_frame(s->avctx, NULL, 0);
3252 if (s->avctx->hwaccel) {
3253 ret = s->avctx->hwaccel->decode_slice(s->avctx, nal->raw_data, nal->raw_size);
3284 av_log(s->avctx, AV_LOG_INFO,
3290 if (s->avctx->err_recognition & AV_EF_EXPLODE)
3307 ret = ff_h2645_packet_split(&s->pkt, buf, length, s->avctx, s->is_nalff,
3308 s->nal_length_size, s->avctx->codec_id, 1, 0);
3310 av_log(s->avctx, AV_LOG_ERROR,
3342 av_log(s->avctx, AV_LOG_WARNING, "Multiple Dolby Vision RPUs found in one AU. Skipping previous.\n");
3353 av_log(s->avctx, AV_LOG_WARNING, "Error parsing DOVI NAL unit.\n");
3362 if (s->avctx->skip_frame >= AVDISCARD_ALL ||
3363 (s->avctx->skip_frame >= AVDISCARD_NONREF
3371 av_log(s->avctx, AV_LOG_WARNING,
3402 av_log(s->avctx, AV_LOG_DEBUG, "Verifying checksum for frame with POC %d: ",
3418 int width = s->avctx->coded_width;
3419 int height = s->avctx->coded_height;
3439 av_log (s->avctx, AV_LOG_DEBUG, "plane %d - correct ", i);
3440 print_md5(s->avctx, AV_LOG_DEBUG, md5);
3441 av_log (s->avctx, AV_LOG_DEBUG, "; ");
3443 av_log (s->avctx, AV_LOG_ERROR, "mismatching checksum of plane %d - ", i);
3444 print_md5(s->avctx, AV_LOG_ERROR, md5);
3445 av_log (s->avctx, AV_LOG_ERROR, " != ");
3446 print_md5(s->avctx, AV_LOG_ERROR, s->sei.picture_hash.md5[i]);
3447 av_log (s->avctx, AV_LOG_ERROR, "\n");
3452 av_log(s->avctx, AV_LOG_DEBUG, "\n");
3462 &s->nal_length_size, s->avctx->err_recognition,
3463 s->apply_defdispwin, s->avctx);
3484 static int hevc_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
3490 HEVCContext *s = avctx->priv_data;
3517 if (avctx->hwaccel) {
3518 if (s->ref && (ret = avctx->hwaccel->end_frame(avctx)) < 0) {
3519 av_log(avctx, AV_LOG_ERROR,
3526 if (avctx->err_recognition & AV_EF_CRCCHECK && s->ref && s->is_decoded &&
3529 if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) {
3538 av_log(avctx, AV_LOG_DEBUG, "Decoded frame with POC %d.\n", s->poc);
3597 static av_cold int hevc_decode_free(AVCodecContext *avctx)
3599 HEVCContext *s = avctx->priv_data;
3646 static av_cold int hevc_init_context(AVCodecContext *avctx)
3648 HEVCContext *s = avctx->priv_data;
3651 s->avctx = avctx;
3688 s->dovi_ctx.logctx = avctx;
3808 static av_cold int hevc_decode_init(AVCodecContext *avctx)
3810 HEVCContext *s = avctx->priv_data;
3813 if (avctx->active_thread_type & FF_THREAD_SLICE) {
3814 s->threads_number = avctx->thread_count;
3815 ret = ff_slice_thread_init_progress(avctx);
3821 if((avctx->active_thread_type & FF_THREAD_FRAME) && avctx->thread_count > 1)
3826 ret = hevc_init_context(avctx);
3836 if (!avctx->internal->is_copy) {
3837 if (avctx->extradata_size > 0 && avctx->extradata) {
3838 ret = hevc_decode_extradata(s, avctx->extradata, avctx->extradata_size, 1);
3848 static void hevc_decode_flush(AVCodecContext *avctx)
3850 HEVCContext *s = avctx->priv_data;