summaryrefslogtreecommitdiff
path: root/recordmydesktop/src
diff options
context:
space:
mode:
authorenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-09-13 06:03:29 +0000
committerenselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-09-13 06:03:29 +0000
commit1801820c4d8678eccfb393183f1e55e21671307d (patch)
tree4663fb6cf9213c869784e75cc842def3c4315088 /recordmydesktop/src
parent690fe877b71040ce8253246baa334d90c7828a6b (diff)
src/load_cache.c: Expand the unnecessary INIT_FRAME()-macro.
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@519 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r--recordmydesktop/src/load_cache.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/recordmydesktop/src/load_cache.c b/recordmydesktop/src/load_cache.c
index e61b8f6..5130aa9 100644
--- a/recordmydesktop/src/load_cache.c
+++ b/recordmydesktop/src/load_cache.c
@@ -38,17 +38,6 @@
#define Y_UNIT_BYTES 0x0100
#define UV_UNIT_BYTES 0x0040
-#define INIT_FRAME(frame_t,fheader_t,yuv_t,\
- YBlocks_t,UBlocks_t,VBlocks_t){\
- (frame_t)->header=(fheader_t);\
- (frame_t)->YBlocks=YBlocks_t;\
- (frame_t)->UBlocks=UBlocks_t;\
- (frame_t)->VBlocks=VBlocks_t;\
- (frame_t)->YData=malloc((yuv_t)->y_width*(yuv_t)->y_height);\
- (frame_t)->UData=malloc((yuv_t)->uv_width*(yuv_t)->uv_height);\
- (frame_t)->VData=malloc((yuv_t)->uv_width*(yuv_t)->uv_height);\
-};
-
//The frame after retrieval.
//Based on the Header information
@@ -175,9 +164,16 @@ void *LoadCache(ProgData *pdata){
u_int32_t YBlocks[(yuv->y_width*yuv->y_height)/Y_UNIT_BYTES],
UBlocks[(yuv->uv_width*yuv->uv_height)/UV_UNIT_BYTES],
VBlocks[(yuv->uv_width*yuv->uv_height)/UV_UNIT_BYTES];
- //we allocate the frame that we will use
- INIT_FRAME(&frame,&fheader,yuv,
- YBlocks,UBlocks,VBlocks);
+
+ // We allocate the frame that we will use
+ frame.header = &fheader;
+ frame.YBlocks = YBlocks;
+ frame.UBlocks = UBlocks;
+ frame.VBlocks = VBlocks;
+ frame.YData = malloc(yuv->y_width * yuv->y_height);
+ frame.UData = malloc(yuv->uv_width * yuv->uv_height);
+ frame.VData = malloc(yuv->uv_width * yuv->uv_height);
+
//and the we open our files
if(!pdata->args.zerocompression){
ifp=gzopen(pdata->cache_data->imgdata,"rb");
© All Rights Reserved