FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
libschroedinger.h File Reference

data structures common to libschroedinger decoder and encoder More...

#include <schroedinger/schrobitstream.h>
#include <schroedinger/schroframe.h>
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  SchroVideoFormatInfo
 
struct  FFSchroEncodedFrame
 contains a single encoded frame returned from Dirac or Schroedinger More...
 
struct  FFSchroQueueElement
 queue element More...
 
struct  FFSchroQueue
 A simple queue implementation used in libschroedinger. More...
 

Functions

void ff_schro_queue_init (FFSchroQueue *queue)
 Initialise the queue. More...
 
int ff_schro_queue_push_back (FFSchroQueue *queue, void *p_data)
 Add an element to the end of the queue. More...
 
voidff_schro_queue_pop (FFSchroQueue *queue)
 Return the first element in the queue. More...
 
void ff_schro_queue_free (FFSchroQueue *queue, void(*free_func)(void *))
 Free the queue resources. More...
 
SchroVideoFormatEnum ff_get_schro_video_format_preset (AVCodecContext *avctx)
 Returns the video format preset matching the input video dimensions and time base. More...
 
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. More...
 
SchroFrame * ff_create_schro_frame (AVCodecContext *avctx, SchroFrameFormat schro_frame_fmt)
 Create a Schro frame based on the dimensions and frame format passed. More...
 

Variables

struct {
   enum AVPixelFormat   ff_pix_fmt
 
   SchroChromaFormat   schro_pix_fmt
 
   SchroFrameFormat   schro_frame_fmt
 
schro_pixel_format_map []
 

Detailed Description

data structures common to libschroedinger decoder and encoder

Definition in file libschroedinger.h.

Function Documentation

void ff_schro_queue_init ( FFSchroQueue queue)

Initialise the queue.

Definition at line 71 of file libschroedinger.c.

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

int ff_schro_queue_push_back ( FFSchroQueue queue,
void p_data 
)

Add an element to the end of the queue.

Definition at line 83 of file libschroedinger.c.

Referenced by libschroedinger_decode_frame(), and libschroedinger_encode_frame().

void* ff_schro_queue_pop ( FFSchroQueue queue)

Return the first element in the queue.

Definition at line 102 of file libschroedinger.c.

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

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 77 of file libschroedinger.c.

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

SchroVideoFormatEnum ff_get_schro_video_format_preset ( AVCodecContext avctx)

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

Definition at line 141 of file libschroedinger.c.

Referenced by libschroedinger_encode_init().

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 152 of file libschroedinger.c.

Referenced by libschroedinger_encode_init(), and libschroedinger_handle_first_access_unit().

SchroFrame* ff_create_schro_frame ( AVCodecContext avctx,
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 175 of file libschroedinger.c.

Referenced by libschroedinger_decode_frame(), and libschroedinger_frame_from_data().

Variable Documentation

enum AVPixelFormat ff_pix_fmt

Definition at line 104 of file libschroedinger.h.

Referenced by set_chroma_format().

SchroChromaFormat schro_pix_fmt

Definition at line 105 of file libschroedinger.h.

SchroFrameFormat schro_frame_fmt

Definition at line 106 of file libschroedinger.h.

Referenced by ff_create_schro_frame().

const { ... } schro_pixel_format_map[]
Initial value:
= {
{ AV_PIX_FMT_YUV420P, SCHRO_CHROMA_420, SCHRO_FRAME_FORMAT_U8_420 },
{ AV_PIX_FMT_YUV422P, SCHRO_CHROMA_422, SCHRO_FRAME_FORMAT_U8_422 },
{ AV_PIX_FMT_YUV444P, SCHRO_CHROMA_444, SCHRO_FRAME_FORMAT_U8_444 },
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:68
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:67
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63

Referenced by ff_get_schro_frame_format(), get_chroma_format(), and set_chroma_format().