Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* -*- Mode: C; tab-width: 4 -*- */
/* ifs --- modified iterated functions system */

#if !defined( lint ) && !defined( SABER )
static const char sccsid[] = "@(#)ifs.c 5.00 2002/04/11 baffe";
#endif
//#if !defined( lint ) && !defined( SABER )
//static const char sccsid[] = "@(#)ifs.c 5.00 2002/04/11 baffe";
//#endif

/*-
* Copyright (c) 1997 by Massimino Pascal <Pascal.Massimon@ens.fr>
Expand Down Expand Up @@ -35,9 +35,9 @@ static const char sccsid[] = "@(#)ifs.c 5.00 2002/04/11 baffe";

//#ifdef STANDALONE

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>

#include "ifs.h"

Expand Down Expand Up @@ -142,7 +142,7 @@ struct Fractal_Struct
// GC dbuf_gc;
};

static FRACTAL *Root = (FRACTAL *) NULL, *Cur_F;
static FRACTAL *Root = (FRACTAL *) nullptr, *Cur_F;

/* Used by the Trace recursive method */
IFSPoint *Buf;
Expand Down Expand Up @@ -185,13 +185,13 @@ Random_Simis (FRACTAL * F, SIMI * Cur, int i)
static void
free_ifs_buffers (FRACTAL * Fractal)
{
if (Fractal->m_buffer1 != NULL) {
if (Fractal->m_buffer1 != nullptr) {
(void) free ((void *) Fractal->m_buffer1);
Fractal->m_buffer1 = (IFSPoint *) NULL;
Fractal->m_buffer1 = (IFSPoint *) nullptr;
}
if (Fractal->m_buffer2 != NULL) {
if (Fractal->m_buffer2 != nullptr) {
(void) free ((void *) Fractal->m_buffer2);
Fractal->m_buffer2 = (IFSPoint *) NULL;
Fractal->m_buffer2 = (IFSPoint *) nullptr;
}
}

Expand All @@ -209,12 +209,12 @@ init_ifs (int width, int height)
{
// printf ("initing ifs\n");

if (Root == NULL) {
if (Root == nullptr) {
Root = (FRACTAL *) malloc (sizeof (FRACTAL));
if (Root == NULL)
if (Root == nullptr)
return;
Root->m_buffer1 = (IFSPoint *) NULL;
Root->m_buffer2 = (IFSPoint *) NULL;
Root->m_buffer1 = (IFSPoint *) nullptr;
Root->m_buffer2 = (IFSPoint *) nullptr;
}
FRACTAL *Fractal = Root;

Expand Down Expand Up @@ -260,12 +260,12 @@ init_ifs (int width, int height)
Fractal->m_maxPt *= Fractal->m_nbSimi;

if ((Fractal->m_buffer1 = (IFSPoint *) calloc (Fractal->m_maxPt,
sizeof (IFSPoint))) == NULL) {
sizeof (IFSPoint))) == nullptr) {
free_ifs (Fractal);
return;
}
if ((Fractal->m_buffer2 = (IFSPoint *) calloc (Fractal->m_maxPt,
sizeof (IFSPoint))) == NULL) {
sizeof (IFSPoint))) == nullptr) {
free_ifs (Fractal);
return;
}
Expand Down Expand Up @@ -381,8 +381,8 @@ Draw_Fractal ( void /* ModeInfo * mi */ )
FRACTAL *F = Root;
int i = 0;
int j = 0;
SIMI *Cur = NULL;
SIMI *Simi = NULL;
SIMI *Cur = nullptr;
SIMI *Simi = nullptr;

