• Home
  • Raw
  • Download

Lines Matching refs:ctx

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