Hello,
First of all, thanks for your answer. For the data feeding, I'm using a memcpy function instead of a 'for' loop. Also, I've already checked in my application the input frame buffer before the color space conversion and seems to be right. Although, after the colour space conversion, the output frame buffer is just like the Figure 2 of my first post, I think that seems to be an issue with the splitting logic implemented or the conversion itself. Up next, there is attached the code used to do the color space conversion with the splitting logic.
total_input_width = 1920;
total_input_height = 1080;
input_frame_size = (total_input_width * total_input_height * 2);
processing_input_width = total_input_width - 896;
processing_input_height = total_input_height - 56;
total_output_width = 1920;
total_output_height = 1080;
output_frame_size = (total_output_width * total_output_height * 1)
processing_output_width = total_output_width - 896;
processing_output_height = total_output_height - 56;
memcpy(input_buffer, input_frame, input_frame_size);
// Perform color space conversion
// First task
if (ioctl(fd, IPU_QUEUE_TASK, &task) < 0) {
perror("ioct IPU_QUEUE_TASK fail");
return -1;
}
// Second task
task.input.paddr += (processing_input_width * processing_input_height * 2);
task.output.paddr += (processing_output_width * processing_output_height * 1);
if (ioctl(fd, IPU_QUEUE_TASK, &task) < 0) {
perror("ioct IPU_QUEUE_TASK fail");
return -1;
}
memcpy(output_frame, output_buffer, output_frame_size);