DSP Utilities
[DSP Context]

DSP Utilities. More...

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.

Detailed Description

DSP Utilities.

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.


Function Documentation

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.

Parameters:
ctx A DSP context
Parameters:
format Video format
Parameters:
src_1 Frame 1
Parameters:
src_2 Frame 2
Parameters:
dst Destination frame
Parameters:
factor Interpolation factor
Returns:
1 on success, 0 if an error occurred
If factor is 1.0, dst will be equal to src1, if factor is 0.0, dst will be equal to src2.
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.

Parameters:
ctx An initialized dsp context
Parameters:
frame An audio frame
Parameters:
format The format of the frame
Returns:
1 on success, 0 if an error occurred
If the quality is at least GAVL_QUALITY_MIN, this function never fails.
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.

Parameters:
ctx An initialized dsp context
Parameters:
frame A video frame
Parameters:
format The format of the frame
Returns:
1 on success, 0 if an error occurred
This function swaps endianess for pixelformats, which have multibyte numbers as components. For 32 bit long formats with 8 bit components, it swaps the pixels as if they were 32 bit integers. For all other formats, it does nothing.
If the quality is at least GAVL_QUALITY_MIN, this function never fails.
Generated on Fri Dec 16 02:06:32 2011 for gavl by  doxygen 1.6.3