34 SCHRO_VIDEO_FORMAT_CUSTOM ,
35 SCHRO_VIDEO_FORMAT_QSIF ,
36 SCHRO_VIDEO_FORMAT_QCIF ,
37 SCHRO_VIDEO_FORMAT_SIF ,
38 SCHRO_VIDEO_FORMAT_CIF ,
39 SCHRO_VIDEO_FORMAT_4SIF ,
40 SCHRO_VIDEO_FORMAT_4CIF ,
41 SCHRO_VIDEO_FORMAT_SD480I_60 ,
42 SCHRO_VIDEO_FORMAT_SD576I_50 ,
43 SCHRO_VIDEO_FORMAT_HD720P_60 ,
44 SCHRO_VIDEO_FORMAT_HD720P_50 ,
45 SCHRO_VIDEO_FORMAT_HD1080I_60 ,
46 SCHRO_VIDEO_FORMAT_HD1080I_50 ,
47 SCHRO_VIDEO_FORMAT_HD1080P_60 ,
48 SCHRO_VIDEO_FORMAT_HD1080P_50 ,
49 SCHRO_VIDEO_FORMAT_DC2K_24 ,
50 SCHRO_VIDEO_FORMAT_DC4K_24 ,
61 SCHRO_VIDEO_FORMAT_CUSTOM;
72 for (idx = 0; idx < num_formats; ++idx) {
97 int y_width, uv_width;
98 int y_height, uv_height;
101 y_width = avccontext->
width;
102 y_height = avccontext->
height;
103 uv_width = y_width >> (SCHRO_FRAME_FORMAT_H_SHIFT(schro_frame_fmt));
104 uv_height = y_height >> (SCHRO_FRAME_FORMAT_V_SHIFT(schro_frame_fmt));
109 p_frame = schro_frame_new();
111 p_frame->width = y_width;
112 p_frame->height = y_height;
113 schro_frame_set_free_callback(p_frame,
FreeSchroFrame, (
void *)p_pic);
115 for (i = 0; i < 3; ++i) {
116 p_frame->components[i].width = i ? uv_width : y_width;
117 p_frame->components[i].stride = p_pic->linesize[i];
118 p_frame->components[i].height = i ? uv_height : y_height;
119 p_frame->components[i].length =
120 p_frame->components[i].stride * p_frame->components[i].height;
121 p_frame->components[i].data = p_pic->data[i];
124 p_frame->components[i].v_shift =
125 SCHRO_FRAME_FORMAT_V_SHIFT(p_frame->format);
126 p_frame->components[i].h_shift =
127 SCHRO_FRAME_FORMAT_H_SHIFT(p_frame->format);
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
static const SchroVideoFormatEnum ff_schro_video_formats[]
Schroedinger video preset table.
SchroChromaFormat schro_pix_fmt
four components are given, that's all.
data structures common to libschroedinger decoder and encoder
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
SchroFrame * ff_create_schro_frame(AVCodecContext *avccontext, SchroFrameFormat schro_frame_fmt)
Create a Schro frame based on the dimensions and frame format passed.
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 width
picture width / height.
void avpicture_free(AVPicture *picture)
Free a picture previously allocated by avpicture_alloc().
SchroVideoFormatEnum ff_get_schro_video_format_preset(AVCodecContext *avccontext)
Returns the video format preset matching the input video dimensions and time base.
static void FreeSchroFrame(SchroFrame *frame, void *priv)
main external API structure.
SchroFrameFormat schro_frame_fmt
int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height)
Allocate memory for a picture.
data structures common to libdirac and libschroedinger
unsigned int ff_dirac_schro_get_video_format_idx(AVCodecContext *avccontext)
Returns the index into the Dirac Schro common video format info table.
static const struct @28 schro_pixel_format_map[]