From ef6909da880e6273ea7feedec06e2319b8f1ca46 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Mon, 20 Jan 2014 23:49:06 -0500 Subject: [PATCH] Move nv_avc_init into setup --- Limelight-iOS/VideoDecoder.h | 23 +++++++++++++++++++++++ Limelight-iOS/VideoDecoder.m | 24 ------------------------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Limelight-iOS/VideoDecoder.h b/Limelight-iOS/VideoDecoder.h index 8a8c153..900a24f 100644 --- a/Limelight-iOS/VideoDecoder.h +++ b/Limelight-iOS/VideoDecoder.h @@ -8,6 +8,29 @@ #import +// 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); diff --git a/Limelight-iOS/VideoDecoder.m b/Limelight-iOS/VideoDecoder.m index b484acf..716f6c6 100644 --- a/Limelight-iOS/VideoDecoder.m +++ b/Limelight-iOS/VideoDecoder.m @@ -11,34 +11,10 @@ #import "swscale.h" #include -// 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; }