32 { 640, 480, 24000, 1001},
33 { 176, 120, 15000, 1001},
35 { 352, 240, 15000, 1001},
37 { 704, 480, 15000, 1001},
39 { 720, 480, 30000, 1001},
41 { 1280, 720, 60000, 1001},
43 { 1920, 1080, 30000, 1001},
44 { 1920, 1080, 25, 1 },
45 { 1920, 1080, 60000, 1001},
46 { 1920, 1080, 50, 1 },
47 { 2048, 1080, 24, 1 },
48 { 4096, 2160, 24, 1 },
53 unsigned int ret_idx = 0;
56 sizeof(ff_schro_video_format_info[0]);
58 for (idx = 1; idx < num_formats; ++idx) {
122 SCHRO_VIDEO_FORMAT_CUSTOM ,
123 SCHRO_VIDEO_FORMAT_QSIF ,
124 SCHRO_VIDEO_FORMAT_QCIF ,
125 SCHRO_VIDEO_FORMAT_SIF ,
126 SCHRO_VIDEO_FORMAT_CIF ,
127 SCHRO_VIDEO_FORMAT_4SIF ,
128 SCHRO_VIDEO_FORMAT_4CIF ,
129 SCHRO_VIDEO_FORMAT_SD480I_60 ,
130 SCHRO_VIDEO_FORMAT_SD576I_50 ,
131 SCHRO_VIDEO_FORMAT_HD720P_60 ,
132 SCHRO_VIDEO_FORMAT_HD720P_50 ,
133 SCHRO_VIDEO_FORMAT_HD1080I_60 ,
134 SCHRO_VIDEO_FORMAT_HD1080I_50 ,
135 SCHRO_VIDEO_FORMAT_HD1080P_60 ,
136 SCHRO_VIDEO_FORMAT_HD1080P_50 ,
137 SCHRO_VIDEO_FORMAT_DC2K_24 ,
138 SCHRO_VIDEO_FORMAT_DC4K_24 ,
144 sizeof(ff_schro_video_formats[0]);
148 return (idx < num_formats) ? ff_schro_video_formats[idx] :
149 SCHRO_VIDEO_FORMAT_CUSTOM;
160 for (idx = 0; idx < num_formats; ++idx) {
180 int y_width, uv_width;
181 int y_height, uv_height;
184 y_width = avctx->
width;
186 uv_width = y_width >> (SCHRO_FRAME_FORMAT_H_SHIFT(schro_frame_fmt));
187 uv_height = y_height >> (SCHRO_FRAME_FORMAT_V_SHIFT(schro_frame_fmt));
198 p_frame = schro_frame_new();
200 p_frame->width = y_width;
201 p_frame->height = y_height;
204 for (i = 0; i < 3; ++i) {
205 p_frame->components[i].width = i ? uv_width : y_width;
206 p_frame->components[i].stride = p_pic->linesize[i];
207 p_frame->components[i].height = i ? uv_height : y_height;
208 p_frame->components[i].length =
209 p_frame->components[i].stride * p_frame->components[i].height;
210 p_frame->components[i].data = p_pic->data[i];
213 p_frame->components[i].v_shift =
214 SCHRO_FRAME_FORMAT_V_SHIFT(p_frame->format);
215 p_frame->components[i].h_shift =
216 SCHRO_FRAME_FORMAT_H_SHIFT(p_frame->format);
FFSchroQueueElement * p_tail
Pointer to tail of queue.
This structure describes decoded (raw) audio or video data.
void * data
Data to be stored in queue.
ptrdiff_t const GLvoid * data
static const SchroVideoFormatEnum ff_schro_video_formats[]
Schroedinger video preset table.
SchroChromaFormat schro_pix_fmt
memory handling functions
SchroFrame * ff_create_schro_frame(AVCodecContext *avctx, SchroFrameFormat schro_frame_fmt)
Create a Schro frame based on the dimensions and frame format passed.
data structures common to libschroedinger decoder and encoder
Macro definitions for various function/variable attributes.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
void * ff_schro_queue_pop(FFSchroQueue *queue)
Return the first element in the queue.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
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.
int ff_schro_queue_push_back(FFSchroQueue *queue, void *p_data)
Add an element to the end of the queue.
void ff_schro_queue_free(FFSchroQueue *queue, void(*free_func)(void *))
Free the queue resources.
av_cold void ff_schro_queue_init(FFSchroQueue *queue)
Initialise the queue.
A simple queue implementation used in libschroedinger.
int width
picture width / height.
static unsigned int get_video_format_idx(AVCodecContext *avctx)
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
SchroFrameFormat schro_frame_fmt
SchroVideoFormatEnum ff_get_schro_video_format_preset(AVCodecContext *avctx)
Returns the video format preset matching the input video dimensions and time base.
struct FFSchroQueueElement * next
Pointer to next element queue.
FFSchroQueueElement * p_head
Pointer to head of queue.
static const SchroVideoFormatInfo ff_schro_video_format_info[]
common internal api header.
static const struct @69 schro_pixel_format_map[]
static void free_schro_frame(SchroFrame *frame, void *priv)
#define AV_GET_BUFFER_FLAG_REF
The decoder will keep a reference to the frame and may reuse it later.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...