libavcodec/libschroedinger.c File Reference

function definitions common to libschroedinger decoder and encoder More...

#include "libschroedinger.h"

Go to the source code of this file.

Functions

static unsigned int get_video_format_idx (AVCodecContext *avccontext)
void ff_schro_queue_init (FFSchroQueue *queue)
 Initialise the queue.
void ff_schro_queue_free (FFSchroQueue *queue, void(*free_func)(void *))
 Free the queue resources.
int ff_schro_queue_push_back (FFSchroQueue *queue, void *p_data)
 Add an element to the end of the queue.
void * ff_schro_queue_pop (FFSchroQueue *queue)
 Return the first element in the queue.
SchroVideoFormatEnum ff_get_schro_video_format_preset (AVCodecContext *avccontext)
 Returns the video format preset matching the input video dimensions and time base.
int ff_get_schro_frame_format (SchroChromaFormat schro_pix_fmt, SchroFrameFormat *schro_frame_fmt)
 Sets the Schroedinger frame format corresponding to the Schro chroma format passed.
static void free_schro_frame (SchroFrame *frame, void *priv)
SchroFrame * ff_create_schro_frame (AVCodecContext *avccontext, SchroFrameFormat schro_frame_fmt)
 Create a Schro frame based on the dimensions and frame format passed.

Variables

static const SchroVideoFormatInfo ff_schro_video_format_info []
static const SchroVideoFormatEnum ff_schro_video_formats []
 Schroedinger video preset table.


Detailed Description

function definitions common to libschroedinger decoder and encoder

Definition in file libschroedinger.c.


Function Documentation

SchroFrame* ff_create_schro_frame ( AVCodecContext avccontext,
SchroFrameFormat  schro_frame_fmt 
)

Create a Schro frame based on the dimensions and frame format passed.

Returns a pointer to a frame on success, NULL on failure.

Definition at line 177 of file libschroedinger.c.

Referenced by libschroedinger_decode_frame(), and libschroedinger_frame_from_data().

int ff_get_schro_frame_format ( SchroChromaFormat  schro_chroma_fmt,
SchroFrameFormat *  schro_frame_fmt 
)

Sets the Schroedinger frame format corresponding to the Schro chroma format passed.

Returns 0 on success, -1 on failure.

Definition at line 149 of file libschroedinger.c.

Referenced by libschroedinger_encode_init(), and libschroedinger_handle_first_access_unit().

SchroVideoFormatEnum ff_get_schro_video_format_preset ( AVCodecContext avccontext  ) 

Returns the video format preset matching the input video dimensions and time base.

Definition at line 138 of file libschroedinger.c.

Referenced by libschroedinger_encode_init().

void ff_schro_queue_free ( FFSchroQueue queue,
void(*)(void *)  free_func 
)

Free the queue resources.

free_func is a function supplied by the caller to free any resources allocated by the caller. The data field of the queue element is passed to it.

Definition at line 74 of file libschroedinger.c.

Referenced by libschroedinger_decode_close(), libschroedinger_encode_close(), and libschroedinger_flush().

void ff_schro_queue_init ( FFSchroQueue queue  ) 

Initialise the queue.

Definition at line 68 of file libschroedinger.c.

Referenced by libschroedinger_decode_init(), libschroedinger_encode_init(), and libschroedinger_flush().

void* ff_schro_queue_pop ( FFSchroQueue queue  ) 

Return the first element in the queue.

Definition at line 99 of file libschroedinger.c.

Referenced by ff_schro_queue_free(), libschroedinger_decode_frame(), and libschroedinger_encode_frame().

int ff_schro_queue_push_back ( FFSchroQueue queue,
void *  p_data 
)

Add an element to the end of the queue.

Definition at line 80 of file libschroedinger.c.

Referenced by libschroedinger_decode_frame(), and libschroedinger_encode_frame().

static void free_schro_frame ( SchroFrame *  frame,
void *  priv 
) [static]

Definition at line 166 of file libschroedinger.c.

Referenced by ff_create_schro_frame().

static unsigned int get_video_format_idx ( AVCodecContext avccontext  )  [static]

Definition at line 48 of file libschroedinger.c.

Referenced by ff_get_schro_video_format_preset().


Variable Documentation

Initial value:

 {
    { 640,  480,  24000, 1001},
    { 176,  120,  15000, 1001},
    { 176,  144,  25,    2   },
    { 352,  240,  15000, 1001},
    { 352,  288,  25,    2   },
    { 704,  480,  15000, 1001},
    { 704,  576,  25,    2   },
    { 720,  480,  30000, 1001},
    { 720,  576,  25,    1   },
    { 1280, 720,  60000, 1001},
    { 1280, 720,  50,    1   },
    { 1920, 1080, 30000, 1001},
    { 1920, 1080, 25,    1   },
    { 1920, 1080, 60000, 1001},
    { 1920, 1080, 50,    1   },
    { 2048, 1080, 24,    1   },
    { 4096, 2160, 24,    1   },
}

Definition at line 28 of file libschroedinger.c.

const SchroVideoFormatEnum ff_schro_video_formats[] [static]

Initial value:

{
    SCHRO_VIDEO_FORMAT_CUSTOM     ,
    SCHRO_VIDEO_FORMAT_QSIF       ,
    SCHRO_VIDEO_FORMAT_QCIF       ,
    SCHRO_VIDEO_FORMAT_SIF        ,
    SCHRO_VIDEO_FORMAT_CIF        ,
    SCHRO_VIDEO_FORMAT_4SIF       ,
    SCHRO_VIDEO_FORMAT_4CIF       ,
    SCHRO_VIDEO_FORMAT_SD480I_60  ,
    SCHRO_VIDEO_FORMAT_SD576I_50  ,
    SCHRO_VIDEO_FORMAT_HD720P_60  ,
    SCHRO_VIDEO_FORMAT_HD720P_50  ,
    SCHRO_VIDEO_FORMAT_HD1080I_60 ,
    SCHRO_VIDEO_FORMAT_HD1080I_50 ,
    SCHRO_VIDEO_FORMAT_HD1080P_60 ,
    SCHRO_VIDEO_FORMAT_HD1080P_50 ,
    SCHRO_VIDEO_FORMAT_DC2K_24    ,
    SCHRO_VIDEO_FORMAT_DC4K_24    ,
}
Schroedinger video preset table.

Ensure that this tables matches up correctly with the ff_schro_video_format_info table.

Definition at line 118 of file libschroedinger.c.


Generated on Fri Oct 26 02:47:57 2012 for FFmpeg by  doxygen 1.5.8