summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad.c2
-rw-r--r--libmpcodecs/ad.h2
-rw-r--r--libmpcodecs/ad_acm.c5
-rw-r--r--libmpcodecs/ad_dmo.c3
-rw-r--r--libmpcodecs/ad_dshow.c3
-rw-r--r--libmpcodecs/ad_dvdpcm.c3
-rw-r--r--libmpcodecs/ad_faad.c2
-rw-r--r--libmpcodecs/ad_ffmpeg.c30
-rw-r--r--libmpcodecs/ad_hwac3.c3
-rw-r--r--libmpcodecs/ad_hwmpa.c1
-rw-r--r--libmpcodecs/ad_liba52.c16
-rw-r--r--libmpcodecs/ad_libdv.c3
-rw-r--r--libmpcodecs/ad_msadpcm.c2
-rw-r--r--libmpcodecs/ad_pcm.c55
-rw-r--r--libmpcodecs/ad_realaud.c39
-rw-r--r--libmpcodecs/ad_twin.c1
-rw-r--r--libmpcodecs/ae_lame.c184
-rw-r--r--libmpcodecs/ae_lavc.c48
-rw-r--r--libmpcodecs/dec_audio.c71
-rw-r--r--libmpcodecs/dec_teletext.c7
-rw-r--r--libmpcodecs/dec_video.c186
-rw-r--r--libmpcodecs/dec_video.h3
-rw-r--r--libmpcodecs/img_format.c2
-rw-r--r--libmpcodecs/vd.c156
-rw-r--r--libmpcodecs/vd.h12
-rw-r--r--libmpcodecs/vd_dmo.c9
-rw-r--r--libmpcodecs/vd_dshow.c9
-rw-r--r--libmpcodecs/vd_ffmpeg.c324
-rw-r--r--libmpcodecs/vd_libmpeg2.c4
-rw-r--r--libmpcodecs/vd_realvid.c23
-rw-r--r--libmpcodecs/vd_theora.c3
-rw-r--r--libmpcodecs/vd_vfw.c3
-rw-r--r--libmpcodecs/vd_xanim.c31
-rw-r--r--libmpcodecs/ve.c4
-rw-r--r--libmpcodecs/ve_lavc.c9
-rw-r--r--libmpcodecs/ve_nuv.c2
-rw-r--r--libmpcodecs/ve_raw.c3
-rw-r--r--libmpcodecs/ve_vfw.c13
-rw-r--r--libmpcodecs/vf.c95
-rw-r--r--libmpcodecs/vf.h24
-rw-r--r--libmpcodecs/vf_ass.c143
-rw-r--r--libmpcodecs/vf_crop.c8
-rw-r--r--libmpcodecs/vf_cropdetect.c3
-rw-r--r--libmpcodecs/vf_divtc.c2
-rw-r--r--libmpcodecs/vf_expand.c49
-rw-r--r--libmpcodecs/vf_filmdint.c5
-rw-r--r--libmpcodecs/vf_fixpts.c1
-rw-r--r--libmpcodecs/vf_format.c1
-rw-r--r--libmpcodecs/vf_framestep.c3
-rw-r--r--libmpcodecs/vf_geq.c4
-rw-r--r--libmpcodecs/vf_gradfun.c2
-rw-r--r--libmpcodecs/vf_lavc.c5
-rw-r--r--libmpcodecs/vf_lavcdeint.c1
-rw-r--r--libmpcodecs/vf_mcdeint.c5
-rw-r--r--libmpcodecs/vf_noformat.c1
-rw-r--r--libmpcodecs/vf_palette.c3
-rw-r--r--libmpcodecs/vf_pp.c33
-rw-r--r--libmpcodecs/vf_qp.c2
-rw-r--r--libmpcodecs/vf_scale.c6
-rw-r--r--libmpcodecs/vf_spp.c5
-rw-r--r--libmpcodecs/vf_test.c3
-rw-r--r--libmpcodecs/vf_tfields.c27
-rw-r--r--libmpcodecs/vf_tile.c5
-rw-r--r--libmpcodecs/vf_vo.c106
-rw-r--r--libmpcodecs/vf_yadif.c10
-rw-r--r--libmpcodecs/vf_yvu9.c3
66 files changed, 924 insertions, 907 deletions
diff --git a/libmpcodecs/ad.c b/libmpcodecs/ad.c
index 5febd7e5b9..f81f11ef0f 100644
--- a/libmpcodecs/ad.c
+++ b/libmpcodecs/ad.c
@@ -29,8 +29,6 @@
#include "libmpdemux/stheader.h"
#include "ad.h"
-float drc_level = 1.0;
-
/* Missed vorbis, mad, dshow */
//extern ad_functions_t mpcodecs_ad_null;
diff --git a/libmpcodecs/ad.h b/libmpcodecs/ad.h
index 7127801b9d..9b1daf9e48 100644
--- a/libmpcodecs/ad.h
+++ b/libmpcodecs/ad.h
@@ -22,8 +22,6 @@
#include "mpc_info.h"
#include "libmpdemux/stheader.h"
-extern float drc_level;
-
typedef mp_codec_info_t ad_info_t;
/* interface of video decoder drivers */
diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c
index b179515754..46af4fae7d 100644
--- a/libmpcodecs/ad_acm.c
+++ b/libmpcodecs/ad_acm.c
@@ -22,7 +22,6 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "libmpdemux/aviprint.h"
#include "loader/wineacm.h"
@@ -75,7 +74,7 @@ static int preinit(sh_audio_t *sh_audio)
priv->o_wf = malloc(sizeof(WAVEFORMATEX));
if (!priv->o_wf)
{
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_ACMiniterror);
+ mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"Could not load/initialize Win32/ACM audio codec (missing DLL file?).\n");
return 0;
}
@@ -106,7 +105,7 @@ static int preinit(sh_audio_t *sh_audio)
else
mp_msg(MSGT_WIN32, MSGL_ERR, "ACM_Decoder: acmStreamOpen error: %d\n",
(int)ret);
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_ACMiniterror);
+ mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"Could not load/initialize Win32/ACM audio codec (missing DLL file?).\n");
return 0;
}
mp_msg(MSGT_WIN32, MSGL_V, "Audio codec opened OK! ;-)\n");
diff --git a/libmpcodecs/ad_dmo.c b/libmpcodecs/ad_dmo.c
index d89e9d646c..1501c21078 100644
--- a/libmpcodecs/ad_dmo.c
+++ b/libmpcodecs/ad_dmo.c
@@ -22,7 +22,6 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "ad_internal.h"
#include "libaf/reorder_ch.h"
@@ -52,7 +51,7 @@ static int preinit(sh_audio_t *sh_audio)
audio_output_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1);
if(!(ds_adec=DMO_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf,chans)))
{
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_audio->codec->dll);
+ mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh_audio->codec->dll);
return 0;
}
sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
diff --git a/libmpcodecs/ad_dshow.c b/libmpcodecs/ad_dshow.c
index e88ed0c2fa..8fb94660a4 100644
--- a/libmpcodecs/ad_dshow.c
+++ b/libmpcodecs/ad_dshow.c
@@ -22,7 +22,6 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "ad_internal.h"
@@ -49,7 +48,7 @@ static int preinit(sh_audio_t *sh_audio)
DS_AudioDecoder* ds_adec;
if(!(ds_adec=DS_AudioDecoder_Open(sh_audio->codec->dll,&sh_audio->codec->guid,sh_audio->wf)))
{
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingDLLcodec,sh_audio->codec->dll);
+ mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"ERROR: Could not open required DirectShow codec %s.\n",sh_audio->codec->dll);
return 0;
}
sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
diff --git a/libmpcodecs/ad_dvdpcm.c b/libmpcodecs/ad_dvdpcm.c
index b0bb169d95..41f6a1426d 100644
--- a/libmpcodecs/ad_dvdpcm.c
+++ b/libmpcodecs/ad_dvdpcm.c
@@ -22,7 +22,6 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "ad_internal.h"
static const ad_info_t info =
@@ -56,7 +55,7 @@ static int init(sh_audio_t *sh)
sh->samplesize = 2;
break;
case 1:
- mp_msg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_SamplesWanted);
+ mp_tmsg(MSGT_DECAUDIO, MSGL_INFO, "Samples of this format are needed to improve support. Please contact the developers.\n");
sh->i_bps = sh->channels * sh->samplerate * 5 / 2;
case 2:
sh->sample_format = AF_FORMAT_S24_BE;
diff --git a/libmpcodecs/ad_faad.c b/libmpcodecs/ad_faad.c
index 4f62765257..14fe9a6280 100644
--- a/libmpcodecs/ad_faad.c
+++ b/libmpcodecs/ad_faad.c
@@ -172,7 +172,7 @@ static int init(sh_audio_t *sh)
sh->samplesize=2;
//sh->o_bps = sh->samplesize*faac_channels*faac_samplerate;
if(!sh->i_bps) {
- mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: compressed input bitrate missing, assuming 128kbit/s!\n");
+ mp_msg(MSGT_DECAUDIO, MSGL_V, "FAAD: compressed input bitrate missing, assuming 128kbit/s!\n");
sh->i_bps = 128*1000/8; // XXX: HACK!!! ::atmos
} else
mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: got %dkbit/s bitrate from MP4 header!\n",sh->i_bps*8/1000);
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index 8dc7ab3ed0..8578314bc6 100644
--- a/libmpcodecs/ad_ffmpeg.c
+++ b/libmpcodecs/ad_ffmpeg.c
@@ -22,7 +22,7 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
+#include "options.h"
#include "ad_internal.h"
#include "libaf/reorder_ch.h"
@@ -54,6 +54,7 @@ static int preinit(sh_audio_t *sh)
static int init(sh_audio_t *sh_audio)
{
+ struct MPOpts *opts = sh_audio->opts;
int tries = 0;
int x;
AVCodecContext *lavc_context;
@@ -68,14 +69,14 @@ static int init(sh_audio_t *sh_audio)
lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_audio->codec->dll);
if(!lavc_codec){
- mp_msg(MSGT_DECAUDIO,MSGL_ERR,MSGTR_MissingLAVCcodec,sh_audio->codec->dll);
+ mp_tmsg(MSGT_DECAUDIO,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n",sh_audio->codec->dll);
return 0;
}
lavc_context = avcodec_alloc_context();
sh_audio->context=lavc_context;
- lavc_context->drc_scale = drc_level;
+ lavc_context->drc_scale = opts->drc_level;
lavc_context->sample_rate = sh_audio->samplerate;
lavc_context->bit_rate = sh_audio->i_bps * 8;
if(sh_audio->wf){
@@ -109,7 +110,7 @@ static int init(sh_audio_t *sh_audio)
/* open it */
if (avcodec_open(lavc_context, lavc_codec) < 0) {
- mp_msg(MSGT_DECAUDIO,MSGL_ERR, MSGTR_CantOpenCodec);
+ mp_tmsg(MSGT_DECAUDIO,MSGL_ERR, "Could not open codec.\n");
return 0;
}
mp_msg(MSGT_DECAUDIO,MSGL_V,"INFO: libavcodec \"%s\" init OK!\n", lavc_codec->name);
@@ -144,19 +145,18 @@ static int init(sh_audio_t *sh_audio)
mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Unsupported sample format\n");
return 0;
}
- if(sh_audio->wf){
+ /* If the audio is AAC the container level data may be unreliable
+ * because of SBR handling problems (possibly half real sample rate at
+ * container level). Default AAC decoding with ad_faad has used codec-level
+ * values for a long time without generating complaints so it should be OK.
+ */
+ if (sh_audio->wf && lavc_context->codec_id != CODEC_ID_AAC) {
// If the decoder uses the wrong number of channels all is lost anyway.
// sh_audio->channels=sh_audio->wf->nChannels;
-
- if (lavc_context->codec_id == CODEC_ID_AAC &&
- sh_audio->samplerate == 2*sh_audio->wf->nSamplesPerSec) {
- mp_msg(MSGT_DECAUDIO, MSGL_WARN,
- "Ignoring broken container sample rate for ACC with SBR\n");
- } else if (sh_audio->wf->nSamplesPerSec)
- sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
-
+ if (sh_audio->wf->nSamplesPerSec)
+ sh_audio->samplerate=sh_audio->wf->nSamplesPerSec;
if (sh_audio->wf->nAvgBytesPerSec)
- sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
+ sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
}
sh_audio->samplesize=af_fmt2bits(sh_audio->sample_format)/ 8;
return 1;
@@ -167,7 +167,7 @@ static void uninit(sh_audio_t *sh)
AVCodecContext *lavc_context = sh->context;
if (avcodec_close(lavc_context) < 0)
- mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantCloseCodec);
+ mp_tmsg(MSGT_DECVIDEO, MSGL_ERR, "Could not close codec.\n");
av_freep(&lavc_context->extradata);
av_freep(&lavc_context);
}
diff --git a/libmpcodecs/ad_hwac3.c b/libmpcodecs/ad_hwac3.c
index 119839b9bc..f45fd00a17 100644
--- a/libmpcodecs/ad_hwac3.c
+++ b/libmpcodecs/ad_hwac3.c
@@ -28,10 +28,9 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "mpbswap.h"
#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
+#include "ffmpeg_files/intreadwrite.h"
#include "ad_internal.h"
diff --git a/libmpcodecs/ad_hwmpa.c b/libmpcodecs/ad_hwmpa.c
index 30caa9b0f9..87c00b6f42 100644
--- a/libmpcodecs/ad_hwmpa.c
+++ b/libmpcodecs/ad_hwmpa.c
@@ -24,7 +24,6 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "libaf/af_format.h"
#include "ad_internal.h"
diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c
index 9b749a70ec..0cc282776d 100644
--- a/libmpcodecs/ad_liba52.c
+++ b/libmpcodecs/ad_liba52.c
@@ -24,9 +24,8 @@
#include <assert.h>
#include "config.h"
-
+#include "options.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "mpbswap.h"
#include "ad_internal.h"
@@ -134,8 +133,9 @@ int channels=0;
static sample_t dynrng_call (sample_t c, void *data)
{
-// fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, (double)drc_level, (double)pow((double)c, drc_level));
- return pow((double)c, drc_level);
+ struct MPOpts *opts = data;
+ //fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, opts->drc_level, pow(c, opts->drc_level));
+ return pow(c, opts->drc_level);
}
@@ -176,6 +176,7 @@ static int a52_resample_float(float *in, int16_t *out)
static int init(sh_audio_t *sh_audio)
{
+ struct MPOpts *opts = sh_audio->opts;
uint32_t a52_accel=0;
sample_t level=a52_level, bias=384;
int flags=0;
@@ -203,12 +204,11 @@ static int init(sh_audio_t *sh_audio)
return 0;
}
-
/* Init a52 dynrng */
- if (drc_level < 0.001) {
+ if (opts->drc_level < 0.001) {
/* level == 0 --> no compression, init library without callback */
a52_drc_action = DRC_NO_COMPRESSION;
- } else if (drc_level > 0.999) {
+ } else if (opts->drc_level > 0.999 || opts->drc_level < 1.001) {
/* level == 1 --> full compression, do nothing at all (library default = full compression) */
a52_drc_action = DRC_NO_ACTION;
} else {
@@ -327,7 +327,7 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
if (a52_drc_action == DRC_NO_COMPRESSION)
a52_dynrng(a52_state, NULL, NULL);
else
- a52_dynrng(a52_state, dynrng_call, NULL);
+ a52_dynrng(a52_state, dynrng_call, sh_audio->opts);
}
len=0;
diff --git a/libmpcodecs/ad_libdv.c b/libmpcodecs/ad_libdv.c
index 8485a8883f..cbcb46efea 100644
--- a/libmpcodecs/ad_libdv.c
+++ b/libmpcodecs/ad_libdv.c
@@ -25,7 +25,6 @@
#include "config.h"
#include "mp_msg.h"
-#include "help_mp.h"
#include "img_format.h"
@@ -102,7 +101,7 @@ static int decode_audio(sh_audio_t *audio, unsigned char *buf, int minlen, int m
dv_parse_header(decoder, dv_audio_frame);
if(xx!=decoder->frame_size)
- mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_MPCODECS_AudioFramesizeDiffers,
+ mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[AD_LIBDV] Warning! Audio framesize differs! read=%d hdr=%d.\n",
xx, decoder->frame_size);
if (dv_decode_full_audio(decoder, dv_audio_frame,(int16_t**) audioBuffers))
diff --git a/libmpcodecs/ad_msadpcm.c b/libmpcodecs/ad_msadpcm.c
index 64dc39c485..162c7c04d3 100644
--- a/libmpcodecs/ad_msadpcm.c
+++ b/libmpcodecs/ad_msadpcm.c
@@ -30,7 +30,7 @@
#include "config.h"
#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
+#include "ffmpeg_files/intreadwrite.h"
#include "mpbswap.h"
#include "ad_internal.h"
diff --git a/libmpcodecs/ad_pcm.c b/libmpcodecs/ad_pcm.c
index 0dd50e0c65..29e78d69af 100644
--- a/libmpcodecs/ad_pcm.c
+++ b/libmpcodecs/ad_pcm.c
@@ -19,7 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <stdbool.h>
+#include "talloc.h"
#include "config.h"
#include "ad_internal.h"
#include "libaf/af_format.h"
@@ -33,6 +35,13 @@ static const ad_info_t info = {
""
};
+struct ad_pcm_context {
+ unsigned char *buffer;
+ int buffer_pos;
+ int buffer_len;
+ int buffer_size;
+};
+
LIBAD_EXTERN(pcm)
static int init(sh_audio_t * sh_audio)
@@ -114,6 +123,7 @@ static int init(sh_audio_t * sh_audio)
}
if (!sh_audio->samplesize) // this would cause MPlayer to hang later
sh_audio->samplesize = 2;
+ sh_audio->context = talloc_zero(NULL, struct ad_pcm_context);
return 1;
}
@@ -125,12 +135,17 @@ static int preinit(sh_audio_t *sh)
static void uninit(sh_audio_t *sh)
{
+ talloc_free(sh->context);
}
static int control(sh_audio_t *sh, int cmd, void *arg, ...)
{
+ struct ad_pcm_context *ctx = sh->context;
int skip;
switch (cmd) {
+ case ADCTRL_RESYNC_STREAM:
+ ctx->buffer_len = 0;
+ return true;
case ADCTRL_SKIP_FRAME:
skip = sh->i_bps / 16;
skip = skip & (~3);
@@ -143,13 +158,45 @@ static int control(sh_audio_t *sh, int cmd, void *arg, ...)
static int decode_audio(sh_audio_t *sh_audio, unsigned char *buf, int minlen,
int maxlen)
{
- unsigned len = sh_audio->channels * sh_audio->samplesize;
- len = (minlen + len - 1) / len * len;
- if (len > maxlen)
+ int len = sh_audio->channels * sh_audio->samplesize;
+ minlen = (minlen + len - 1) / len * len;
+ if (minlen > maxlen)
// if someone needs hundreds of channels adjust audio_out_minsize
// based on channels in preinit()
return -1;
- len = demux_read_data(sh_audio->ds, buf, len);
+
+ len = 0;
+ struct ad_pcm_context *ctx = sh_audio->context;
+ while (len < minlen) {
+ if (ctx->buffer_len - ctx->buffer_pos <= 0) {
+ double pts;
+ unsigned char *ptr;
+ int plen = ds_get_packet_pts(sh_audio->ds, &ptr, &pts);
+ if (plen < 0)
+ break;
+ if (ctx->buffer_size < plen) {
+ talloc_free(ctx->buffer);
+ ctx->buffer = talloc_size(ctx, plen);
+ ctx->buffer_size = plen;
+ }
+ memcpy(ctx->buffer, ptr, plen);
+ ctx->buffer_len = plen;
+ ctx->buffer_pos = 0;
+ if (pts != MP_NOPTS_VALUE) {
+ sh_audio->pts = pts;
+ sh_audio->pts_bytes = 0;
+ }
+ }
+ int from_stored = ctx->buffer_len - ctx->buffer_pos;
+ if (from_stored > minlen - len)
+ from_stored = minlen - len;
+ memcpy(buf + len, ctx->buffer + ctx->buffer_pos, from_stored);
+ ctx->buffer_pos += from_stored;
+ sh_audio->pts_bytes += from_stored;
+ len += from_stored;
+ }
+ if (len == 0)
+ len = -1; // The loop above only exits at error/EOF
if (len > 0 && sh_audio->channels >= 5) {
reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT,
AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c
index 1d475f8dda..0b7fb219f7 100644
--- a/libmpcodecs/ad_realaud.c
+++ b/libmpcodecs/ad_realaud.c
@@ -26,7 +26,6 @@
#ifdef HAVE_LIBDL
#include <dlfcn.h>
#endif
-#include "help_mp.h"
#include "path.h"
#include "ad_internal.h"
@@ -42,46 +41,16 @@ static const ad_info_t info = {
LIBAD_EXTERN(realaud)
-/* These functions are required for loading Real binary libs.
- * Add forward declarations to avoid warnings with -Wmissing-prototypes. */
-void *__builtin_new(unsigned long size);
-void __builtin_delete(void *ize);
-void *__builtin_vec_new(unsigned long size);
-void __builtin_vec_delete(void *mem);
-void __pure_virtual(void);
-
-void *__builtin_new(unsigned long size)
-{
+void *__builtin_new(unsigned long size) {
return malloc(size);
}
-void __builtin_delete(void* ize)
-{
+// required for cook's uninit:
+void __builtin_delete(void* ize) {
free(ize);
}
-void *__builtin_vec_new(unsigned long size)
-{
- return malloc(size);
-}
-
-void __builtin_vec_delete(void *mem)
-{
- free(mem);
-}