41 int srcW =
desc->src->width;
42 int dstW =
desc->dst->width;
43 int xInc = instance->
xInc;
46 for (
i = 0;
i < sliceH; ++
i) {
47 uint8_t **
src =
desc->src->plane[0].line;
48 uint8_t ** dst =
desc->dst->plane[0].line;
49 int src_pos = sliceY+
i -
desc->src->plane[0].sliceY;
50 int dst_pos = sliceY+
i -
desc->dst->plane[0].sliceY;
53 if (
c->hyscale_fast) {
54 c->hyscale_fast(
c, (int16_t*)dst[dst_pos], dstW,
src[src_pos], srcW, xInc);
56 c->hyScale(
c, (int16_t*)dst[dst_pos], dstW, (
const uint8_t *)
src[src_pos], instance->
filter,
60 if (
c->lumConvertRange)
61 c->lumConvertRange((int16_t*)dst[dst_pos], dstW);
63 desc->dst->plane[0].sliceH += 1;
67 dst =
desc->dst->plane[3].line;
69 src_pos = sliceY+
i -
desc->src->plane[3].sliceY;
70 dst_pos = sliceY+
i -
desc->dst->plane[3].sliceY;
72 desc->dst->plane[3].sliceH += 1;
74 if (
c->hyscale_fast) {
75 c->hyscale_fast(
c, (int16_t*)dst[dst_pos], dstW,
src[src_pos], srcW, xInc);
77 c->hyScale(
c, (int16_t*)dst[dst_pos], dstW, (
const uint8_t *)
src[src_pos], instance->
filter,
88 int srcW =
desc->src->width;
90 uint32_t * pal = instance->
pal;
93 desc->dst->plane[0].sliceY = sliceY;
94 desc->dst->plane[0].sliceH = sliceH;
95 desc->dst->plane[3].sliceY = sliceY;
96 desc->dst->plane[3].sliceH = sliceH;
98 for (
i = 0;
i < sliceH; ++
i) {
99 int sp0 = sliceY+
i -
desc->src->plane[0].sliceY;
100 int sp1 = ((sliceY+
i) >>
desc->src->v_chr_sub_sample) -
desc->src->plane[1].sliceY;
101 const uint8_t *
src[4] = {
desc->src->plane[0].line[sp0],
102 desc->src->plane[1].line[sp1],
103 desc->src->plane[2].line[sp1],
104 desc->src->plane[3].line[sp0]};
105 uint8_t * dst =
desc->dst->plane[0].line[
i];
108 c->lumToYV12(dst,
src[0],
src[1],
src[2], srcW, pal);
109 }
else if (
c->readLumPlanar) {
110 c->readLumPlanar(dst,
src, srcW,
c->input_rgb2yuv_table);
115 dst =
desc->dst->plane[3].line[
i];
117 c->alpToYV12(dst,
src[3],
src[1],
src[2], srcW, pal);
118 }
else if (
c->readAlpPlanar) {
119 c->readAlpPlanar(dst,
src, srcW,
NULL);
171 int xInc = instance->
xInc;
173 uint8_t **
src1 =
desc->src->plane[1].line;
174 uint8_t ** dst1 =
desc->dst->plane[1].line;
175 uint8_t **
src2 =
desc->src->plane[2].line;
176 uint8_t ** dst2 =
desc->dst->plane[2].line;
178 int src_pos1 = sliceY -
desc->src->plane[1].sliceY;
179 int dst_pos1 = sliceY -
desc->dst->plane[1].sliceY;
181 int src_pos2 = sliceY -
desc->src->plane[2].sliceY;
182 int dst_pos2 = sliceY -
desc->dst->plane[2].sliceY;
185 for (
i = 0;
i < sliceH; ++
i) {
186 if (
c->hcscale_fast) {
187 c->hcscale_fast(
c, (uint16_t*)dst1[dst_pos1+
i], (uint16_t*)dst2[dst_pos2+
i], dstW,
src1[src_pos1+
i],
src2[src_pos2+
i], srcW, xInc);
193 if (
c->chrConvertRange)
194 c->chrConvertRange((uint16_t*)dst1[dst_pos1+
i], (uint16_t*)dst2[dst_pos2+
i], dstW);
196 desc->dst->plane[1].sliceH += 1;
197 desc->dst->plane[2].sliceH += 1;
206 uint32_t * pal = instance->
pal;
208 int sp0 = (sliceY - (
desc->src->plane[0].sliceY >>
desc->src->v_chr_sub_sample)) <<
desc->src->v_chr_sub_sample;
209 int sp1 = sliceY -
desc->src->plane[1].sliceY;
213 desc->dst->plane[1].sliceY = sliceY;
214 desc->dst->plane[1].sliceH = sliceH;
215 desc->dst->plane[2].sliceY = sliceY;
216 desc->dst->plane[2].sliceH = sliceH;
218 for (
i = 0;
i < sliceH; ++
i) {
219 const uint8_t *
src[4] = {
desc->src->plane[0].line[sp0+
i],
220 desc->src->plane[1].line[sp1+
i],
221 desc->src->plane[2].line[sp1+
i],
222 desc->src->plane[3].line[sp0+
i]};
224 uint8_t * dst1 =
desc->dst->plane[1].line[
i];
225 uint8_t * dst2 =
desc->dst->plane[2].line[
i];
227 c->chrToYV12(dst1, dst2,
src[0],
src[1],
src[2], srcW, pal);
228 }
else if (
c->readChrPlanar) {
229 c->readChrPlanar(dst1, dst2,
src, srcW,
c->input_rgb2yuv_table);
274 desc->dst->plane[1].sliceY = sliceY + sliceH -
desc->dst->plane[1].available_lines;
275 desc->dst->plane[1].sliceH =
desc->dst->plane[1].available_lines;
276 desc->dst->plane[2].sliceY = sliceY + sliceH -
desc->dst->plane[2].available_lines;
277 desc->dst->plane[2].sliceH =
desc->dst->plane[2].available_lines;