FFmpeg
Data Structures | Enumerations | Functions
video_enc_params.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "libavutil/avassert.h"
#include "libavutil/frame.h"

Go to the source code of this file.

Data Structures

struct  AVVideoEncParams
 Video encoding parameters for a given frame. More...
 
struct  AVVideoBlockParams
 Data structure for storing block-level encoding information. More...
 

Enumerations

enum  AVVideoEncParamsType { AV_VIDEO_ENC_PARAMS_NONE = -1, AV_VIDEO_ENC_PARAMS_VP9, AV_VIDEO_ENC_PARAMS_H264 }
 

Functions

static av_always_inline AVVideoBlockParamsav_video_enc_params_block (AVVideoEncParams *par, unsigned int idx)
 
AVVideoEncParamsav_video_enc_params_alloc (enum AVVideoEncParamsType type, unsigned int nb_blocks, size_t *out_size)
 Allocates memory for AVVideoEncParams of the given type, plus an array of. More...
 
AVVideoEncParamsav_video_enc_params_create_side_data (AVFrame *frame, enum AVVideoEncParamsType type, unsigned int nb_blocks)
 Allocates memory for AVEncodeInfoFrame plus an array of. More...
 

Enumeration Type Documentation

◆ AVVideoEncParamsType

Enumerator
AV_VIDEO_ENC_PARAMS_NONE 
AV_VIDEO_ENC_PARAMS_VP9 

VP9 stores:

To compute the resulting quantizer index for a block:

  • for luma AC, add the base qp and the per-block delta_qp, saturating to unsigned 8-bit.
  • for luma DC and chroma AC/DC, add the corresponding AVVideoBlockParams.delta_qp to the luma AC index, again saturating to unsigned 8-bit.
AV_VIDEO_ENC_PARAMS_H264 

H.264 stores:

  • in PPS (per-picture):
  • per-slice QP delta, not exported directly, added to the per-MB value
  • per-MB delta; not exported directly; the final per-MB quantizer parameter - QP_Y - minus the value in AVVideoEncParams.qp is exported as AVVideoBlockParams.qp_delta.

Definition at line 28 of file video_enc_params.h.

Function Documentation

◆ av_video_enc_params_block()

static av_always_inline AVVideoBlockParams* av_video_enc_params_block ( AVVideoEncParams par,
unsigned int  idx 
)
static

Definition at line 135 of file video_enc_params.h.

Referenced by decode_read(), h264_export_enc_params(), and vp9_export_enc_params().

◆ av_video_enc_params_alloc()

AVVideoEncParams* av_video_enc_params_alloc ( enum AVVideoEncParamsType  type,
unsigned int  nb_blocks,
size_t *  out_size 
)

Allocates memory for AVVideoEncParams of the given type, plus an array of.

nb_blocks

AVVideoBlockParams and initializes the variables. Can be freed with a normal av_free() call.

Parameters
out_sizeif non-NULL, the size in bytes of the resulting data array is written here.

Definition at line 29 of file video_enc_params.c.

Referenced by av_video_enc_params_create_side_data().

◆ av_video_enc_params_create_side_data()

AVVideoEncParams* av_video_enc_params_create_side_data ( AVFrame frame,
enum AVVideoEncParamsType  type,
unsigned int  nb_blocks 
)

Allocates memory for AVEncodeInfoFrame plus an array of.

nb_blocks

AVEncodeInfoBlock in the given AVFrame

as AVFrameSideData of type AV_FRAME_DATA_ENCODE_INFO and initializes the variables.

Definition at line 57 of file video_enc_params.c.

Referenced by h264_export_enc_params(), and vp9_export_enc_params().

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