Skip to content

Commit

Permalink
release 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zypsusu committed Dec 3, 2018
1 parent b1a0883 commit d304f26
Show file tree
Hide file tree
Showing 34 changed files with 366 additions and 35 deletions.
8 changes: 8 additions & 0 deletions Localization/Base.lproj/TuSDK.strings
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@
"lsq_filter_group_MeituBeauty" = "柔光美颜";
"lsq_filter_group_EdgeEffects" = "热力图";
"lsq_filter_group_EdgeEffects001" = "边缘特效";
"lsq_filter_group_Cartoon_image" = "漫画";
"lsq_filter_CHComics_Image" = "国漫";

"lsq_filter_JPComics_Image" = "日漫";
"lsq_filter_Monochrome_Image" = "单色";
"lsq_filter_Ink_Image" = "墨水";
"lsq_filter_USComics_Image" = "美漫";
"lsq_filter_Lightcolor_Image" = "淡彩";

"lsq_filter_Multicolor" = "多彩";
"lsq_filter_Azure" = "科幻蓝";
Expand Down
9 changes: 9 additions & 0 deletions Localization/En.lproj/TuSDK.strings
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,17 @@
"lsq_filter_group_MeituBeauty" = "SoftBeauty";
"lsq_filter_group_EdgeEffects" = "Thermodynamic";
"lsq_filter_group_EdgeEffects001" = "EdgeEffects";
"lsq_filter_group_Cartoon_image" = "Cartoon";


"lsq_filter_JPComics_Image" = "JPComics";
"lsq_filter_Monochrome_Image" = "Monochrome";
"lsq_filter_Ink_Image" = "Ink";
"lsq_filter_USComics_Image" = "USComics";
"lsq_filter_Lightcolor_Image" = "Lightcolor";
"lsq_filter_Multicolor" = "Multicolor";
"lsq_filter_CHComics_Image" = "CHComics";

"lsq_filter_Azure" = "Azure";
"lsq_filter_Infrared" = "Infrared";
"lsq_filter_Fluorescence" = "Fluorescence";
Expand Down
10 changes: 9 additions & 1 deletion Localization/zh-Hant.lproj/TuSDK.strings
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,19 @@
"lsq_filter_group_Lip001" = "唇魅";
"lsq_filter_group_Mottle" = "斑驳";
"lsq_filter_group_LipGloss" = "唇魅";

"lsq_filter_group_Beauty" = "自然美顏";
"lsq_filter_group_MeituBeauty" = "柔光美顏";
"lsq_filter_group_EdgeEffects" = "熱力圖";
"lsq_filter_group_EdgeEffects001" = "邊緣特效";
"lsq_filter_group_Cartoon_image" = "漫畫";

"lsq_filter_JPComics_Image" = "日漫";
"lsq_filter_Monochrome_Image" = "單色";
"lsq_filter_Ink_Image" = "墨水";
"lsq_filter_USComics_Image" = "美漫";
"lsq_filter_Lightcolor_Image" = "淡彩";
"lsq_filter_CHComics_Image" = "國漫";

"lsq_filter_Multicolor" = "多彩";
"lsq_filter_Azure" = "科幻蓝";
"lsq_filter_Infrared" = "红外线";
Expand Down
14 changes: 14 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKAOValid.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
// video editor particle effects filter support 编辑视频 是否支持粒子特效滤镜
- (BOOL)videoEditorParticleEffectsFilterSupport;

// audioPitchEffectsSupport 音频变声
- (BOOL)audioPitchEffectsSupport;

// audioResampleEffectsSupport 音频重采样
- (BOOL)audioResampleEffectsSupport;

/**
video editor text effects support 编辑视频 是否支持文字特效
Expand All @@ -180,6 +186,14 @@
*/
- (BOOL)videoEditorTextEffectsSupport;

/**
video editor text effects support 编辑视频 是否支持漫画特效
@return true/false
@sinace v3.0.1
*/
- (BOOL)videoEditorComicEffectsSupport;

/**
* 解密文本
*
Expand Down
18 changes: 18 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,24 @@
*/
@property (nonatomic) BOOL videoEditorTextEffectsSupport;

/**
video editor comic effect support 漫画
@since v3.0.1
*/
@property (nonatomic) BOOL videoEditorComicEffectsSupport;

