MythTV
master
|
All toFloat variants require 16 byte aligned input and output buffers on x86 for SSE optimised operation The SSE code processes 16 bytes at a time and leaves any remainder for the C. More...
#include <libmyth/audio/audiooutpututil.h>
Static Public Member Functions | |
static bool | has_optimized_SIMD () |
Returns true if the processor supports MythTV's optimized SIMD for AudioOutputUtil/AudioConvert. More... | |
static void | AdjustVolume (void *buffer, int len, int volume, bool music, bool upmix) |
Adjust the volume of samples. More... | |
static void | MuteChannel (int obits, int channels, int ch, void *buffer, int bytes) |
Mute individual channels through mono->stereo duplication. More... | |
static char * | GeneratePinkFrames (char *frames, int channels, int channel, int count, int bits=16) |
static int | DecodeAudio (AVCodecContext *ctx, uint8_t *buffer, int &data_size, const AVPacket *pkt) |
DecodeAudio Decode an audio packet, and compact it if data is planar Return negative error code if an error occurred during decoding or the number of bytes consumed from the input AVPacket data_size contains the size of decoded data copied into buffer. More... | |
static int | toFloat (AudioFormat format, void *out, const void *in, int bytes) |
Convert integer samples to floats. More... | |
static int | fromFloat (AudioFormat format, void *out, const void *in, int bytes) |
Convert float samples to integers. More... | |
static void | MonoToStereo (void *dst, const void *src, int samples) |
Convert a mono stream to stereo by copying and interleaving samples. More... | |
static void | DeinterleaveSamples (AudioFormat format, int channels, uint8_t *output, const uint8_t *input, int data_size) |
Deinterleave input samples Deinterleave audio samples and compact them. More... | |
static void | InterleaveSamples (AudioFormat format, int channels, uint8_t *output, const uint8_t *const *input, int data_size) |
Interleave input samples Planar audio is contained in array of pointers Interleave audio samples (convert from planar format) More... | |
static void | InterleaveSamples (AudioFormat format, int channels, uint8_t *output, const uint8_t *input, int data_size) |
Interleave input samples Interleave audio samples (convert from planar format) More... | |
All toFloat variants require 16 byte aligned input and output buffers on x86 for SSE optimised operation The SSE code processes 16 bytes at a time and leaves any remainder for the C.
Definition at line 12 of file audiooutpututil.h.
|
static |
Returns true if the processor supports MythTV's optimized SIMD for AudioOutputUtil/AudioConvert.
Currently, only SSE2 is implemented.
Definition at line 52 of file audiooutpututil.cpp.
Referenced by AvFormatDecoder::DecoderWillDownmix().
|
static |
Adjust the volume of samples.
Makes a crude attempt to normalise the relative volumes of PCM from mythmusic, PCM from video and upmixed AC-3
Definition at line 97 of file audiooutpututil.cpp.
Referenced by AudioOutputBase::AddData().
|
static |
Mute individual channels through mono->stereo duplication.
Mute given channel (left or right) by copying right or left channel over.
Definition at line 175 of file audiooutpututil.cpp.
Referenced by AudioOutputBase::GetAudioData().
|
static |
Definition at line 188 of file audiooutpututil.cpp.
Referenced by AudioTestThread::run().
|
static |
DecodeAudio Decode an audio packet, and compact it if data is planar Return negative error code if an error occurred during decoding or the number of bytes consumed from the input AVPacket data_size contains the size of decoded data copied into buffer.
Definition at line 232 of file audiooutpututil.cpp.
Referenced by MythRAOPConnection::decodeAudioPacket().
|
static |
Convert integer samples to floats.
Consumes 'bytes' bytes from in and returns the numer of bytes written to out
Definition at line 66 of file audiooutpututil.cpp.
Referenced by AudioOutputBase::AddData(), and MythAVFormatWriter::WriteAudioFrame().
|
static |
Convert float samples to integers.
Consumes 'bytes' bytes from in and returns the numer of bytes written to out
Definition at line 77 of file audiooutpututil.cpp.
Referenced by AudioOutputDigitalEncoder::Encode(), and AudioOutputBase::GetAudioData().
|
static |
Convert a mono stream to stereo by copying and interleaving samples.
Definition at line 86 of file audiooutpututil.cpp.
Referenced by AudioOutputBase::CopyWithUpmix().
|
static |
Deinterleave input samples Deinterleave audio samples and compact them.
Definition at line 304 of file audiooutpututil.cpp.
Referenced by AudioOutputDigitalEncoder::Encode(), and MythAVFormatWriter::WriteAudioFrame().
|
static |
Interleave input samples Planar audio is contained in array of pointers Interleave audio samples (convert from planar format)
Definition at line 316 of file audiooutpututil.cpp.
Referenced by DecodeAudio().
|
static |
Interleave input samples Interleave audio samples (convert from planar format)
Definition at line 327 of file audiooutpututil.cpp.