MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / frame_start

Function frame_start

libavcodec/vvc/dec.c:800–842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800static int frame_start(VVCContext *s, VVCFrameContext *fc, SliceContext *sc)
801{
802 const VVCPH *ph = &fc->ps.ph;
803 const H266RawSliceHeader *rsh = sc->sh.r;
804 int ret;
805
806 // 8.3.1 Decoding process for picture order count
807 if (!s->temporal_id && !ph->r->ph_non_ref_pic_flag && !(IS_RASL(s) || IS_RADL(s)))
808 s->poc_tid0 = ph->poc;
809
810 decode_prefix_sei(fc, s);
811
812 if ((ret = ff_vvc_set_new_ref(s, fc, &fc->frame)) < 0)
813 goto fail;
814
815 ret = set_side_data(s, fc);
816 if (ret < 0)
817 goto fail;
818
819 ret = check_film_grain(s, fc);
820 if (ret < 0)
821 goto fail;
822
823 if (!IS_IDR(s))
824 ff_vvc_bump_frame(s, fc);
825
826 av_frame_unref(fc->output_frame);
827
828 if ((ret = ff_vvc_output_frame(s, fc, fc->output_frame,rsh->sh_no_output_of_prior_pics_flag, 0)) < 0)
829 goto fail;
830
831 if ((ret = ff_vvc_frame_rpl(s, fc, sc)) < 0)
832 goto fail;
833
834 if ((ret = ff_vvc_frame_thread_init(fc)) < 0)
835 goto fail;
836 return 0;
837fail:
838 if (fc->ref)
839 ff_vvc_unref_frame(fc, fc->ref, ~0);
840 fc->ref = NULL;
841 return ret;
842}
843
844static int slice_start(SliceContext *sc, VVCContext *s, VVCFrameContext *fc,
845 const CodedBitstreamUnit *unit, const int is_first_slice)

Callers 1

slice_startFunction · 0.70

Calls 10

decode_prefix_seiFunction · 0.85
ff_vvc_set_new_refFunction · 0.85
check_film_grainFunction · 0.85
ff_vvc_bump_frameFunction · 0.85
av_frame_unrefFunction · 0.85
ff_vvc_output_frameFunction · 0.85
ff_vvc_frame_rplFunction · 0.85
ff_vvc_frame_thread_initFunction · 0.85
ff_vvc_unref_frameFunction · 0.85
set_side_dataFunction · 0.70

Tested by

no test coverage detected