Revert "Fix gcc2 build on Mac OS X Lion"
now that Alex Smith has fixed the build system on Lion this
work-around can now be reverted.
This reverts commit 7c369a4b3f
.
This commit is contained in:
parent
c15ad4e6b9
commit
78341a9351
@ -102,14 +102,6 @@ protected:
|
|||||||
void SetupErrorBuffer(int x, int y, int width);
|
void SetupErrorBuffer(int x, int y, int width);
|
||||||
void DitherFloydSteinberg(uchar* destination,
|
void DitherFloydSteinberg(uchar* destination,
|
||||||
const uchar* source, int x, int y, int width);
|
const uchar* source, int x, int y, int width);
|
||||||
// Do nothing method to get around a bug in
|
|
||||||
// the gcc2 cross-compiler built on Mac OS X
|
|
||||||
// Lion where a compiler error occurs when
|
|
||||||
// assigning a member function pointer to NULL
|
|
||||||
// or 0: cast specifies signature type.
|
|
||||||
// However, this should be legal according to
|
|
||||||
// the C++03 standard.
|
|
||||||
void DitherNone(uchar*, const uchar*, int, int, int) {};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
Resampler::Resampler(uint32 src_format, uint32 dst_format)
|
Resampler::Resampler(uint32 src_format, uint32 dst_format)
|
||||||
:
|
:
|
||||||
fFunc(&Resampler::no_conversion)
|
fFunc(0)
|
||||||
{
|
{
|
||||||
if (dst_format == media_raw_audio_format::B_AUDIO_FLOAT) {
|
if (dst_format == media_raw_audio_format::B_AUDIO_FLOAT) {
|
||||||
switch (src_format) {
|
switch (src_format) {
|
||||||
@ -81,7 +81,7 @@ Resampler::~Resampler()
|
|||||||
status_t
|
status_t
|
||||||
Resampler::InitCheck() const
|
Resampler::InitCheck() const
|
||||||
{
|
{
|
||||||
return fFunc != &Resampler::no_conversion ? B_OK : B_ERROR;
|
return fFunc != 0 ? B_OK : B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,15 +65,6 @@ private:
|
|||||||
int32 srcSampleOffset, int32 srcSampleCount,
|
int32 srcSampleOffset, int32 srcSampleCount,
|
||||||
void* dest, int32 destSampleOffset,
|
void* dest, int32 destSampleOffset,
|
||||||
int32 destSampleCount, float gain);
|
int32 destSampleCount, float gain);
|
||||||
// Do nothing method to get around a bug in
|
|
||||||
// the gcc2 cross-compiler built on Mac OS X
|
|
||||||
// Lion where a compiler error occurs when
|
|
||||||
// assigning a member function pointer to NULL
|
|
||||||
// or 0: cast specifies signature type.
|
|
||||||
// However, this should be legal according to
|
|
||||||
// the C++03 standard.
|
|
||||||
void no_conversion(const void*, int32, int32, void*,
|
|
||||||
int32, int32, float) {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,21 +31,21 @@ ToGray(ColorRGB32 c)
|
|||||||
static uint
|
static uint
|
||||||
GetRedValue(ColorRGB32 c)
|
GetRedValue(ColorRGB32 c)
|
||||||
{
|
{
|
||||||
return c.little.red;
|
return c.little.red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static uint
|
static uint
|
||||||
GetGreenValue(ColorRGB32 c)
|
GetGreenValue(ColorRGB32 c)
|
||||||
{
|
{
|
||||||
return c.little.green;
|
return c.little.green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static uint
|
static uint
|
||||||
GetBlueValue(ColorRGB32 c)
|
GetBlueValue(ColorRGB32 c)
|
||||||
{
|
{
|
||||||
return c.little.blue;
|
return c.little.blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -56,11 +56,11 @@ Halftone::Halftone(color_space colorSpace, double gamma, double min,
|
|||||||
fGray = ToGray;
|
fGray = ToGray;
|
||||||
SetPlanes(kPlaneMonochrome1);
|
SetPlanes(kPlaneMonochrome1);
|
||||||
SetBlackValue(kHighValueMeansBlack);
|
SetBlackValue(kHighValueMeansBlack);
|
||||||
|
|
||||||
InitFloydSteinberg();
|
InitFloydSteinberg();
|
||||||
|
|
||||||
CreateGammaTable(gamma, min);
|
CreateGammaTable(gamma, min);
|
||||||
|
|
||||||
if (ditherType == kTypeFloydSteinberg) {
|
if (ditherType == kTypeFloydSteinberg) {
|
||||||
fDither = &Halftone::DitherFloydSteinberg;
|
fDither = &Halftone::DitherFloydSteinberg;
|
||||||
return;
|
return;
|
||||||
@ -79,13 +79,13 @@ Halftone::Halftone(color_space colorSpace, double gamma, double min,
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (colorSpace) {
|
switch (colorSpace) {
|
||||||
case B_RGB32:
|
case B_RGB32:
|
||||||
case B_RGB32_BIG:
|
case B_RGB32_BIG:
|
||||||
fDither = &Halftone::DitherRGB32;
|
fDither = &Halftone::DitherRGB32;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fDither = &Halftone::DitherNone;
|
fDither = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,3 +364,4 @@ Halftone::DitherFloydSteinberg(uchar *destination, const uchar* source0,
|
|||||||
*destination = ConvertUsingBlackValue(cur);
|
*destination = ConvertUsingBlackValue(cur);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user