mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-23 04:33:05 +00:00
Move nv_avc_init into setup
This commit is contained in:
parent
01f11fc095
commit
ef6909da88
@ -8,6 +8,29 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
// Disables the deblocking filter at the cost of image quality
|
||||
#define DISABLE_LOOP_FILTER 0x1
|
||||
// Uses the low latency decode flag (disables multithreading)
|
||||
#define LOW_LATENCY_DECODE 0x2
|
||||
// Threads process each slice, rather than each frame
|
||||
#define SLICE_THREADING 0x4
|
||||
// Uses nonstandard speedup tricks
|
||||
#define FAST_DECODE 0x8
|
||||
// Uses bilinear filtering instead of bicubic
|
||||
#define BILINEAR_FILTERING 0x10
|
||||
// Uses a faster bilinear filtering with lower image quality
|
||||
#define FAST_BILINEAR_FILTERING 0x20
|
||||
// Disables color conversion (output is NV21)
|
||||
#define NO_COLOR_CONVERSION 0x40
|
||||
// Native color format: RGB0
|
||||
#define NATIVE_COLOR_RGB0 0x80
|
||||
// Native color format: 0RGB
|
||||
#define NATIVE_COLOR_0RGB 0x100
|
||||
// Native color format: ARGB
|
||||
#define NATIVE_COLOR_ARGB 0x200
|
||||
// Native color format: RGBA
|
||||
#define NATIVE_COLOR_RGBA 0x400
|
||||
|
||||
@interface VideoDecoder : NSObject
|
||||
int nv_avc_init(int width, int height, int perf_lvl, int thread_count);
|
||||
void nv_avc_destroy(void);
|
||||
|
@ -11,34 +11,10 @@
|
||||
#import "swscale.h"
|
||||
#include <pthread.h>
|
||||
|
||||
// Disables the deblocking filter at the cost of image quality
|
||||
#define DISABLE_LOOP_FILTER 0x1
|
||||
// Uses the low latency decode flag (disables multithreading)
|
||||
#define LOW_LATENCY_DECODE 0x2
|
||||
// Threads process each slice, rather than each frame
|
||||
#define SLICE_THREADING 0x4
|
||||
// Uses nonstandard speedup tricks
|
||||
#define FAST_DECODE 0x8
|
||||
// Uses bilinear filtering instead of bicubic
|
||||
#define BILINEAR_FILTERING 0x10
|
||||
// Uses a faster bilinear filtering with lower image quality
|
||||
#define FAST_BILINEAR_FILTERING 0x20
|
||||
// Disables color conversion (output is NV21)
|
||||
#define NO_COLOR_CONVERSION 0x40
|
||||
// Native color format: RGB0
|
||||
#define NATIVE_COLOR_RGB0 0x80
|
||||
// Native color format: 0RGB
|
||||
#define NATIVE_COLOR_0RGB 0x100
|
||||
// Native color format: ARGB
|
||||
#define NATIVE_COLOR_ARGB 0x200
|
||||
// Native color format: RGBA
|
||||
#define NATIVE_COLOR_RGBA 0x400
|
||||
|
||||
@implementation VideoDecoder
|
||||
- (id) init
|
||||
{
|
||||
self = [super init];
|
||||
nv_avc_init(1280, 720, DISABLE_LOOP_FILTER | FAST_DECODE | FAST_BILINEAR_FILTERING, 1);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user