Functions | |
GAVL_PUBLIC int | gavl_dsp_interpolate_video_frame (gavl_dsp_context_t *ctx, gavl_video_format_t *format, gavl_video_frame_t *src_1, gavl_video_frame_t *src_2, gavl_video_frame_t *dst, float factor) |
Do a linear interpolation of a video frame. | |
GAVL_PUBLIC int | gavl_dsp_audio_frame_swap_endian (gavl_dsp_context_t *ctx, gavl_audio_frame_t *frame, const gavl_audio_format_t *format) |
Swap endianess an audio frame. | |
GAVL_PUBLIC int | gavl_dsp_video_frame_swap_endian (gavl_dsp_context_t *ctx, gavl_video_frame_t *frame, const gavl_video_format_t *format) |
Swap endianess a video frame. | |
void | gavl_dsp_video_frame_shift_bits (gavl_dsp_context_t *ctx, gavl_video_frame_t *frame, const gavl_video_format_t *format, int bits) |
Shift bits in a video frame. |
These are some utility functions, which use a DSP context but operate on higher level structures like video frames. As usual, these are supported for any format.
GAVL_PUBLIC int gavl_dsp_interpolate_video_frame | ( | gavl_dsp_context_t * | ctx, | |
gavl_video_format_t * | format, | |||
gavl_video_frame_t * | src_1, | |||
gavl_video_frame_t * | src_2, | |||
gavl_video_frame_t * | dst, | |||
float | factor | |||
) |
Do a linear interpolation of a video frame.
ctx | A DSP context | |
format | Video format | |
src_1 | Frame 1 | |
src_2 | Frame 2 | |
dst | Destination frame | |
factor | Interpolation factor |
If the quality is at least GAVL_QUALITY_MIN, this function never fails.
GAVL_PUBLIC int gavl_dsp_audio_frame_swap_endian | ( | gavl_dsp_context_t * | ctx, | |
gavl_audio_frame_t * | frame, | |||
const gavl_audio_format_t * | format | |||
) |
Swap endianess an audio frame.
ctx | An initialized dsp context | |
frame | An audio frame | |
format | The format of the frame |
GAVL_PUBLIC int gavl_dsp_video_frame_swap_endian | ( | gavl_dsp_context_t * | ctx, | |
gavl_video_frame_t * | frame, | |||
const gavl_video_format_t * | format | |||
) |
Swap endianess a video frame.
ctx | An initialized dsp context | |
frame | A video frame | |
format | The format of the frame |
If the quality is at least GAVL_QUALITY_MIN, this function never fails.
void gavl_dsp_video_frame_shift_bits | ( | gavl_dsp_context_t * | ctx, | |
gavl_video_frame_t * | frame, | |||
const gavl_video_format_t * | format, | |||
int | bits | |||
) |
Shift bits in a video frame.
ctx | An initialized dsp context | |
frame | A video frame | |
format | The format of the frame | |
bits | Number of bits to shift each component |
Since 1.5.0