|
Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
frames.h File Reference#include "ansi.h"
#include "mtypes.h"
#include "mheaders.h"
#include "frame.h"
Go to the source code of this file.
|
Data Structures |
struct | dct_data_tye_struct |
struct | FrameTableStruct |
Defines |
#define | I_FRAME 1 |
#define | P_FRAME 2 |
#define | B_FRAME 3 |
#define | LUM_BLOCK 0 |
#define | CHROM_BLOCK 1 |
#define | CR_BLOCK 2 |
#define | CB_BLOCK 3 |
#define | MOTION_FORWARD 0 |
#define | MOTION_BACKWARD 1 |
#define | MOTION_INTERPOLATE 2 |
#define | USE_HALF 0 |
#define | USE_FULL 1 |
#define | FORW_F_CODE fCode |
#define | BACK_F_CODE fCode |
#define | FORW_F (1 << (FORW_F_CODE - 1)) |
#define | BACK_F (1 << (BACK_F_CODE - 1)) |
#define | RANGE_NEG (-(1 << (3 + FORW_F_CODE))) |
#define | RANGE_POS ((1 << (3 + FORW_F_CODE))-1) |
#define | MODULUS (1 << (4 + FORW_F_CODE)) |
#define | ORIGINAL_FRAME 0 |
#define | DECODED_FRAME 1 |
#define | FRAME_TYPE(num) framePattern[num % framePatternLen] |
#define | int_ceil_div(a, b, c) ((b*(c = a/b) < a) ? (c+1) : c) |
#define | int_floor_div(a, b, c) ((b*(c = a/b) > a) ? (c-1) : c) |
#define | GEN_I_BLOCK(frameType, frame, bb, mbAI, qscale) |
#define | BLOCK_TO_FRAME_COORD(bx1, bx2, x1, x2) |
#define | MOTION_TO_FRAME_COORD(bx1, bx2, mx1, mx2, x1, x2) |
#define | COORD_IN_FRAME(fy, fx, type) |
#define | ENCODE_MOTION_VECTOR(x, y, xq, yq, xr, yr, f) |
#define | DoQuant(bit, src, dest) |
Typedefs |
typedef FrameTableStruct | FrameTable |
typedef dct_data_tye_struct | dct_data_type |
Functions |
void EncodeYDC | _ANSI_ARGS_ ((int32 dc_term, int32 *pred_term, BitBucket *bb)) |
void ComputeBMotionLumBlock | _ANSI_ARGS_ ((MpegFrame *prev, MpegFrame *next, int by, int bx, int mode, int fmy, int fmx, int bmy, int bmx, LumBlock motionBlock)) |
int BMotionSearch | _ANSI_ARGS_ ((LumBlock currentBlock, MpegFrame *prev, MpegFrame *next, int by, int bx, int *fmy, int *fmx, int *bmy, int *bmx, int oldMode)) |
void ComputeDiffDCTs | _ANSI_ARGS_ ((MpegFrame *current, MpegFrame *prev, int by, int bx, int my, int mx, int *pattern)) |
int ComputeDiffDCTBlock | _ANSI_ARGS_ ((Block current, Block dest, Block motionBlock)) |
void ComputeMotionBlock | _ANSI_ARGS_ ((uint8 **prev, int by, int bx, int my, int mx, Block motionBlock)) |
void ComputeMotionLumBlock | _ANSI_ARGS_ ((MpegFrame *prevFrame, int by, int bx, int my, int mx, LumBlock motionBlock)) |
int32 ComputeBlockMAD | _ANSI_ARGS_ ((Block current, Block prev)) |
void GenIFrame | _ANSI_ARGS_ ((BitBucket *bb, MpegFrame *mf)) |
void GenPFrame | _ANSI_ARGS_ ((BitBucket *bb, MpegFrame *current, MpegFrame *prev)) |
void GenBFrame | _ANSI_ARGS_ ((BitBucket *bb, MpegFrame *curr, MpegFrame *prev, MpegFrame *next)) |
void AllocDctBlocks | _ANSI_ARGS_ ((void)) |
float ShowIFrameSummary | _ANSI_ARGS_ ((int inputFrameBits, int32 totalBits, FILE *fpointer)) |
int32 LumBlockMAD | _ANSI_ARGS_ ((LumBlock currentBlock, LumBlock motionBlock, int32 bestSoFar)) |
int32 LumMotionError | _ANSI_ARGS_ ((LumBlock currentBlock, MpegFrame *prev, int by, int bx, int my, int mx, int32 bestSoFar)) |
int32 LumAddMotionError | _ANSI_ARGS_ ((LumBlock currentBlock, LumBlock blockSoFar, MpegFrame *prev, int by, int bx, int my, int mx, int32 bestSoFar)) |
int32 LumMotionErrorA | _ANSI_ARGS_ ((LumBlock current, MpegFrame *prevFrame, int by, int bx, int my, int mx, int32 bestSoFar)) |
int32 LumMotionErrorSubSampled | _ANSI_ARGS_ ((LumBlock currentBlock, MpegFrame *prevFrame, int by, int bx, int my, int mx, int startY, int startX)) |
void BlockComputeSNR | _ANSI_ARGS_ ((MpegFrame *current, float *snr, float *psnr)) |
Variables |
int | pixelFullSearch |
int | searchRangeP |
int | searchRangeB |
int | qscaleI |
int | gopSize |
int | slicesPerFrame |
int | blocksPerSlice |
int | referenceFrame |
int | specificsOn |
int | quietTime |
boolean | realQuiet |
boolean | frameSummary |
boolean | printSNR |
boolean | printMSE |
boolean | decodeRefFrames |
int | fCodeI |
int | fCodeP |
int | fCodeB |
boolean | forceEncodeLast |
int | TIME_RATE |
Define Documentation
#define BACK_F (1 << (BACK_F_CODE - 1))
|
|
#define BACK_F_CODE fCode
|
|
#define BLOCK_TO_FRAME_COORD |
( |
bx1, |
|
|
bx2, |
|
|
x1, |
|
|
x2 |
|
) |
|
|
|
Value: { \
x1 = (bx1)*DCTSIZE; \
x2 = (bx2)*DCTSIZE; \
}
Definition at line 244 of file frames.h. |
#define COORD_IN_FRAME |
( |
fy, |
|
|
fx, |
|
|
type |
|
) |
|
|
|
Value: ((type == LUM_BLOCK) ? \
((fy >= 0) && (fx >= 0) && (fy < Fsize_y) && (fx < Fsize_x)) : \
((fy >= 0) && (fx >= 0) && (fy < (Fsize_y>>1)) && (fx < (Fsize_x>>1))))
Definition at line 254 of file frames.h. |
|
Value: if (pattern & bit) { \
switch (Mpost_QuantZigBlock(src, dest, QScale, FALSE)) { \
case MPOST_NON_ZERO: \
break; \
case MPOST_ZERO: \
pattern ^= bit; \
break; \
case MPOST_OVERFLOW: \
if (QScale != 31) { \
QScale++; \
overflowChange = TRUE; \
overflowValue++; \
goto calc_blocks; \
} \
break; \
} \
}
Definition at line 288 of file frames.h. |
#define ENCODE_MOTION_VECTOR |
( |
x, |
|
|
y, |
|
|
xq, |
|
|
yq, |
|
|
xr, |
|
|
yr, |
|
|
f |
|
) |
|
|
|
Value: { \
int tempC; \
\
if ( x < RANGE_NEG ) tempX = x + MODULUS; \
else if ( x > RANGE_POS ) tempX = x - MODULUS; \
else tempX = x; \
\
if ( y < RANGE_NEG ) tempY = y + MODULUS; \
else if ( y > RANGE_POS ) tempY = y - MODULUS; \
else tempY = y; \
\
if ( tempX >= 0 ) { \
xq = int_ceil_div(tempX, f, tempC); \
xr = f - 1 + tempX - xq*f; \
} else { \
xq = int_floor_div(tempX, f, tempC); \
xr = f - 1 - tempX + xq*f; \
} \
\
if ( tempY >= 0 ) { \
yq = int_ceil_div(tempY, f, tempC); \
yr = f - 1 + tempY - yq*f; \
} else { \
yq = int_floor_div(tempY, f, tempC); \
yr = f - 1 - tempY + yq*f; \
} \
}
Definition at line 259 of file frames.h. |
#define FORW_F (1 << (FORW_F_CODE - 1))
|
|
#define FORW_F_CODE fCode
|
|
#define int_ceil_div |
( |
a, |
|
|
b, |
|
|
c |
|
) |
((b*(c = a/b) < a) ? (c+1) : c)
|
|
#define int_floor_div |
( |
a, |
|
|
b, |
|
|
c |
|
) |
((b*(c = a/b) > a) ? (c-1) : c)
|
|
#define MODULUS (1 << (4 + FORW_F_CODE))
|
|
#define MOTION_BACKWARD 1
|
|
#define MOTION_INTERPOLATE 2
|
|
#define MOTION_TO_FRAME_COORD |
( |
bx1, |
|
|
bx2, |
|
|
mx1, |
|
|
mx2, |
|
|
x1, |
|
|
x2 |
|
) |
|
|
|
Value: { \
x1 = (bx1)*DCTSIZE+(mx1); \
x2 = (bx2)*DCTSIZE+(mx2); \
}
Definition at line 249 of file frames.h. |
#define RANGE_NEG (-(1 << (3 + FORW_F_CODE)))
|
|
#define RANGE_POS ((1 << (3 + FORW_F_CODE))-1)
|
|
Typedef Documentation
Function Documentation
void AllocDctBlocks _ANSI_ARGS_ |
( |
(void) |
|
) |
|
|
Variable Documentation
|