/**
音频变声权限
@since v3.0.1
*/
@property (nonatomic) BOOL audioPitchEffectsSupport;

/**
音频重采样权限
@since v3.0.1
*/
@property (nonatomic) BOOL audioResampleEffectsSupport;

/**
* Filter list which could be used by FilterAPI
*/
Expand Down
4 changes: 3 additions & 1 deletion TuSDK.framework/Versions/A/Headers/TuSDKFilterGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
const static int lsqGroupFilterTypeGeneral = 0; // 普通滤镜
const static int lsqGroupFilterTypeSceneEffect = 1; // 场景特效滤镜
const static int lsqGroupFilterTypeParticleEffect = 2; // 粒子特效滤镜
const static int lsqGroupFilterTypeComicEffect = 3; // 漫画特效滤镜


// 所属SDK类型
typedef NS_ENUM(NSUInteger,lsqAtionScenSDKType)
Expand Down Expand Up @@ -43,7 +45,7 @@ typedef NS_ENUM(NSUInteger,lsqAtionScenSDKType)
@property (nonatomic) NSUInteger categoryId;

/**
* 分组中滤镜类型 0: 普通滤镜 1: 特效滤镜 2: 魔法特效
* 分组中滤镜类型 0: 普通滤镜 1: 特效滤镜 2: 魔法特效 3: 漫画特效滤镜
*/
@property (nonatomic) NSUInteger groupFilterType;

Expand Down
22 changes: 20 additions & 2 deletions TuSDK.framework/Versions/A/Headers/TuSDKFilterManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,21 @@
*/
- (BOOL)isNormalFilter:(NSString *)code;

/**
* 是否普通滤镜特效
*
* @param code 滤镜代号
*
* @return BOOL
*/
- (BOOL)isFilterEffect:(NSString *)code;

/**
* 是否是场景特效滤镜
*
* @param code 滤镜代号
*
* @return
* @return BOOL
*/
- (BOOL)isSceneEffectFilter:(NSString *)code;

Expand All @@ -97,10 +106,19 @@
*
* @param code 滤镜代号
*
* @return
* @return BOOL
*/
- (BOOL)isParticleEffectFilter:(NSString *)code;

/**
* 是否是漫画特效滤镜
*
* @param code 漫画代号
*
* @return BOOL
*/
- (BOOL)isConmicEffectFilter:(NSString *)code;

/**
* 执行滤镜 并输出图形
*
Expand Down
10 changes: 10 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKFilterParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@
/** 设置百分比 0 - 1*/
@property (nonatomic) CGFloat precent;

/** 参数默认值*/
@property (nonatomic) CGFloat defaultValue;
/** 参数最小值*/
@property (nonatomic) CGFloat minFloatValue;
/** 参数最大值*/
@property (nonatomic) CGFloat maxFloatValue;

/** 获取值*/
@property (nonatomic, readonly) CGFloat value;

Expand All @@ -128,6 +135,9 @@
/** 参数列表*/
@property (nonatomic, readonly) NSArray<TuSDKFilterArg *> *args;

/** 参数字典*/
@property (nonatomic, readonly) NSDictionary<NSString *, NSString *> *defaultArgsDict;

/** 参数键名列表*/
@property (nonatomic, readonly) NSArray *argKeys;

Expand Down
15 changes: 15 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKFilterProcessorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
*/
- (id)initWithFormatType:(OSType)pixelFormatType isOriginalOrientation:(BOOL)isOriginalOrientation;

/**
* 初始化 处理textureID时使用此方法初始化
*
* @param sharegroup 共享组
* @return instance
*/
- (id)initWithSharegroup:(EAGLSharegroup *)sharegroup;

/**
* 初始化
*
Expand All @@ -71,6 +79,13 @@
*/
- (void)processPixelBuffer:(CVPixelBufferRef)cameraFrame frameTime:(CMTime)currentTime;

/**
* Process a pixelBuffer
*
* @param texture textureID to process
*/
- (void)processTexture:(GLuint)texture textureSize:(CGSize)size;

/// @name Benchmarking

