Commit 771f49ea authored by Donald Haase's avatar Donald Haase
Browse files

Fixing issues with headers and one out-of-place function.

parent 950c5030
...@@ -9,14 +9,13 @@ ...@@ -9,14 +9,13 @@
* Authors: * * Authors: *
* Marc Dukette * Marc Dukette
**************************************************************************************/ **************************************************************************************/
#include "kos.h" #include <kos.h>
#include "AVIDecaps.h" #include "AviDecaps.h"
#include "inputmedia.h" #include "InputMedia.h"
videoinfo thisvid; videoinfo thisvid;
char data[256]; char data[256];
//#include "inputmedia.h"
/* /*
* Some useful functions * Some useful functions
*/ */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "AviDecaps.h" #include "AviDecaps.h"
#include "inputmedia.h" #include "InputMedia.h"
int CacheSize; int CacheSize;
videoinfo thisvid; videoinfo thisvid;
......
...@@ -234,72 +234,6 @@ static void CopyMBlockHorVerRound(unsigned char * Src, unsigned char * Dst, int ...@@ -234,72 +234,6 @@ static void CopyMBlockHorVerRound(unsigned char * Src, unsigned char * Dst, int
} }
} }
/**/
void recon_comp (unsigned char *src, unsigned char *dst, int lx, int w, int x, int y, int dx, int dy);
/**/
void reconstruct (int bx, int by, int mode)
{
int dx, dy, comp, sum;
int x, y, px, py;
x = bx + 1;
y = by + 1;
// Luma
px = bx << 4;
py = by << 4;
if (mode == INTER4V)
{
for (comp = 0; comp < 4; comp++)
{
dx = MV[x][y][comp][0];
dy = MV[x][y][comp][1];
recon_comp (frame_for[0], frame_ref[0], coded_picture_width, 8, px + ((comp & 1) << 3), py + ((comp & 2) << 2), dx, dy);
}
} else
{
dx = MV[x][y][0][0];
dy = MV[x][y][0][1];
recon_comp (frame_for[0], frame_ref[0], coded_picture_width, 16, px, py, dx, dy);
}
// Chr
px = bx << 3;
py = by << 3;
if (mode == INTER4V)
{
sum = MV[x][y][0][0] + MV[x][y][1][0] + MV[x][y][2][0] + MV[x][y][3][0];
if (sum == 0)
dx = 0;
else
dx = sign (sum) * (roundtab[abs (sum) & 0xF] + ((abs (sum) >> 4) <<1));
sum = MV[x][y][0][1] + MV[x][y][1][1] + MV[x][y][2][1] + MV[x][y][3][1];
if (sum == 0)
dy = 0;
else
dy = sign (sum) * (roundtab[abs (sum) & 0xF] + ((abs (sum) >> 4) <<1));
} else
{
dx = MV[x][y][0][0];
dy = MV[x][y][0][1];
// chroma rounding
dx = ((dx & 0x3) == 0 ? dx >> 1 : (dx >> 1) | 1);
dy = ((dy & 0x3) == 0 ? dy >> 1 : (dy >> 1) | 1);
}
recon_comp (frame_for[1], frame_ref[1], coded_picture_width>>1, 8, px, py, dx, dy);
recon_comp (frame_for[2], frame_ref[2], coded_picture_width>>1, 8, px, py, dx, dy);
}
/**/
static void recon_comp (unsigned char *src, unsigned char *dst, static void recon_comp (unsigned char *src, unsigned char *dst,
int lx, int w, int x, int lx, int w, int x,
int y, int dx, int dy) int y, int dx, int dy)
...@@ -365,3 +299,59 @@ static void recon_comp (unsigned char *src, unsigned char *dst, ...@@ -365,3 +299,59 @@ static void recon_comp (unsigned char *src, unsigned char *dst,
} }
} }
void reconstruct (int bx, int by, int mode)
{
int dx, dy, comp, sum;
int x, y, px, py;
x = bx + 1;
y = by + 1;
// Luma
px = bx << 4;
py = by << 4;
if (mode == INTER4V)
{
for (comp = 0; comp < 4; comp++)
{
dx = MV[x][y][comp][0];
dy = MV[x][y][comp][1];
recon_comp (frame_for[0], frame_ref[0], coded_picture_width, 8, px + ((comp & 1) << 3), py + ((comp & 2) << 2), dx, dy);
}
} else
{
dx = MV[x][y][0][0];
dy = MV[x][y][0][1];
recon_comp (frame_for[0], frame_ref[0], coded_picture_width, 16, px, py, dx, dy);
}
// Chr
px = bx << 3;
py = by << 3;
if (mode == INTER4V)
{
sum = MV[x][y][0][0] + MV[x][y][1][0] + MV[x][y][2][0] + MV[x][y][3][0];
if (sum == 0)
dx = 0;
else
dx = sign (sum) * (roundtab[abs (sum) & 0xF] + ((abs (sum) >> 4) <<1));
sum = MV[x][y][0][1] + MV[x][y][1][1] + MV[x][y][2][1] + MV[x][y][3][1];
if (sum == 0)
dy = 0;
else
dy = sign (sum) * (roundtab[abs (sum) & 0xF] + ((abs (sum) >> 4) <<1));
} else
{
dx = MV[x][y][0][0];
dy = MV[x][y][0][1];
// chroma rounding
dx = ((dx & 0x3) == 0 ? dx >> 1 : (dx >> 1) | 1);
dy = ((dy & 0x3) == 0 ? dy >> 1 : (dy >> 1) | 1);
}
recon_comp (frame_for[1], frame_ref[1], coded_picture_width>>1, 8, px, py, dx, dy);
recon_comp (frame_for[2], frame_ref[2], coded_picture_width>>1, 8, px, py, dx, dy);
}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# include "global1.h" # include "global1.h"
# include "huffman.h" # include "Huffman.h"
/* /*
* These are the Huffman code words for Layer III. * These are the Huffman code words for Layer III.
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
# include "bit.h" # include "bit.h"
# include "stream.h" # include "stream.h"
# include "frame.h" # include "frame.h"
# include "huffman.h" # include "Huffman.h"
# include "layer3.h" # include "layer3.h"
/* --- Layer III ----------------------------------------------------------- */ /* --- Layer III ----------------------------------------------------------- */
......
// MP3Reader.cpp : Defines the entry point for the DLL application. // MP3Reader.cpp : Defines the entry point for the DLL application.
// //
#include "kos.h" #include <kos.h>
#include "AVIDecaps.h" #include "AviDecaps.h"
#include "inputmedia.h" #include "InputMedia.h"
videoinfo mpsvid; videoinfo mpsvid;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define STRICT /* Strict type checking. */ #define STRICT /* Strict type checking. */
#include "pbdll.h" #include "pbdll.h"
#include "Dct.h" #include "dct.h"
#include "Huffman.h" #include "Huffman.h"
#include "Quantize.h" #include "Quantize.h"
#include "Reconstruct.h" #include "Reconstruct.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define STRICT /* Strict type checking. */ #define STRICT /* Strict type checking. */
#include "vfw_pb_interface.h" #include "vfw_PB_Interface.h"
#include "pbdll.h" #include "pbdll.h"
/**************************************************************************** /****************************************************************************
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "pbdll.h" #include "pbdll.h"
#include "BlockMapping.h" #include "BlockMapping.h"
#include "stdlib.h" #include "stdlib.h"
#include "vfw_pb_interface.h" #include "vfw_PB_Interface.h"
/**************************************************************************** /****************************************************************************
* Module constants. * Module constants.
***************************************************************************** *****************************************************************************
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define PBDLL #define PBDLL
#include "vp3d.h" #include "vp3d.h"
#include "vfw_pb_interface.h" #include "vfw_PB_Interface.h"
#include "pbdll.h" #include "pbdll.h"
/**/ /**/
#include "decore.h" #include "decore.h"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#ifndef DCT_HEADER #ifndef DCT_HEADER
#define DCT_HEADER #define DCT_HEADER
#include "quantize.h" #include "Quantize.h"
#include "type_aliases.h" #include "type_aliases.h"
/**************************************************************************** /****************************************************************************
* Constants * Constants
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
#define VAL_RANGE 256 #define VAL_RANGE 256
#include "rawtypes.h" #include "rawTypes.h"
#include "codec_common.h" #include "codec_common.h"
#include "huffman.h" #include "Huffman.h"
//#include "YUVtofromRGB.h" //#include "YUVtofromRGB.h"
/**************************************************************************** /****************************************************************************
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "pbdll.h" #include "pbdll.h"
#include "blockmapping.h" #include "blockmapping.h"
#include <math.h> #include <math.h>
#include "vfw_pb_interface.h" #include "vfw_PB_Interface.h"
//#include "VP31DVERSION.h" //#include "VP31DVERSION.h"
//#define CommentString "\nON2.COM VERSION VP31D " VP31DVERSION "\n" //#define CommentString "\nON2.COM VERSION VP31D " VP31DVERSION "\n"
//#pragma comment(exestr,CommentString) //#pragma comment(exestr,CommentString)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved. // Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
// //
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
#include "rawtypes.h" #include "rawTypes.h"
#ifndef vp3d_h #ifndef vp3d_h
#define vp3d_h 1 #define vp3d_h 1
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
//#include <png/png.h> //#include <png/png.h>
#include <jpeg/jpeg.h> #include <jpeg/jpeg.h>
#include <zlib/zlib.h> #include <zlib/zlib.h>
#include <zlib.h>
/* This module will manage the spiffy background effects */ /* This module will manage the spiffy background effects */
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
#include "MADDecoder/global1.h" #include "MADDecoder/global1.h"
#include "kos.h" #include <kos.h>
#include "MADDecoder/fixed.h" #include "MADDecoder/fixed.h"
#include "decore.h" #include "decore.h"
#include "avidecaps.h" #include "AviDecaps.h"
#include "yuv2rgb.h" #include "yuv2rgb.h"
#include <malloc.h> #include <malloc.h>
#include "math.h" #include "math.h"
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
//#include <png/png.h> //#include <png/png.h>
#include <jpeg/jpeg.h> #include <jpeg/jpeg.h>
#include <zlib/zlib.h> #include <zlib/zlib.h>
#include <zlib.h>
/* This module will manage the spiffy background effects */ /* This module will manage the spiffy background effects */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment