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 * 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 74 of file vaapi_encode.c.

Referenced by vaapi_encode_issue().

static int vaapi_encode_wait ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 98 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 129 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 434 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_discard ( AVCodecContext avctx,
VAAPIEncodePicture pic 
)
static

Definition at line 495 of file vaapi_encode.c.

Referenced by vaapi_encode_free().

static VAAPIEncodePicture* vaapi_encode_alloc ( void  )
static

Definition at line 512 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 556 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 633 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_truncate_gop ( AVCodecContext avctx)
static

Definition at line 738 of file vaapi_encode.c.

Referenced by ff_vaapi_encode2().

static int vaapi_encode_clear_old ( AVCodecContext avctx)
static

Definition at line 799 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 831 of file vaapi_encode.c.

static av_cold int vaapi_encode_config_attributes ( AVCodecContext avctx)
static

Definition at line 941 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 1111 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 1196 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 1210 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 1247 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)

Definition at line 1499 of file vaapi_encode.c.

Referenced by ff_vaapi_encode_init().

Variable Documentation

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