libavcodec/crystalhd.c File Reference

#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libcrystalhd/bc_dts_types.h>
#include <libcrystalhd/bc_dts_defs.h>
#include <libcrystalhd/libcrystalhd_if.h>
#include "avcodec.h"
#include "h264.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  OpaqueList
struct  CHDContext

Defines

#define _XOPEN_SOURCE   600
#define OUTPUT_PROC_TIMEOUT   50
 Timeout parameter passed to DtsProcOutput() in us.
#define TIMESTAMP_UNIT   100000
 Step between fake timestamps passed to hardware in units of 100ns.
#define BASE_WAIT   10000
 Initial value in us of the wait in decode().
#define WAIT_UNIT   1000
 Increment in us to adjust wait in decode().

Enumerations

enum  CopyRet {
  RET_ERROR = -1, RET_OK = 0, RET_COPY_AGAIN = 1, RET_SKIP_NEXT_COPY = 2,
  RET_COPY_NEXT_FIELD = 3
}

Functions

static BC_MEDIA_SUBTYPE id2subtype (CHDContext *priv, enum CodecID id)
static void print_frame_info (CHDContext *priv, BC_DTS_PROC_OUT *output)
static uint64_t opaque_list_push (CHDContext *priv, uint64_t reordered_opaque, uint8_t pic_type)
static OpaqueListopaque_list_pop (CHDContext *priv, uint64_t fake_timestamp)
static void flush (AVCodecContext *avctx)
static av_cold int uninit (AVCodecContext *avctx)
static av_cold int init (AVCodecContext *avctx)
static CopyRet copy_frame (AVCodecContext *avctx, BC_DTS_PROC_OUT *output, void *data, int *data_size)
static CopyRet receive_frame (AVCodecContext *avctx, void *data, int *data_size)
static int decode (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)

Variables

static const AVOption options []


Define Documentation

#define _XOPEN_SOURCE   600

Definition at line 76 of file crystalhd.c.

#define BASE_WAIT   10000

Initial value in us of the wait in decode().

Definition at line 97 of file crystalhd.c.

Referenced by decode(), flush(), and init().

#define OUTPUT_PROC_TIMEOUT   50

Timeout parameter passed to DtsProcOutput() in us.

Definition at line 93 of file crystalhd.c.

Referenced by receive_frame().

#define TIMESTAMP_UNIT   100000

Step between fake timestamps passed to hardware in units of 100ns.

Definition at line 95 of file crystalhd.c.

Referenced by opaque_list_push().

#define WAIT_UNIT   1000

Increment in us to adjust wait in decode().

Definition at line 99 of file crystalhd.c.

Referenced by decode().


Enumeration Type Documentation

enum CopyRet

Enumerator:
RET_ERROR 
RET_OK 
RET_COPY_AGAIN 
RET_SKIP_NEXT_COPY 
RET_COPY_NEXT_FIELD 

Definition at line 106 of file crystalhd.c.


Function Documentation

static CopyRet copy_frame ( AVCodecContext avctx,
BC_DTS_PROC_OUT *  output,
void *  data,
int *  data_size 
) [inline, static]

Definition at line 536 of file crystalhd.c.

Referenced by decode_frame(), encode_frame(), and receive_frame().

static int decode ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 812 of file crystalhd.c.

Referenced by mimic_decode_frame(), opt_codecs(), opt_formats(), and ra288_decode_frame().

static void flush ( AVCodecContext avctx  )  [static]

Definition at line 315 of file crystalhd.c.

static BC_MEDIA_SUBTYPE id2subtype ( CHDContext priv,
enum CodecID  id 
) [inline, static]

Definition at line 166 of file crystalhd.c.

Referenced by init().

static av_cold int init ( AVCodecContext avctx  )  [static]

Definition at line 380 of file crystalhd.c.

Referenced by command(), get_image(), idct248_ref(), mpeg12_class(), and put_image().

static OpaqueList* opaque_list_pop ( CHDContext priv,
uint64_t  fake_timestamp 
) [static]

Definition at line 262 of file crystalhd.c.

Referenced by copy_frame().

static uint64_t opaque_list_push ( CHDContext priv,
uint64_t  reordered_opaque,
uint8_t  pic_type 
) [static]

Definition at line 232 of file crystalhd.c.

Referenced by decode().

static void print_frame_info ( CHDContext priv,
BC_DTS_PROC_OUT *  output 
) [inline, static]

Definition at line 186 of file crystalhd.c.

Referenced by receive_frame().

static CopyRet receive_frame ( AVCodecContext avctx,
void *  data,
int *  data_size 
) [inline, static]

Definition at line 726 of file crystalhd.c.

Referenced by decode().

static av_cold int uninit ( AVCodecContext avctx  )  [static]

Definition at line 334 of file crystalhd.c.

Referenced by command(), config(), init(), init_buffers(), open(), and vf_open().


Variable Documentation

const AVOption options[] [static]

Initial value:

 {
    { "crystalhd_downscale_width",
      "Turn on downscaling to the specified width",
      0x42,
      AV_OPT_TYPE_INT, 0, 0, UINT32_MAX,
      AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM, },
    { NULL, },
}

Definition at line 152 of file crystalhd.c.


Generated on Fri Oct 26 02:46:07 2012 for FFmpeg by  doxygen 1.5.8