void yuv2rgb_24(uint8_t *puc_y, int stride_y,
uint8_t *puc_u, uint8_t *puc_v, int stride_uv,
uint8_t *puc_out, int width_y, int height_y,
unsigned int _stride_out) {
int y, horiz_count;
uint8_t *puc_out_remembered;
int stride_out = width_y * 3;
if (y == height_y-1) {
/* this is the last output line - we need to be careful not to overrun the end of this line */
uint8_t temp_buff[3*MAXIMUM_Y_WIDTH+1];
puc_out_remembered = puc_out;
puc_out = temp_buff; /* write the RGB to a temporary store */
}
if (y == height_y-1) {
/* last line of output - we have used the temp_buff and need to copy... */
int x = 3 * width_y; /* interation counter */
uint8_t *ps = puc_out; /* source pointer (temporary line store) */
uint8_t *pd = puc_out_remembered; /* dest pointer */
while (x--) *(pd++) = *(ps++); /* copy the line */
}