img->w2 = dinfo.image_width * dinfo.comp_info[2].h_samp_factor / dinfo.max_h_samp_factor;
img->h2 = dinfo.image_height * dinfo.comp_info[2].v_samp_factor / dinfo.max_v_samp_factor;
+ img->samp_h0 = dinfo.comp_info[0].h_samp_factor;
+ img->samp_v0 = dinfo.comp_info[0].v_samp_factor;
+
+ img->samp_h1 = dinfo.comp_info[1].h_samp_factor;
+ img->samp_v1 = dinfo.comp_info[1].v_samp_factor;
+
+ img->samp_h2 = dinfo.comp_info[2].h_samp_factor;
+ img->samp_v2 = dinfo.comp_info[2].v_samp_factor;
+
img->data_y = (JSAMPLE*)memalign(16, dinfo.comp_info[0].height_in_blocks * dinfo.comp_info[0].width_in_blocks * DCTSIZE * DCTSIZE);
img->data_cb = (JSAMPLE*)memalign(16, dinfo.comp_info[1].height_in_blocks * dinfo.comp_info[1].width_in_blocks * DCTSIZE * DCTSIZE);
img->data_cr = (JSAMPLE*)memalign(16, dinfo.comp_info[2].height_in_blocks * dinfo.comp_info[2].width_in_blocks * DCTSIZE * DCTSIZE);
dst->w2 = width * samp_h2 / max_samp_h;
dst->h2 = height * samp_v2 / max_samp_v;
+ dst->samp_h0 = samp_h0;
+ dst->samp_v0 = samp_v0;
+
+ dst->samp_h1 = samp_h1;
+ dst->samp_v1 = samp_v1;
+
+ dst->samp_h2 = samp_h2;
+ dst->samp_v2 = samp_v2;
+
unsigned dstride0 = (dst->w0 + DCTSIZE-1) & ~(DCTSIZE-1);
unsigned dstride1 = (dst->w1 + DCTSIZE-1) & ~(DCTSIZE-1);
unsigned dstride2 = (dst->w2 + DCTSIZE-1) & ~(DCTSIZE-1);
unsigned w1, h1;
unsigned w2, h2;
+ /* Sampling factors */
+ unsigned samp_h0, samp_v0;
+ unsigned samp_h1, samp_v1;
+ unsigned samp_h2, samp_v2;
+
/* The data itself */
JSAMPLE *data_y, *data_cb, *data_cr;
} qscale_img;