Go to the documentation of this file.
49 cad->
param.info_level = 0;
64 davs2_seq_info_t *headerset,
int ret_type,
AVFrame *
frame)
67 int bytes_per_sample = pic->bytes_per_sample;
76 if (!pic || ret_type == DAVS2_GOT_HEADER) {
77 avctx->
width = headerset->width;
78 avctx->
height = headerset->height;
79 avctx->
pix_fmt = headerset->output_bit_depth == 10 ?
107 for (plane = 0; plane < 3; ++plane) {
108 int size_line = pic->widths[plane] * bytes_per_sample;
111 if (!
frame->buf[plane]){
112 av_log(avctx,
AV_LOG_ERROR,
"Decoder error: allocation failure, can't dump frames.\n");
117 frame->linesize[plane] = size_line;
120 memcpy(
frame->data[plane] +
line * size_line,
121 pic->planes[plane] +
line * pic->strides[plane],
122 pic->widths[plane] * bytes_per_sample);
137 int ret = DAVS2_GOT_FRAME;
139 while (
ret == DAVS2_GOT_FRAME) {
144 if (
ret == DAVS2_ERROR) {
152 int ret = DAVS2_DEFAULT;
155 if (
ret == DAVS2_ERROR) {
159 if (
ret == DAVS2_GOT_FRAME) {
172 davs2_decoder_close(cad->
decoder);
183 int buf_size = avpkt->
size;
184 uint8_t *buf_ptr = avpkt->
data;
186 int ret = DAVS2_DEFAULT;
193 cad->
packet.data = buf_ptr;
194 cad->
packet.len = buf_size;
201 if (
ret == DAVS2_ERROR) {
208 if (
ret != DAVS2_DEFAULT) {
213 return ret == 0 ? buf_size :
ret;
230 .wrapper_name =
"libdavs2",
static int davs2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
const AVCodec ff_libdavs2_decoder
davs2_seq_info_t headerset
This structure describes decoded (raw) audio or video data.
static av_cold int davs2_init(AVCodecContext *avctx)
#define AV_PIX_FMT_YUV420P10
#define AV_LOG_VERBOSE
Detailed information.
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
static atomic_int cpu_flags
static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic, int *got_frame, davs2_seq_info_t *headerset, int ret_type, AVFrame *frame)
int thread_count
thread count is used to decide how many independent tasks should be passed to execute()
davs2_picture_t out_frame
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#define AV_CODEC_CAP_OTHER_THREADS
Codec supports multithreading through a method other than slice- or frame-level multithreading.
static enum AVPixelFormat pix_fmts[]
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static void flush(AVCodecContext *avctx)
@ AV_PICTURE_TYPE_I
Intra.
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AV_CPU_FLAG_AVX
AVX functions: requires OS support even if YMM registers aren't used.
#define AV_CPU_FLAG_AVX2
AVX2 functions: requires OS support even if YMM registers aren't used.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
#define AVERROR_EXTERNAL
Generic error in an external library.
static int send_delayed_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame)
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static void davs2_flush(AVCodecContext *avctx)
AVRational av_d2q(double d, int max)
Convert a double precision floating point number to a rational.
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int davs2_end(AVCodecContext *avctx)
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
main external API structure.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
@ AV_PICTURE_TYPE_P
Predicted.
This structure stores compressed data.
int width
picture width / height.
@ AV_PICTURE_TYPE_S
S(GMC)-VOP MPEG-4.
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line