Convert images on the GPU on Linux for NVidia cards
This commit is contained in:
parent
1a7ed53559
commit
9982ae4675
13 changed files with 372 additions and 28 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue