FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
vaapi_encode.c File Reference
#include <inttypes.h>
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/log.h"
#include "libavutil/pixdesc.h"
#include "vaapi_encode.h"
#include "avcodec.h"

Go to the source code of this file.

Functions

static int vaapi_encode_make_packed_header (AVCodecContext *avctx, VAAPIEncodePicture *pic, int type, char *data, size_t bit_len)
 
static int vaapi_encode_make_param_buffer (AVCodecContext *avctx, VAAPIEncodePicture *pic, int type, char *data, size_t len)
 
static int vaapi_encode_wait (AVCodecContext *avctx, VAAPIEncodePicture *pic)
 
static int vaapi_encode_issue (AVCodecContext *avctx, VAAPIEncodePicture *pic)
 
static int vaapi_encode_output (AVCodecContext *avctx, VAAPIEncodePicture *pic, AVPacket *pkt)
 
static int vaapi_encode_discard (AVCodecContext *avctx, VAAPIEncodePicture *pic)
 
static VAAPIEncodePicturevaapi_encode_alloc (void)
 
static int vaapi_encode_free (AVCodecContext *avctx, VAAPIEncodePicture *pic)
 
static int vaapi_encode_step (AVCodecContext *avctx, VAAPIEncodePicture *target)
 
static int vaapi_encode_get_next (AVCodecContext *avctx, VAAPIEncodePicture **pic_out)
 
static int vaapi_encode_truncate_gop (AVCodecContext *avctx)
 
static int vaapi_encode_clear_old (AVCodecContext *avctx)
 
int ff_vaapi_encode2 (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *input_image, int *got_packet)
 
static av_cold int vaapi_encode_config_attributes (AVCodecContext *avctx)
 
static av_cold int vaapi_encode_init_rate_control (AVCodecContext *avctx)
 
static void vaapi_encode_free_output_buffer (void *opaque, uint8_t *data)
 
static AVBufferRefvaapi_encode_alloc_output_buffer (void *opaque, int size)
 
static av_cold int vaapi_encode_create_recon_frames (AVCodecContext *avctx)
 
av_cold int ff_vaapi_encode_init (AVCodecContext *avctx)
 
av_cold int ff_vaapi_encode_close (AVCodecContext *avctx)
 

Variables

static const char *const picture_type_name [] = { "IDR", "I", "P", "B" }
 

Function Documentation

static int vaapi_encode_make_packed_header ( AVCodecContext avctx,
VAAPIEncodePicture pic,
int  type,
char *  data,
size_t  bit_len 
)
static

Definition at line 32 of file vaapi_encode.c.

Referenced by vaapi_encode_issue().

static int vaapi_encode_make_param_buffer ( AVCodecContext avctx,
VAAPIEncodePicture pic,
int  type,
char *  data,
size_t  len 
)
static

Definition at line 78 of file vaapi_encode.c.

Referenced by vaapi_encode_issue().

static int vaapi_encode_wait ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 106 of file vaapi_encode.c.

Referenced by vaapi_encode_discard(), vaapi_encode_issue(), and vaapi_encode_output().

static int vaapi_encode_issue ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 137 of file vaapi_encode.c.

Referenced by vaapi_encode_step().

static int vaapi_encode_output ( AVCodecContext avctx,
VAAPIEncodePicture pic,
AVPacket pkt 
)
static

Definition at line 451 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_discard ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 512 of file vaapi_encode.c.

Referenced by vaapi_encode_free().

static VAAPIEncodePicture* vaapi_encode_alloc ( void  )
static

Definition at line 529 of file vaapi_encode.c.

Referenced by vaapi_encode_get_next().

static int vaapi_encode_free ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static
static int vaapi_encode_step ( AVCodecContext avctx,
VAAPIEncodePicture target 
)
static

Definition at line 576 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_get_next ( AVCodecContext avctx,
VAAPIEncodePicture **  pic_out 
)
static

Definition at line 653 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_truncate_gop ( AVCodecContext avctx)
static

Definition at line 758 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_clear_old ( AVCodecContext avctx)
static

Definition at line 819 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

int ff_vaapi_encode2 ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame input_image,
int got_packet 
)

Definition at line 851 of file vaapi_encode.c.

static av_cold int vaapi_encode_config_attributes ( AVCodecContext avctx)
static

Definition at line 961 of file vaapi_encode.c.

Referenced by ff_vaapi_encode_init().

static av_cold int vaapi_encode_init_rate_control ( AVCodecContext avctx)
static

Definition at line 1131 of file vaapi_encode.c.

Referenced by ff_vaapi_encode_init().

static void vaapi_encode_free_output_buffer ( void opaque,
uint8_t data 
)
static

Definition at line 1216 of file vaapi_encode.c.

Referenced by vaapi_encode_alloc_output_buffer().

static AVBufferRef* vaapi_encode_alloc_output_buffer ( void opaque,
int  size 
)
static

Definition at line 1230 of file vaapi_encode.c.

Referenced by ff_vaapi_encode_init().

static av_cold int vaapi_encode_create_recon_frames ( AVCodecContext avctx)
static

Definition at line 1267 of file vaapi_encode.c.

Referenced by ff_vaapi_encode_init().

av_cold int ff_vaapi_encode_init ( AVCodecContext avctx)
av_cold int ff_vaapi_encode_close ( AVCodecContext avctx)

Variable Documentation

const char* const picture_type_name[] = { "IDR", "I", "P", "B" }
static