for (Cur = F->m_components, i = F->m_nbSimi; i; --i, Cur++) {
Cur->m_fCx = DBL_To_F_PT (Cur->m_dCx);
Expand Down Expand Up @@ -454,11 +454,11 @@ Draw_Fractal ( void /* ModeInfo * mi */ )
IFSPoint *
draw_ifs ( /* ModeInfo * mi */ int *nbPoints)
{
if (Root == NULL)
return NULL;
if (Root == nullptr)
return nullptr;
FRACTAL *F = Root; // [/*MI_SCREEN(mi)*/0];
if (F->m_buffer1 == NULL)
return NULL;
if (F->m_buffer1 == nullptr)
return nullptr;

DBL u = (DBL) (F->m_count) * (DBL) (F->m_speed) / 1000.0;
DBL uu = u * u;
Expand Down Expand Up @@ -528,10 +528,10 @@ draw_ifs ( /* ModeInfo * mi */ int *nbPoints)
void
release_ifs ()
{
if (Root != NULL) {
if (Root != nullptr) {
free_ifs(Root);
(void) free ((void *) Root);
Root = (FRACTAL *) NULL;
Root = (FRACTAL *) nullptr;
}
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
* lines.c
*/

#include <cmath>
#include <cstdio>
#include <cstdlib>

#include "lines.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "goom_tools.h"
#include "drawmethods.h"
#include "goom_tools.h"

extern unsigned int resolx, c_resoly;

Expand Down Expand Up @@ -95,7 +96,7 @@ static guint32 getcouleur (int mode)
void
goom_lines_set_res (GMLine * gml, int rx, int ry)
{
if (gml != NULL) {
if (gml != nullptr) {
//int i;

gml->screenX = rx;
Expand Down Expand Up @@ -194,13 +195,13 @@ goom_lines_free (GMLine ** l)
free ((*l)->points);
free ((*l)->points2);
free (*l);
*l = NULL;
*l = nullptr;
}

void
goom_lines_draw (GMLine * line, const gint16 data[512], unsigned int *p)
{
if (line != NULL) {
if (line != nullptr) {
guint32 color = line->color;
GMUnitPointer *pt = &(line->points[0]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>

#include "surf3d.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

void grid3d_free(grid3d **grid)
{
free ((*grid)->surf.vertex);
free ((*grid)->surf.svertex);
free (*grid);
*grid = NULL;
*grid = nullptr;
}

grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <stdlib.h>
#include <cstdlib>

#include "v3d.h"
#include "surf3d.h"
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/visualisations/goom/v3d.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef _V3D_H
#define _V3D_H

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>

#include "mathtools.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* Prototypes to keep gcc from spewing warnings */
void zoom_filter_mmx (int prevX, int prevY, const unsigned int *expix1, unsigned int *expix2, const int *brutS, const int *brutD, int buffratio, int precalCoef[16][16]);
int zoom_filter_mmx_supported (void);
#include "goom/zoom_filters.h"

#ifdef MMX
#define BUFFPOINTNB 16
Expand All @@ -15,7 +13,9 @@ int zoom_filter_mmx_supported (void);
// faire : a / sqrtperte <=> a >> PERTEDEC
#define PERTEDEC 4

extern "C" {
#include "libavutil/cpu.h"
}

int zoom_filter_mmx_supported () {
return (av_get_cpu_flags() & AV_CPU_FLAG_MMX);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include "mythconfig.h"

/* Prototypes to keep gcc from spewing warnings */
void zoom_filter_xmmx (int prevX, int prevY, const unsigned int *expix1, const unsigned int *expix2, const int *brutS, const int *brutD, int buffratio, int precalCoef[16][16]);
int zoom_filter_xmmx_supported (void);

#include "goom/zoom_filters.h"

#if defined(MMX) && !defined(ARCH_X86_64)
/* a definir pour avoir exactement le meme resultat que la fonction C
Expand All @@ -25,7 +22,9 @@ int zoom_filter_xmmx_supported (void);

//#define MMX_TRACE
#include "mmx.h"
extern "C" {
#include "libavutil/cpu.h"
}

int zoom_filter_xmmx_supported () {
return (av_get_cpu_flags() & AV_CPU_FLAG_SSE) >> 3;
Expand Down Expand Up @@ -255,7 +254,7 @@ int zoom_filter_xmmx_supported () {
return 0;
}
void zoom_filter_xmmx (int prevX, int prevY,
const unsigned int *expix1, const unsigned int *expix2,
const unsigned int *expix1, unsigned int *expix2,
const int *brutS, const int *brutD, int buffratio,
int precalCoef[16][16])
{
Expand Down
5 changes: 5 additions & 0 deletions mythtv/libs/libmythtv/visualisations/goom/zoom_filters.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
void zoom_filter_xmmx (int prevX, int prevY, const unsigned int *expix1, unsigned int *expix2, const int *brutS, const int *brutD, int buffratio, int precalCoef[16][16]);
int zoom_filter_xmmx_supported (void);
void zoom_filter_mmx (int prevX, int prevY, const unsigned int *expix1, unsigned int *expix2, const int *brutS, const int *brutD, int buffratio, int precalCoef[16][16]);
int zoom_filter_mmx_supported (void);

2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/visualisations/videovisualgoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
#include "opengl/mythrenderopengl.h"
#endif

extern "C" {
#include "goom/goom_tools.h"
#include "goom/goom_core.h"
}

#include "videovisualgoom.h"

Expand Down