Use g2d to allocate buffers, resize and CSC.