Convert images on the GPU on Linux for NVidia cards

This commit is contained in:
loki-47-6F-64
2021-09-14 11:58:21 +02:00
parent 1a7ed53559
commit 9982ae4675
13 changed files with 372 additions and 28 deletions

View File

@@ -3,8 +3,6 @@
#include <fcntl.h>
#include <glad/egl.h>
extern "C" {
#include <libavcodec/avcodec.h>
}
@@ -404,7 +402,7 @@ public:
int convert(platf::img_t &img) override {
sws.load_ram(img);
sws.convert(nv12);
sws.convert(nv12->buf);
return 0;
}
};
@@ -430,7 +428,7 @@ public:
sws.load_vram(descriptor, offset_x, offset_y, rgb->tex[0]);
sws.convert(nv12);
sws.convert(nv12->buf);
return 0;
}