107#define MLT_FRAME_PROPERTIES( frame ) ( &( frame )->parent )
108#define MLT_FRAME_SERVICE_STACK( frame ) ( ( frame )->stack_service )
109#define MLT_FRAME_IMAGE_STACK( frame ) ( ( frame )->stack_image )
110#define MLT_FRAME_AUDIO_STACK( frame ) ( ( frame )->stack_audio )
155#define RGB2YUV_601_SCALED(r, g, b, y, u, v)\
156 y = ((263*r + 516*g + 100*b) >> 10) + 16;\
157 u = ((-152*r - 300*g + 450*b) >> 10) + 128;\
158 v = ((450*r - 377*g - 73*b) >> 10) + 128;
160#define RGB2UV_601_SCALED(r, g, b, u, v)\
161 u = ((-152*r - 300*g + 450*b) >> 10) + 128;\
162 v = ((450*r - 377*g - 73*b) >> 10) + 128;
165#define YUV2RGB_601_SCALED( y, u, v, r, g, b ) \
166 r = ((1192 * ( y - 16 ) + 1634 * ( v - 128 ) ) >> 10 ); \
167 g = ((1192 * ( y - 16 ) - 832 * ( v - 128 ) - 401 * ( u - 128 ) ) >> 10 ); \
168 b = ((1192 * ( y - 16 ) + 2066 * ( u - 128 ) ) >> 10 ); \
169 r = r < 0 ? 0 : r > 255 ? 255 : r; \
170 g = g < 0 ? 0 : g > 255 ? 255 : g; \
171 b = b < 0 ? 0 : b > 255 ? 255 : b;
mlt_position mlt_frame_get_position(mlt_frame self)
double mlt_frame_get_aspect_ratio(mlt_frame self)
int mlt_frame_set_alpha(mlt_frame self, uint8_t *alpha, int size, mlt_destructor destroy)
uint8_t * mlt_frame_get_alpha_mask(mlt_frame self)
int mlt_frame_push_audio(mlt_frame self, void *that)
mlt_properties mlt_frame_unique_properties(mlt_frame self, mlt_service service)
mlt_image_format mlt_image_format_id(const char *name)
int mlt_frame_is_test_card(mlt_frame self)
mlt_frame mlt_frame_clone(mlt_frame self, int is_deep)
void mlt_frame_write_ppm(mlt_frame frame)
Definition mlt_frame.c:941
int mlt_frame_set_aspect_ratio(mlt_frame self, double value)
const char * mlt_image_format_name(mlt_image_format format)
mlt_frame mlt_frame_pop_frame(mlt_frame self)
int mlt_frame_set_image(mlt_frame self, uint8_t *image, int size, mlt_destructor destroy)
mlt_frame mlt_frame_init(mlt_service service)
int mlt_frame_is_test_audio(mlt_frame self)
int mlt_image_format_planes(mlt_image_format format, int width, int height, void *data, unsigned char *planes[4], int strides[4])
int mlt_frame_set_position(mlt_frame self, mlt_position value)
mlt_properties mlt_frame_properties(mlt_frame self)
void mlt_frame_close(mlt_frame self)
void mlt_frame_replace_image(mlt_frame self, uint8_t *image, mlt_image_format format, int width, int height)
int mlt_frame_pop_service_int(mlt_frame self)
int mlt_frame_push_service_int(mlt_frame self, int that)
int mlt_frame_push_get_image(mlt_frame self, mlt_get_image get_image)
mlt_producer mlt_frame_get_original_producer(mlt_frame self)
int mlt_frame_push_service(mlt_frame self, void *that)
mlt_deque mlt_frame_service_stack(mlt_frame self)
mlt_position mlt_frame_original_position(mlt_frame self)
int mlt_frame_get_audio(mlt_frame self, void **buffer, mlt_audio_format *format, int *frequency, int *channels, int *samples)
int mlt_frame_set_audio(mlt_frame self, void *buffer, mlt_audio_format, int size, mlt_destructor)
void * mlt_frame_pop_service(mlt_frame self)
mlt_properties mlt_frame_get_unique_properties(mlt_frame self, mlt_service service)
int mlt_image_format_size(mlt_image_format format, int width, int height, int *bpp)
int mlt_frame_get_image(mlt_frame self, uint8_t **buffer, mlt_image_format *format, int *width, int *height, int writable)
mlt_get_image mlt_frame_pop_get_image(mlt_frame self)
unsigned char * mlt_frame_get_waveform(mlt_frame self, int w, int h)
int(* mlt_get_image)(mlt_frame self, uint8_t **buffer, mlt_image_format *format, int *width, int *height, int writable)
Callback function to get video data.
Definition mlt_frame.h:35
int mlt_frame_push_frame(mlt_frame self, mlt_frame that)
int(* mlt_get_audio)(mlt_frame self, void **buffer, mlt_audio_format *format, int *frequency, int *channels, int *samples)
Callback function to get audio data.
Definition mlt_frame.h:41
void * mlt_frame_pop_audio(mlt_frame self)
uint8_t * mlt_frame_get_alpha(mlt_frame self)
Properties class declaration.
interface declaration for all service classes
int32_t mlt_position
Definition mlt_types.h:163
void(* mlt_destructor)(void *)
pointer to destructor function
Definition mlt_types.h:212
mlt_image_format
The set of supported image formats.
Definition mlt_types.h:46
mlt_audio_format
The set of supported audio formats.
Definition mlt_types.h:63
Double-Ended Queue (deque) class.
Definition mlt_deque.c:50
Frame class.
Definition mlt_frame.h:74
mlt_deque stack_service
a general purpose data stack
Definition mlt_frame.h:103
int(* convert_image)(mlt_frame self, uint8_t **image, mlt_image_format *input, mlt_image_format output)
Convert the image format (callback function).
Definition mlt_frame.h:90
int is_processing
indicates if a frame is or was processed by the parallel consumer
Definition mlt_frame.h:104
struct mlt_properties_s parent
A frame extends properties.
Definition mlt_frame.h:75
mlt_deque stack_image
the image processing stack of operations and data
Definition mlt_frame.h:101
int(* convert_audio)(mlt_frame self, void **audio, mlt_audio_format *input, mlt_audio_format output)
Convert the audio format (callback function).
Definition mlt_frame.h:99
mlt_deque stack_audio
the audio processing stack of operations and data
Definition mlt_frame.h:102
Producer abstract service class.
Definition mlt_producer.h:70
Properties class.
Definition mlt_properties.h:37
Service abstract base class.
Definition mlt_service.h:58