FFmpeg
refs.h
Go to the documentation of this file.
1 /*
2  * VVC reference management
3  *
4  * Copyright (C) 2023 Nuo Mi
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_VVC_REFS_H
24 #define AVCODEC_VVC_REFS_H
25 
26 #include "dec.h"
27 
28 int ff_vvc_output_frame(VVCContext *s, VVCFrameContext *fc, struct AVFrame *out, int no_output_of_prior_pics_flag, int flush);
31 const RefPicList *ff_vvc_get_ref_list(const VVCFrameContext *fc, const VVCFrame *ref, int x0, int y0);
37 
38 typedef enum VVCProgress {
42 } VVCProgress;
43 
46 
49  int y;
51  VVCProgressListener *next; //used by ff_vvc_add_progress_listener only
52 };
53 
57 
58 #endif // AVCODEC_VVC_REFS_H
VVC_PROGRESS_PIXEL
@ VVC_PROGRESS_PIXEL
Definition: refs.h:40
out
FILE * out
Definition: movenc.c:55
VVCProgressListener::vp
VVCProgress vp
Definition: refs.h:48
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:374
fc
#define fc(width, name, range_min, range_max)
Definition: cbs_av1.c:464
ff_vvc_clear_refs
void ff_vvc_clear_refs(VVCFrameContext *fc)
Definition: refs.c:77
ff_vvc_slice_rpl
int ff_vvc_slice_rpl(VVCContext *s, VVCFrameContext *fc, SliceContext *sc)
Definition: refs.c:417
RefPicList
Definition: hevcdec.h:189
VVCProgress
VVCProgress
Definition: refs.h:38
ff_vvc_report_progress
void ff_vvc_report_progress(VVCFrame *frame, VVCProgress vp, int y)
Definition: refs.c:535
s
#define s(width, name)
Definition: cbs_vp9.c:198
ff_vvc_set_new_ref
int ff_vvc_set_new_ref(VVCContext *s, VVCFrameContext *fc, struct AVFrame **frame)
Definition: refs.c:155
ff_vvc_unref_frame
void ff_vvc_unref_frame(VVCFrameContext *fc, VVCFrame *frame, int flags)
Definition: refs.c:46
ff_vvc_add_progress_listener
void ff_vvc_add_progress_listener(VVCFrame *frame, VVCProgressListener *l)
Definition: refs.c:555
flush
void(* flush)(AVBSFContext *ctx)
Definition: dts2pts.c:368
ff_vvc_get_ref_list
const RefPicList * ff_vvc_get_ref_list(const VVCFrameContext *fc, const VVCFrame *ref, int x0, int y0)
Definition: refs.c:67
ff_vvc_output_frame
int ff_vvc_output_frame(VVCContext *s, VVCFrameContext *fc, struct AVFrame *out, int no_output_of_prior_pics_flag, int flush)
Definition: refs.c:197
SliceContext
Definition: mss12.h:70
VVCProgressListener::y
int y
Definition: refs.h:49
VVC_PROGRESS_LAST
@ VVC_PROGRESS_LAST
Definition: refs.h:41
VVCFrame
Definition: dec.h:56
VVC_PROGRESS_MV
@ VVC_PROGRESS_MV
Definition: refs.h:39
ff_vvc_flush_dpb
void ff_vvc_flush_dpb(VVCFrameContext *fc)
Definition: refs.c:84
ff_vvc_report_frame_finished
void ff_vvc_report_frame_finished(VVCFrame *frame)
Definition: refs.c:495
VVCProgressListener::next
VVCProgressListener * next
Definition: refs.h:51
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
ff_vvc_bump_frame
void ff_vvc_bump_frame(VVCContext *s, VVCFrameContext *fc)
Definition: refs.c:256
VVCProgressListener
Definition: refs.h:47
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:112
VVCProgressListener::progress_done
progress_done_fn progress_done
Definition: refs.h:50
VVCFrameContext
Definition: dec.h:92
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474
ff_vvc_frame_rpl
int ff_vvc_frame_rpl(VVCContext *s, VVCFrameContext *fc, SliceContext *sc)
Definition: refs.c:471
VVCContext
Definition: dec.h:195
dec.h
progress_done_fn
void(* progress_done_fn)(VVCProgressListener *l)
Definition: refs.h:45