Home | History | Annotate | Download | only in yuv420sp2rgb

Lines Matching refs:ctx

46     rgb_context *ctx);
62 rgb_context ctx;
64 ctx.buffer = buffer;
65 ctx.size = size; /* debug */
66 ctx.width = width;
67 ctx.height = height;
68 ctx.rotate = rotate;
74 ctx.i = i;
75 ctx.j = j;
76 cb(nB, nB, nB, &ctx);
111 ctx.i = i;
112 ctx.j = j;
113 cb(nR, nG, nB, &ctx);
123 rgb_context *ctx)
125 unsigned short *rgb16 = (unsigned short *)ctx->buffer;
126 *(rgb16 + ctx->i * ctx->width + ctx->j) = b | (g << 5) | (r << 11);
133 rgb_context *ctx,
136 unsigned char *out = ctx->buffer;
140 switch(ctx->rotate) {
142 offset = ctx->i * ctx->width + ctx->j;
145 offset = ctx->height * (ctx->j + 1) - ctx->i;
148 offset = (ctx->height - 1 - ctx->i) * ctx->width + ctx->j;
151 offset = (ctx->width - 1 - ctx->j) * ctx->height + ctx->i;
154 FAILIF(1, "Unexpected roation value %d!\n", ctx->rotate);
159 FAILIF(offset < 0, "point (%d, %d) generates a negative offset.\n", ctx->i, ctx->j);
160 FAILIF(offset + bpp > ctx->size, "point (%d, %d) at offset %d exceeds the size %d of the buffer.\n",
161 ctx->i, ctx->j,
163 ctx->size);
177 rgb_context *ctx)
179 return common_rgb_cb(r,g,b,ctx,0);
186 rgb_context *ctx)
188 return common_rgb_cb(r,g,b,ctx,1);