openbsd-ports/graphics/ffmpeg/patches/patch-libavcodec_libfaad_c
jakemsr 64bd5edcd7 update to 20080118
relevent Changelog entries:

+- Monkey's Audio demuxer and decoder
+- additional SPARC (VIS) optimizations
+- AMV audio and video decoder
+- DNxHD encoder
+- H.264 PAFF decoding
+- Nellymoser ASAO decoder
+- Beam Software SIFF demuxer and decoder
+- libvorbis Vorbis decoding removed in favor of native decoder
+- IntraX8 (J-Frame) subdecoder for WMV2 and VC-1
+- Ogg muxer
+- PC Paintbrush PCX decoder
+- Sun Rasterfile decoder
+- TechnoTrend PVA demuxer
+- Linux Media Labs MPEG-4 (LMLM4) demuxer

port changes:

disable ff_fdct_sse2 usage on i386 and libpostproc's
temporal noise reduction filter, since they both regularly
cause segfaults.

ok deanna@, brad@

tested by a few others, thanks
2008-01-26 01:56:02 +00:00

115 lines
5.5 KiB
Plaintext

$OpenBSD: patch-libavcodec_libfaad_c,v 1.2 2008/01/26 01:56:02 jakemsr Exp $
--- libavcodec/libfaad.c.orig Fri Jan 18 01:21:38 2008
+++ libavcodec/libfaad.c Sat Jan 19 18:35:16 2008
@@ -73,21 +73,21 @@ typedef struct {
short *sample_buffer,
unsigned long *samples);
#else
- unsigned char FAADAPI (*faacDecSetConfiguration)(faacDecHandle hDecoder,
+ uint8_t FAADAPI (*faacDecSetConfiguration)(faacDecHandle hDecoder,
faacDecConfigurationPtr config);
- long FAADAPI (*faacDecInit)(faacDecHandle hDecoder,
- unsigned char *buffer,
- unsigned long buffer_size,
- unsigned long *samplerate,
- unsigned char *channels);
- char FAADAPI (*faacDecInit2)(faacDecHandle hDecoder, unsigned char *pBuffer,
- unsigned long SizeOfDecoderSpecificInfo,
- unsigned long *samplerate, unsigned char *channels);
+ int32_t FAADAPI (*faacDecInit)(faacDecHandle hDecoder,
+ uint8_t *buffer,
+ uint32_t buffer_size,
+ uint32_t *samplerate,
+ uint8_t *channels);
+ int8_t FAADAPI (*faacDecInit2)(faacDecHandle hDecoder, uint8_t *pBuffer,
+ uint32_t SizeOfDecoderSpecificInfo,
+ uint32_t *samplerate, uint8_t *channels);
void *FAADAPI (*faacDecDecode)(faacDecHandle hDecoder,
faacDecFrameInfo *hInfo,
- unsigned char *buffer,
- unsigned long buffer_size);
- char* FAADAPI (*faacDecGetErrorMessage)(unsigned char errcode);
+ uint8_t *buffer,
+ uint32_t buffer_size);
+ char* FAADAPI (*faacDecGetErrorMessage)(uint8_t errcode);
#endif
void FAADAPI (*faacDecClose)(faacDecHandle hDecoder);
@@ -95,7 +95,7 @@ typedef struct {
} FAACContext;
-static const unsigned long faac_srates[] =
+static const uint32_t faac_srates[] =
{
96000, 88200, 64000, 48000, 44100, 32000,
24000, 22050, 16000, 12000, 11025, 8000
@@ -119,11 +119,11 @@ static void channel_setup(AVCodecContext *avctx)
static int faac_init_mp4(AVCodecContext *avctx)
{
FAACContext *s = avctx->priv_data;
- unsigned long samplerate;
+ uint32_t samplerate;
#ifndef FAAD2_VERSION
unsigned long channels;
#else
- unsigned char channels;
+ uint8_t channels;
#endif
int r = 0;
@@ -134,7 +134,7 @@ static int faac_init_mp4(AVCodecContext *avctx)
if (r < 0){
av_log(avctx, AV_LOG_ERROR,
"faacDecInit2 failed r:%d sr:%ld ch:%ld s:%d\n",
- r, samplerate, (long)channels, avctx->extradata_size);
+ r, (long)samplerate, (long)channels, avctx->extradata_size);
} else {
avctx->sample_rate = samplerate;
avctx->channels = channels;
@@ -176,8 +176,8 @@ static int faac_decode_frame(AVCodecContext *avctx,
#else
if(!s->init){
- unsigned long srate;
- unsigned char channels;
+ uint32_t srate;
+ uint8_t channels;
int r = s->faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels);
if(r < 0){
av_log(avctx, AV_LOG_ERROR, "faac: codec init failed: %s\n",
@@ -190,7 +190,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
s->init = 1;
}
- out = s->faacDecDecode(s->faac_handle, &frame_info, (unsigned char*)buf, (unsigned long)buf_size);
+ out = s->faacDecDecode(s->faac_handle, &frame_info, buf, buf_size);
if (frame_info.error > 0) {
av_log(avctx, AV_LOG_ERROR, "faac: frame decoding failed: %s\n",
@@ -259,16 +259,16 @@ static int faac_decode_init(AVCodecContext *avctx)
dfaac(Decode, (int FAADAPI (*)(faacDecHandle, unsigned char*,
unsigned long*, short*, unsigned long*)));
#else
- dfaac(SetConfiguration, (unsigned char FAADAPI (*)(faacDecHandle,
+ dfaac(SetConfiguration, (uint8_t FAADAPI (*)(faacDecHandle,
faacDecConfigurationPtr)));
- dfaac(Init, (long FAADAPI (*)(faacDecHandle, unsigned char*,
- unsigned long, unsigned long*, unsigned char*)));
- dfaac(Init2, (char FAADAPI (*)(faacDecHandle, unsigned char*,
- unsigned long, unsigned long*,
- unsigned char*)));
+ dfaac(Init, (int32_t FAADAPI (*)(faacDecHandle, uint8_t*,
+ uint32_t, uint32_t*, uint8_t*)));
+ dfaac(Init2, (int8_t FAADAPI (*)(faacDecHandle, uint8_t*,
+ uint32_t, uint32_t*,
+ uint8_t*)));
dfaac(Decode, (void *FAADAPI (*)(faacDecHandle, faacDecFrameInfo*,
- unsigned char*, unsigned long)));
- dfaac(GetErrorMessage, (char* FAADAPI (*)(unsigned char)));
+ uint8_t*, uint32_t)));
+ dfaac(GetErrorMessage, (int8_t* FAADAPI (*)(uint8_t)));
#endif
#undef dfacc