42 int srcW =
desc->src->width;
43 int dstW =
desc->dst->width;
44 int xInc = instance->
xInc;
47 for (
i = 0;
i < sliceH; ++
i) {
48 uint8_t **
src =
desc->src->plane[0].line;
49 uint8_t **
dst =
desc->dst->plane[0].line;
50 int src_pos = sliceY+
i -
desc->src->plane[0].sliceY;
51 int dst_pos = sliceY+
i -
desc->dst->plane[0].sliceY;
54 if (
c->hyscale_fast) {
55 c->hyscale_fast(
c, (int16_t*)
dst[dst_pos], dstW,
src[src_pos], srcW, xInc);
57 c->hyScale(
c, (int16_t*)
dst[dst_pos], dstW, (
const uint8_t *)
src[src_pos], instance->
filter,
61 if (
c->lumConvertRange)
62 c->lumConvertRange((int16_t*)
dst[dst_pos], dstW,
63 c->lumConvertRange_coeff,
c->lumConvertRange_offset);
65 desc->dst->plane[0].sliceH += 1;
71 src_pos = sliceY+
i -
desc->src->plane[3].sliceY;
72 dst_pos = sliceY+
i -
desc->dst->plane[3].sliceY;
74 desc->dst->plane[3].sliceH += 1;
76 if (
c->hyscale_fast) {
77 c->hyscale_fast(
c, (int16_t*)
dst[dst_pos], dstW,
src[src_pos], srcW, xInc);
79 c->hyScale(
c, (int16_t*)
dst[dst_pos], dstW, (
const uint8_t *)
src[src_pos], instance->
filter,
90 int srcW =
desc->src->width;
92 uint32_t * pal = instance->
pal;
95 desc->dst->plane[0].sliceY = sliceY;
96 desc->dst->plane[0].sliceH = sliceH;
97 desc->dst->plane[3].sliceY = sliceY;
98 desc->dst->plane[3].sliceH = sliceH;
100 for (
i = 0;
i < sliceH; ++
i) {
101 int sp0 = sliceY+
i -
desc->src->plane[0].sliceY;
102 int sp1 = ((sliceY+
i) >>
desc->src->v_chr_sub_sample) -
desc->src->plane[1].sliceY;
103 const uint8_t *
src[4] = {
desc->src->plane[0].line[sp0],
104 desc->src->plane[1].line[sp1],
105 desc->src->plane[2].line[sp1],
106 desc->src->plane[3].line[sp0]};
107 uint8_t *
dst =
desc->dst->plane[0].line[
i];
110 c->lumToYV12(
dst,
src[0],
src[1],
src[2], srcW, pal,
c->input_opaque);
111 }
else if (
c->readLumPlanar) {
112 c->readLumPlanar(
dst,
src, srcW,
c->input_rgb2yuv_table,
c->input_opaque);
119 c->alpToYV12(
dst,
src[3],
src[1],
src[2], srcW, pal,
c->input_opaque);
120 }
else if (
c->readAlpPlanar) {
121 c->readAlpPlanar(
dst,
src, srcW,
NULL,
c->input_opaque);
173 int xInc = instance->
xInc;
175 uint8_t **
src1 =
desc->src->plane[1].line;
176 uint8_t ** dst1 =
desc->dst->plane[1].line;
177 uint8_t **
src2 =
desc->src->plane[2].line;
178 uint8_t ** dst2 =
desc->dst->plane[2].line;
180 int src_pos1 = sliceY -
desc->src->plane[1].sliceY;
181 int dst_pos1 = sliceY -
desc->dst->plane[1].sliceY;
183 int src_pos2 = sliceY -
desc->src->plane[2].sliceY;
184 int dst_pos2 = sliceY -
desc->dst->plane[2].sliceY;
187 for (
i = 0;
i < sliceH; ++
i) {
188 if (
c->hcscale_fast) {
189 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);
195 if (
c->chrConvertRange)
196 c->chrConvertRange((uint16_t*)dst1[dst_pos1+
i], (uint16_t*)dst2[dst_pos2+
i], dstW,
197 c->chrConvertRange_coeff,
c->chrConvertRange_offset);
199 desc->dst->plane[1].sliceH += 1;
200 desc->dst->plane[2].sliceH += 1;
209 uint32_t * pal = instance->
pal;
211 int sp0 = (sliceY - (
desc->src->plane[0].sliceY >>
desc->src->v_chr_sub_sample)) <<
desc->src->v_chr_sub_sample;
212 int sp1 = sliceY -
desc->src->plane[1].sliceY;
216 desc->dst->plane[1].sliceY = sliceY;
217 desc->dst->plane[1].sliceH = sliceH;
218 desc->dst->plane[2].sliceY = sliceY;
219 desc->dst->plane[2].sliceH = sliceH;
221 for (
i = 0;
i < sliceH; ++
i) {
222 const uint8_t *
src[4] = {
desc->src->plane[0].line[sp0+
i],
223 desc->src->plane[1].line[sp1+
i],
224 desc->src->plane[2].line[sp1+
i],
225 desc->src->plane[3].line[sp0+
i]};
227 uint8_t * dst1 =
desc->dst->plane[1].line[
i];
228 uint8_t * dst2 =
desc->dst->plane[2].line[
i];
230 c->chrToYV12(dst1, dst2,
src[0],
src[1],
src[2], srcW, pal,
c->input_opaque);
231 }
else if (
c->readChrPlanar) {
232 c->readChrPlanar(dst1, dst2,
src, srcW,
c->input_rgb2yuv_table,
c->input_opaque);
277 desc->dst->plane[1].sliceY = sliceY + sliceH -
desc->dst->plane[1].available_lines;
278 desc->dst->plane[1].sliceH =
desc->dst->plane[1].available_lines;
279 desc->dst->plane[2].sliceY = sliceY + sliceH -
desc->dst->plane[2].available_lines;
280 desc->dst->plane[2].sliceH =
desc->dst->plane[2].available_lines;