FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
AVHWAccel Struct Reference

AVHWAccel. More...

#include <avcodec.h>

Data Fields

const char * name
 Name of the hardware accelerated codec.
 
enum AVMediaType type
 Type of codec implemented by the hardware accelerator.
 
enum AVCodecID id
 Codec implemented by the hardware accelerator.
 
enum AVPixelFormat pix_fmt
 Supported pixel format.
 
int capabilities
 Hardware accelerated codec capabilities.
 
struct AVHWAccelnext
 
int(* start_frame )(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
 Called at the beginning of each frame or field picture.
 
int(* decode_slice )(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
 Callback for each slice.
 
int(* end_frame )(AVCodecContext *avctx)
 Called at the end of each frame or field picture.
 
int priv_data_size
 Size of HW accelerator private data.
 
void(* decode_mb )(struct MpegEncContext *s)
 Called for every Macroblock in a slice.
 

Detailed Description

AVHWAccel.

Definition at line 3131 of file avcodec.h.

Field Documentation

const char* AVHWAccel::name

Name of the hardware accelerated codec.

The name is globally unique among encoders and among decoders (but an encoder and a decoder can share the same name).

Definition at line 3137 of file avcodec.h.

enum AVMediaType AVHWAccel::type

Type of codec implemented by the hardware accelerator.

See AVMEDIA_TYPE_xxx

Definition at line 3144 of file avcodec.h.

enum AVCodecID AVHWAccel::id

Codec implemented by the hardware accelerator.

See AV_CODEC_ID_xxx

Definition at line 3151 of file avcodec.h.

Referenced by ff_find_hwaccel().

enum AVPixelFormat AVHWAccel::pix_fmt

Supported pixel format.

Only hardware accelerated formats are supported here.

Definition at line 3158 of file avcodec.h.

Referenced by ff_find_hwaccel().

int AVHWAccel::capabilities

Hardware accelerated codec capabilities.

see FF_HWACCEL_CODEC_CAP_*

Definition at line 3164 of file avcodec.h.

struct AVHWAccel* AVHWAccel::next

Definition at line 3166 of file avcodec.h.

Referenced by av_hwaccel_next(), and av_register_hwaccel().

int(* AVHWAccel::start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)

Called at the beginning of each frame or field picture.

Meaningful frame information (codec specific) is guaranteed to be parsed at this point. This function is mandatory.

Note that buf can be NULL along with buf_size set to 0. Otherwise, this means the whole frame is available at this point.

Parameters
avctxthe codec context
bufthe frame data buffer base
buf_sizethe size of the frame in bytes
Returns
zero if successful, a negative value otherwise

Definition at line 3182 of file avcodec.h.

Referenced by decode_nal_units(), ff_h263_decode_frame(), mpeg_field_start(), and vc1_decode_frame().

int(* AVHWAccel::decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)

Callback for each slice.

Meaningful slice information (codec specific) is guaranteed to be parsed at this point. This function is mandatory. The only exception is XvMC, that works on MB level.

Parameters
avctxthe codec context
bufthe slice data buffer base
buf_sizethe size of the slice in bytes
Returns
zero if successful, a negative value otherwise

Definition at line 3196 of file avcodec.h.

Referenced by decode_nal_units(), decode_slice(), er_supported(), ff_er_add_slice(), mpeg_decode_slice(), and vc1_decode_frame().

int(* AVHWAccel::end_frame)(AVCodecContext *avctx)

Called at the end of each frame or field picture.

The whole picture is parsed at this point and can now be sent to the hardware accelerator. This function is mandatory.

Parameters
avctxthe codec context
Returns
zero if successful, a negative value otherwise

Definition at line 3207 of file avcodec.h.

Referenced by ff_h263_decode_frame(), field_end(), mpeg_field_start(), slice_end(), and vc1_decode_frame().

int AVHWAccel::priv_data_size

Size of HW accelerator private data.

Private data is allocated with av_mallocz() before AVCodecContext.get_buffer() and deallocated after AVCodecContext.release_buffer().

Definition at line 3216 of file avcodec.h.

Referenced by alloc_frame_buffer(), and alloc_picture().

void(* AVHWAccel::decode_mb)(struct MpegEncContext *s)

Called for every Macroblock in a slice.

XvMC uses it to replace the ff_MPV_decode_mb(). Instead of decoding to raw picture, MB parameters are stored in an array provided by the video driver.

Parameters
sthe mpeg context

Definition at line 3227 of file avcodec.h.

Referenced by dsputil_init_sse(), ff_er_frame_end(), is_intra_more_likely(), and MPV_decode_mb_internal().


The documentation for this struct was generated from the following file: