#include #include #ifndef _FRAME_C #define _FRAME_C #include "frame.h" #include "picinfo.h" template Frame::Frame() { m = 0; n = 0; ydata = udata = vdata = 0; } template Frame::Frame(int rows, int cols) { m = rows; n = cols; ydata = new T_t[m*n]; udata = new T_t[ (m*n) >> 2]; vdata = new T_t[ (m*n) >> 2]; } template Frame::~Frame() { delete[] ydata; delete[] udata; delete[] vdata; } template T_t* Frame::Getydata() { return ydata; } template T_t* Frame::Getudata() { return udata; } template T_t* Frame::Getvdata() { return vdata; } template int Frame::GetRows() { return m; } template int Frame::GetCols() { return n; } template int Frame::sizecmp(Frame *mat) { if( m == mat->m && n == mat->n) return 1; else return 0; } #endif