/** When benchmarking is enabled, this will keep a running average of the time from uploading, processing, and final recording or display
Expand Down
14 changes: 14 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKGPUMonsterFace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// TuSDKGPUMonsterFace.h
// TuSDK
//
// Created by hecc on 2018/8/16.
// Copyright © 2018年 tusdk.com. All rights reserved.
//

#import "TuSDKFilterAdapter.h"
#import "TuSDKFilterParameter.h"

@interface TuSDKGPUMonsterFace : TuSDKFilter<TuSDKFilterFacePositionProtocol>

@end
13 changes: 13 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKGPUMonsterNoseFallFace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// TuSDKGPUMonsterNoseFallFace.h
// TuSDK
//
// Created by hecc on 2018/8/16.
// Copyright © 2018年 tusdk.com. All rights reserved.
//

#import "TuSDKFilterAdapter.h"
#import "TuSDKFilterParameter.h"

@interface TuSDKGPUMonsterNoseFallFace : TuSDKFilter<TuSDKFilterFacePositionProtocol>
@end
14 changes: 14 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKGPUMonsterSnakeFace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// TuSDKGPUMonsterSnakeFace.h
// TuSDK
//
// Created by hecc on 2018/8/16.
// Copyright © 2018年 tusdk.com. All rights reserved.
//

#import "TuSDKFilterAdapter.h"
#import "TuSDKFilterParameter.h"

@interface TuSDKGPUMonsterSnakeFace : TuSDKFilter<TuSDKFilterFacePositionProtocol>

@end
14 changes: 14 additions & 0 deletions TuSDK.framework/Versions/A/Headers/TuSDKGPUMonsterSquareFace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// TuSDKGPUMonsterSquareFace.h
// TuSDK
//
// Created by hecc on 2018/8/16.
// Copyright © 2018年 tusdk.com. All rights reserved.
//

#import "TuSDKFilterAdapter.h"
#import "TuSDKFilterParameter.h"

@interface TuSDKGPUMonsterSquareFace : TuSDKFilter<TuSDKFilterFacePositionProtocol>

@end
92 changes: 86 additions & 6 deletions TuSDK.framework/Versions/A/Headers/TuSDKGPUPlasticFaceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,91 @@
#import <Foundation/Foundation.h>
#import "TuSDKFaceAligment.h"

/**
* 整张脸最外圈点
*/
static const int FACE_DETECTED_LINE_LEN = 12;
/**
* 脸部外轮廓索引
*/
static const int FACE_OUTLINE_LEN = 9;
static int FACE_OUTLINE[FACE_OUTLINE_LEN] = {0, 4, 8, 12, 16, 20, 24, 28, 32};
/**
* 左眉外轮廓索引
*/
static const int EYEBROW_LEFT_OUTLINE_LEN = 7;
static int EYEBROW_LEFT_OUTLINE[EYEBROW_LEFT_OUTLINE_LEN] = {33, 34, 64, 35, 65, 37, 67};
/**
* 右眉外轮廓索引
*/
static const int EYEBROW_RIGHT_OUTLINE_LEN = 7;
static int EYEBROW_RIGHT_OUTLINE[EYEBROW_RIGHT_OUTLINE_LEN] = {42, 41, 71, 40, 70, 38, 68};
/**
* 左眼外轮廓索引
*/
static const int EYE_LEFT_OUTLINE_LEN=4;
static int EYE_LEFT_OUTLINE[EYE_LEFT_OUTLINE_LEN] = {72, 73, 52, 55};
/**
* 右眼外轮廓索引
*/
static const int EYE_RIGHT_OUTLINE_LEN =4;
static int EYE_RIGHT_OUTLINE[EYE_RIGHT_OUTLINE_LEN] = {75, 76, 58, 61};
/**
* 鼻头外轮廓
*/
static const int NOSE_OUTLINE_LEN = 3;
static int NOSE_OUTLINE[NOSE_OUTLINE_LEN] = {49, 82, 83};
/**
* 嘴巴外轮廓
*/
static const int MOUTH_OUTLINE_LEN =14;
static int MOUTH_OUTLINE[MOUTH_OUTLINE_LEN] = {84, 90, 86, 87, 88, 97, 98, 99, 94, 93, 92, 103, 102, 101};


static const int FACE_POINTS_COUNT = (FACE_DETECTED_LINE_LEN
+ FACE_OUTLINE_LEN
+ EYEBROW_LEFT_OUTLINE_LEN
+ EYEBROW_RIGHT_OUTLINE_LEN
+ 1
+ EYE_LEFT_OUTLINE_LEN
+ EYE_RIGHT_OUTLINE_LEN
+ NOSE_OUTLINE_LEN
+ MOUTH_OUTLINE_LEN);

