int decode(void* d0) { if (m_frame_i >= cf()) return 1; memcpy(d0, m_video.data() + cb_image() * m_frame_i, cb_image()); m_frame_i++; return 0; }
void Cshp_file::decode(void* d) const { shp_images::t_image_data* p; if (shp_images::load_shp(*this, p)) return; byte* w = reinterpret_cast<byte*>(d); for (int i = 0; i < cf(); i++) { memcpy(w, p->get(i), cb_image()); w += cb_image(); } shp_images::destroy_shp(p); }
void Ctmp_ra_file::decode(void* d) const { int cx = get_cblocks_x(); int cy = get_cblocks_y(); int c_tiles = get_c_tiles(); if (cx == 1 && cy == 1) cy = c_tiles; memset(d, 0, cb_image()); int i = 0; for (int ty = 0; ty < cy; ty++) { for (int tx = 0; tx < cx; tx++) { if (get_index1()[i] != 0xff) { const byte* r = get_image(i); byte* w = reinterpret_cast<byte*>(d) + 24 * (tx + 24 * cx * ty); for (int y = 0; y < 24; y++) { memcpy(w, r, 24); r += 24; w += 24 * cx; } } i++; } } }