mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:53:05 +01:00
Fixed incorrect colors during video capture
This commit is contained in:
parent
9b6efb65de
commit
fcdc8e8b67
@ -401,9 +401,9 @@ void* video_thread_poll (void* arg) // TODO: maybe use thread for every input so
|
|||||||
uint16_t video_height = device->video_height;
|
uint16_t video_height = device->video_height;
|
||||||
int screen = DefaultScreen(device->x_display);
|
int screen = DefaultScreen(device->x_display);
|
||||||
|
|
||||||
yuv422to420(device->input.planes[0], device->input.planes[1], device->input.planes[2], data, video_width, video_height);
|
yuv422to420(device->input.planes[0], device->input.planes[2], device->input.planes[1], data, video_width, video_height);
|
||||||
uint8_t *img_data = malloc(video_width * video_height * 4);
|
uint8_t *img_data = malloc(video_width * video_height * 4);
|
||||||
yuv420tobgr(video_width, video_height, device->input.planes[0], device->input.planes[1], device->input.planes[2], video_width, video_width / 2, video_width / 2, img_data);
|
yuv420tobgr(video_width, video_height, device->input.planes[0], device->input.planes[1], device->input.planes[2], video_width, video_width/2, video_width/2, img_data);
|
||||||
|
|
||||||
XImage image = {
|
XImage image = {
|
||||||
.width = video_width,
|
.width = video_width,
|
||||||
|
Loading…
Reference in New Issue
Block a user