mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Issue #2311 - Part 2 - Link ffmpeg real DFT functions
This commit is contained in:
parent
4610b9fd55
commit
289020a670
3 changed files with 36 additions and 0 deletions
|
|
@ -147,6 +147,9 @@ FFmpegLibWrapper::Link()
|
|||
AV_FUNC(avcodec_free_frame, AV_FUNC_54)
|
||||
AV_FUNC(avcodec_send_packet, AV_FUNC_58)
|
||||
AV_FUNC(avcodec_receive_frame, AV_FUNC_58)
|
||||
AV_FUNC_OPTION(av_rdft_init, AV_FUNC_AVCODEC_ALL)
|
||||
AV_FUNC_OPTION(av_rdft_calc, AV_FUNC_AVCODEC_ALL)
|
||||
AV_FUNC_OPTION(av_rdft_end, AV_FUNC_AVCODEC_ALL)
|
||||
AV_FUNC(av_log_set_level, AV_FUNC_AVUTIL_ALL)
|
||||
AV_FUNC(av_malloc, AV_FUNC_AVUTIL_ALL)
|
||||
AV_FUNC(av_freep, AV_FUNC_AVUTIL_ALL)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef __FFmpegLibWrapper_h__
|
||||
#define __FFmpegLibWrapper_h__
|
||||
|
||||
#include "FFmpegRDFTTypes.h" // for AvRdftInitFn, etc.
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Types.h"
|
||||
|
||||
|
|
@ -75,6 +76,11 @@ struct FFmpegLibWrapper
|
|||
int (*avcodec_send_packet)(AVCodecContext* avctx, const AVPacket* avpkt);
|
||||
int (*avcodec_receive_frame)(AVCodecContext* avctx, AVFrame* frame);
|
||||
|
||||
// libavcodec optional
|
||||
AvRdftInitFn av_rdft_init;
|
||||
AvRdftCalcFn av_rdft_calc;
|
||||
AvRdftEndFn av_rdft_end;
|
||||
|
||||
// libavutil
|
||||
void (*av_log_set_level)(int level);
|
||||
void* (*av_malloc)(size_t size);
|
||||
|
|
|
|||
27
dom/media/platforms/ffmpeg/FFmpegRDFTTypes.h
Normal file
27
dom/media/platforms/ffmpeg/FFmpegRDFTTypes.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef FFmpegRDFTTypes_h
|
||||
#define FFmpegRDFTTypes_h
|
||||
|
||||
struct RDFTContext;
|
||||
|
||||
typedef float FFTSample;
|
||||
|
||||
enum RDFTransformType {
|
||||
DFT_R2C,
|
||||
IDFT_C2R,
|
||||
IDFT_R2C,
|
||||
DFT_C2R,
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
typedef RDFTContext* (*AvRdftInitFn)(int nbits, enum RDFTransformType trans);
|
||||
typedef void (*AvRdftCalcFn)(RDFTContext *s, FFTSample *data);
|
||||
typedef void (*AvRdftEndFn)(RDFTContext *s);
|
||||
|
||||
}
|
||||
|
||||
#endif // FFmpegRDFTTypes_h
|
||||
Loading…
Add table
Add a link
Reference in a new issue