2
stores macroblock infos
3
Copyright (C) 2000 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
15
#ifndef __MACROBLOCK_H
16
#define __MACROBLOCK_H
18
#include "videoDecoder.h"
19
#include "decoderClass.h"
20
#include "motionVector.h"
22
#include "copyFunctions.h"
26
/* Macroblock structure. */
28
int mb_address; /* Macroblock address. */
29
int past_mb_addr; /* Previous mblock address. */
30
int motion_h_forw_code; /* Forw. horiz. motion vector code. */
31
unsigned int motion_h_forw_r; /* Used in decoding vectors. */
32
int motion_v_forw_code; /* Forw. vert. motion vector code. */
33
unsigned int motion_v_forw_r; /* Used in decdoinge vectors. */
34
int motion_h_back_code; /* Back horiz. motion vector code. */
35
unsigned int motion_h_back_r; /* Used in decoding vectors. */
36
int motion_v_back_code; /* Back vert. motion vector code. */
37
unsigned int motion_v_back_r; /* Used in decoding vectors. */
38
unsigned int cbp; /* Coded block pattern. */
39
int mb_intra; /* Intracoded mblock flag. */
40
int bpict_past_forw; /* Past B frame forw. vector flag. */
41
int bpict_past_back; /* Past B frame back vector flag. */
42
int past_intra_addr; /* Addr of last intracoded mblock. */
43
int recon_right_for_prev; /* Past right forw. vector. */
44
int recon_down_for_prev; /* Past down forw. vector. */
45
int recon_right_back_prev; /* Past right back vector. */
46
int recon_down_back_prev; /* Past down back vector. */
48
class VideoDecoder* vid_stream;
49
CopyFunctions* copyFunctions;
52
MacroBlock(class VideoDecoder* vid_stream);
54
int processMacroBlock(PictureArray* pictureArray);
55
int resetMacroBlock();
56
int resetPastMacroBlock();
59
int reconstruct(int& recon_right_for,
61
int& recon_right_back,
65
PictureArray* pictureArray);
67
void computeForwVector(int* recon_right_for_ptr,
68
int* recon_down_for_ptr);
70
void computeBackVector(int* recon_right_back_ptr,
71
int* recon_down_back_ptr);
73
int processSkippedPictures(PictureArray* pictureArray,
77
void ProcessSkippedPFrameMBlocks(YUVPicture* current,
82
void ProcessSkippedBFrameMBlocks(Picture* picture,
89
void ReconSkippedBlock(unsigned char* source,unsigned char* dest,
90
int row, int col,int row_size,
92
int right_half,int down_half,int width,