mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-18 22:39:53 +00:00
Add hardware acceleration force option
This commit is contained in:
@@ -51,9 +51,11 @@ int ffmpeg_init(int width, int height, int perf_lvl, int thread_count) {
|
||||
av_init_packet(&pkt);
|
||||
|
||||
#ifdef HAVE_VDPAU
|
||||
decoder = avcodec_find_decoder_by_name("h264_vdpau");
|
||||
if (decoder != NULL)
|
||||
decoder_system = VDPAU;
|
||||
if (perf_lvl & HARDWARE_ACCELERATION) {
|
||||
decoder = avcodec_find_decoder_by_name("h264_vdpau");
|
||||
if (decoder != NULL)
|
||||
decoder_system = VDPAU;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (decoder == NULL) {
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#define BILINEAR_FILTERING 0x10
|
||||
// Uses a faster bilinear filtering with lower image quality
|
||||
#define FAST_BILINEAR_FILTERING 0x20
|
||||
// Uses hardware acceleration
|
||||
#define HARDWARE_ACCELERATION 0x40
|
||||
|
||||
int ffmpeg_init(int width, int height, int perf_lvl, int thread_count);
|
||||
void ffmpeg_destroy(void);
|
||||
|
||||
Reference in New Issue
Block a user