picture->curref = new (uint8_t *)[3]; picture->curorg = new (uint8_t *)[3]; picture->pred   = new (uint8_t *)[3];
picture->curref = new uint8_t *[3]; picture->curorg = new uint8_t *[3]; picture->pred   = new uint8_t *[3];
static void init_pict_data( Picture *picture ){	int i,j;	/* Allocate buffers for picture transformation */	picture->blocks =         static_cast<DCTblock*>(            bufalloc(mb_per_pict*block_count*sizeof(DCTblock)));	picture->qblocks =		static_cast<DCTblock *>(            bufalloc(mb_per_pict*block_count*sizeof(DCTblock)));    DCTblock *blocks = picture->blocks;    DCTblock *qblocks = picture->qblocks;    for (j=0; j<opt->enc_height2; j+=16)    {        for (i=0; i<opt->enc_width; i+=16)        {            picture->mbinfo.push_back(MacroBlock(*picture, i,j,                                                  blocks,qblocks ));            blocks += block_count;            qblocks += block_count;        }    }	picture->curref = new (uint8_t *)[3];	picture->curorg = new (uint8_t *)[3];	picture->pred   = new (uint8_t *)[3];	for( i = 0 ; i<3; i++)	{		int size =  (i==0) ? lum_buffer_size : chrom_buffer_size;		picture->curref[i] = static_cast<uint8_t *>(bufalloc(size));		picture->curorg[i] = NULL;		picture->pred[i]   = static_cast<uint8_t *>(bufalloc(size));	}	/* The (non-existent) previous encoding using an as-yet un-used	   picture encoding data buffers is "completed"	*/	sync_guard_init( &picture->completion, 1 );}