/**
* 预先设定好的面部点集的索引值数组,每3个一组排列,每组表示三角形的三个顶点的索引值
* 每张脸有108个三角形分割而成
*/
static const int TRIANGLE_SIZE = 3;
static const int FACE_TRIANGLES_COUNT = 108;
static const int FACE_TRIANGLES_MAP_SIZE = TRIANGLE_SIZE * FACE_TRIANGLES_COUNT;
static const int FACE_TRIANGLES_MAP[FACE_TRIANGLES_MAP_SIZE] =
{
0, 1, 12, 0, 9, 12, 1, 2, 13, 1, 12, 13, 2, 3, 14,
2, 13, 14, 3, 4, 16, 3, 14, 15, 3, 15, 16, 4, 5, 16,
5, 6, 18, 5, 16, 17, 5, 17, 18, 6, 7, 19, 6, 18, 19,
7, 8, 20, 7, 19, 20, 8, 10, 20, 9, 11, 24, 9, 12, 21,
9, 21, 22, 9, 22, 24, 10, 11, 31, 10, 20, 28, 10, 28, 29,
10, 29, 31, 11, 24, 26, 11, 26, 35, 11, 31, 33, 11, 33, 35,
12, 13, 38, 12, 21, 36, 12, 36, 38, 13, 14, 47, 13, 37, 38,
13, 37, 45, 13, 45, 47, 14, 15, 47, 15, 16, 55, 15, 47, 55,
16, 17, 57, 16, 55, 56, 16, 56, 57, 17, 18, 48, 17, 48, 57,
18, 19, 48, 19, 46, 48, 19, 20, 43, 19, 41, 43, 19, 41, 46,
20, 28, 40, 20, 40, 43, 21, 22, 23, 21, 23, 36, 22, 23, 25,
22, 24, 25, 23, 25, 36, 24, 25, 26, 25, 26, 27, 25, 27, 36,
26, 27, 35, 27, 35, 36, 28, 29, 30, 28, 30, 40, 29, 30, 32,
29, 31, 32, 30, 32, 40, 31, 32, 33, 32, 33, 34, 32, 34, 40,
33, 34, 35, 34, 35, 40, 35, 36, 39, 35, 39, 45, 35, 40, 42,
35, 42, 46, 35, 44, 45, 35, 44, 46, 36, 37, 38, 36, 37, 39,
37, 39, 45, 40, 41, 42, 40, 41, 43, 41, 42, 46, 44, 45, 49,
44, 46, 51, 44, 49, 50, 44, 50, 51, 45, 47, 49, 46, 48, 51,
47, 49, 52, 47, 52, 58, 47, 55, 58, 48, 51, 54, 48, 54, 60,
48, 57, 60, 49, 50, 52, 50, 51, 54, 50, 52, 53, 50, 53, 54,
52, 53, 58, 53, 54, 60, 53, 58, 59, 53, 59, 60, 55, 56, 58,
56, 57, 60, 56, 58, 59, 56, 59, 60
};


@interface TuSdkPlasticFaceInfo : NSObject

-(instancetype) initWithFaceInfo:(TuSDKFaceAligment *)aligment;
Expand All @@ -17,12 +102,7 @@
* 获取点信息
* 注:顺序严格按照已有次序,保证和 FACE_IDX 一致
*/
-(void) getPoints:(GLfloat*)points start:(int)start count:(int)count isVer:(BOOL)isVer;

/**
* 获取face索引序列
*/
-(void)fillFace:(GLint *)idxs size:(int *)size start:(int)start count:(int)count;
-(void) getPoints:(GLfloat*)points isVer:(BOOL)isVer;

/**
* 计算瘦脸
Expand Down
8 changes: 0 additions & 8 deletions TuSDK.framework/Versions/A/Headers/TuSDKGPUSkinColor2Filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,4 @@
/** 混合 (设值范围0.0-1.0,原图默认值为0.0,越大效果越强) */
@property(readwrite, nonatomic) CGFloat mixed;

/**
* 初始化
*
* @param option TuSDKFilterOption
*
* @return instancetype
*/
- (instancetype)initWithOption:(TuSDKFilterOption *)option;
@end
Loading

0 comments on commit d304f26

Please sign in to comment.