MythTV  master
Classes | Typedefs | Enumerations | Functions
mythframe.h File Reference
#include <cstdint>
#include <cstring>
#include "mythtvexp.h"
Include dependency graph for mythframe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VideoFrame_
 
class  MythUSWCCopy
 

Typedefs

typedef enum FrameType_ VideoFrameType
 
typedef struct VideoFrame_ VideoFrame
 

Enumerations

enum  FrameType_ {
  FMT_NONE = -1, FMT_RGB24 = 0, FMT_YV12, FMT_IA44,
  FMT_AI44, FMT_RGB32, FMT_ARGB32, FMT_RGBA32,
  FMT_YUV422P, FMT_BGRA, FMT_VDPAU, FMT_VAAPI,
  FMT_YUY2, FMT_DXVA2, FMT_NV12
}
 
enum  uswcState { uswcState::Detect, uswcState::Use_SSE, uswcState::Use_SW }
 

Functions

void MTV_PUBLIC framecopy (VideoFrame *dst, const VideoFrame *src, bool useSSE=true)
 
static void init (VideoFrame *vf, VideoFrameType _codec, unsigned char *_buf, int _width, int _height, int _size, const int *p=nullptr, const int *o=nullptr, float _aspect=-1.0F, double _rate=-1.0F, int _aligned=64)
 
static void clear (VideoFrame *vf)
 
static bool compatible (const VideoFrame *a, const VideoFrame *b)
 
static int bitsperpixel (VideoFrameType type)
 
static void copy (VideoFrame *dst, const VideoFrame *src)
 copy: copy one frame into another copy only works with the following assumptions: frames are of the same resolution destination frame is in YV12 format source frame is either YV12 or NV12 format More...
 
static uint buffersize (VideoFrameType type, int width, int height, int _aligned=64)
 
static void copybuffer (VideoFrame *dst, uint8_t *buffer, int pitch, VideoFrameType type=FMT_YV12)
 
static void copybuffer (uint8_t *dstbuffer, const VideoFrame *src, int pitch=0, VideoFrameType type=FMT_YV12)
 

Typedef Documentation

◆ VideoFrameType

typedef enum FrameType_ VideoFrameType

◆ VideoFrame

typedef struct VideoFrame_ VideoFrame

Enumeration Type Documentation

◆ FrameType_

enum FrameType_
Enumerator
FMT_NONE 
FMT_RGB24 
FMT_YV12 
FMT_IA44 
FMT_AI44 
FMT_RGB32 

endian dependent format, ARGB or BGRA

FMT_ARGB32 
FMT_RGBA32 
FMT_YUV422P 
FMT_BGRA 
FMT_VDPAU 
FMT_VAAPI 
FMT_YUY2 
FMT_DXVA2 
FMT_NV12 

Definition at line 17 of file mythframe.h.

◆ uswcState

enum uswcState
strong
Enumerator
Detect 
Use_SSE 
Use_SW 

Definition at line 76 of file mythframe.h.

Function Documentation

◆ framecopy()

void MTV_PUBLIC framecopy ( VideoFrame dst,
const VideoFrame src,
bool  useSSE = true 
)

Definition at line 300 of file mythframe.cpp.

Referenced by copy().

◆ init()

static void init ( VideoFrame vf,
VideoFrameType  _codec,
unsigned char *  _buf,
int  _width,
int  _height,
int  _size,
const int *  p = nullptr,
const int *  o = nullptr,
float  _aspect = -1.0F,
double  _rate = -1.0F,
int  _aligned = 64 
)
inlinestatic

◆ clear()

static void clear ( VideoFrame vf)
inlinestatic

Definition at line 212 of file mythframe.h.

◆ compatible()

static bool compatible ( const VideoFrame a,
const VideoFrame b 
)
inlinestatic

Definition at line 231 of file mythframe.h.

◆ bitsperpixel()

static int bitsperpixel ( VideoFrameType  type)
inlinestatic

Definition at line 267 of file mythframe.h.

Referenced by buffersize(), PrivateDecoderOMX::GetBufferedFrame(), and init().

◆ copy()

static void copy ( VideoFrame dst,
const VideoFrame src 
)
inlinestatic

copy: copy one frame into another copy only works with the following assumptions: frames are of the same resolution destination frame is in YV12 format source frame is either YV12 or NV12 format

Definition at line 262 of file mythframe.h.

Referenced by copybuffer().

◆ buffersize()

static uint buffersize ( VideoFrameType  type,
int  width,
int  height,
int  _aligned = 64 
)
inlinestatic

◆ copybuffer() [1/2]

static void copybuffer ( VideoFrame dst,
uint8_t *  buffer,
int  pitch,
VideoFrameType  type = FMT_YV12 
)
inlinestatic

◆ copybuffer() [2/2]

static void copybuffer ( uint8_t *  dstbuffer,
const VideoFrame src,
int  pitch = 0,
VideoFrameType  type = FMT_YV12 
)
inlinestatic

Definition at line 354 of file mythframe.h.