宇视抓拍图片
This commit is contained in:
@@ -115,6 +115,16 @@
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/Library/MvCameraControlWrapper.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!-- 本地库:JNA -->
|
||||
<dependency>
|
||||
<groupId>com.sun.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
package top.wms.admin.controller.ys;
|
||||
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.ptr.IntByReference;
|
||||
import top.wms.admin.controller.ys.lib.NetDEVSDKLib;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class NetDemo {
|
||||
|
||||
public static Pointer lpUserID = null;
|
||||
public static String strPicturePath = "." + File.separator + "Picture" + File.separator;
|
||||
public static NetDEVSDKLib netdevsdk = NetDEVSDKLib.NETDEVSDK_INSTANCE;
|
||||
public static int ChannelID = 0;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// 初始化SDK
|
||||
initSDK();
|
||||
|
||||
// 登录设备
|
||||
boolean loginSuccess = loginDevice();
|
||||
if (!loginSuccess) {
|
||||
System.out.println("登录失败,退出程序");
|
||||
cleanupSDK();
|
||||
return;
|
||||
}
|
||||
|
||||
// 抓拍图片
|
||||
captureImage();
|
||||
|
||||
// 登出设备
|
||||
logoutDevice();
|
||||
|
||||
// 释放SDK
|
||||
cleanupSDK();
|
||||
|
||||
System.out.println("程序执行完成");
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化SDK
|
||||
*/
|
||||
private static void initSDK() {
|
||||
String strLogPath = "./sdklog/";
|
||||
boolean bRet = netdevsdk.NETDEV_SetLogPath(strLogPath);
|
||||
if (false == bRet) {
|
||||
System.out.printf("NETDEV_SetLogPath failed:%d", netdevsdk.NETDEV_GetLastError());
|
||||
}
|
||||
|
||||
bRet = netdevsdk.NETDEV_Init();
|
||||
if (false == bRet) {
|
||||
System.out.printf("Initialize failed:%d", netdevsdk.NETDEV_GetLastError());
|
||||
return;
|
||||
}
|
||||
|
||||
// 创建图片保存目录
|
||||
File file = new File(strPicturePath);
|
||||
if (!file.exists()) {
|
||||
file.mkdir();
|
||||
}
|
||||
|
||||
System.out.println("SDK初始化成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录设备
|
||||
*
|
||||
* @return 登录是否成功
|
||||
*/
|
||||
private static boolean loginDevice() {
|
||||
// 设备信息
|
||||
String strUserName = "admin";
|
||||
String strPassword = "admin@123";
|
||||
String strIPAddr = "192.168.1.13";
|
||||
int dwPort = 80;
|
||||
int dwLoginProto = 1; // 私有协议
|
||||
|
||||
// 准备登录信息
|
||||
NetDEVSDKLib.NETDEV_DEVICE_LOGIN_INFO_S stDevLoginInfo = new NetDEVSDKLib.NETDEV_DEVICE_LOGIN_INFO_S();
|
||||
NetDEVSDKLib.NETDEV_SELOG_INFO_S stSELogInfo = new NetDEVSDKLib.NETDEV_SELOG_INFO_S();
|
||||
|
||||
// 设置登录信息
|
||||
System.arraycopy(strUserName.getBytes(), 0, stDevLoginInfo.szUserName, 0, strUserName.getBytes().length);
|
||||
System.arraycopy(strPassword.getBytes(), 0, stDevLoginInfo.szPassword, 0, strPassword.getBytes().length);
|
||||
System.arraycopy(strIPAddr.getBytes(), 0, stDevLoginInfo.szIPAddr, 0, strIPAddr.getBytes().length);
|
||||
stDevLoginInfo.dwPort = dwPort;
|
||||
stDevLoginInfo.dwLoginProto = dwLoginProto;
|
||||
|
||||
// 登录设备
|
||||
System.out.println("正在登录设备...");
|
||||
lpUserID = netdevsdk.NETDEV_Login_V30(stDevLoginInfo, stSELogInfo);
|
||||
|
||||
if (null != lpUserID) {
|
||||
System.out.println("登录成功");
|
||||
|
||||
// 查询通道信息
|
||||
queryChannels();
|
||||
return true;
|
||||
} else {
|
||||
System.out.printf("登录失败, 错误码:%d\n", netdevsdk.NETDEV_GetLastError());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询通道信息
|
||||
*/
|
||||
private static void queryChannels() {
|
||||
int nMaxChlCount = 256;
|
||||
IntByReference dwChlCount = new IntByReference(nMaxChlCount);
|
||||
NetDEVSDKLib.NETDEV_VIDEO_CHL_DETAIL_INFO_EX_S[] stVideoChlList = (NetDEVSDKLib.NETDEV_VIDEO_CHL_DETAIL_INFO_EX_S[]) new NetDEVSDKLib.NETDEV_VIDEO_CHL_DETAIL_INFO_EX_S().toArray(nMaxChlCount);
|
||||
boolean bRet = netdevsdk.NETDEV_QueryVideoChlDetailListEx(lpUserID, dwChlCount, stVideoChlList);
|
||||
|
||||
if (bRet) {
|
||||
System.out.println("通道查询成功,通道数量: " + dwChlCount.getValue());
|
||||
for (int i = 0; i < dwChlCount.getValue(); i++) {
|
||||
System.out.println("通道ID: " + stVideoChlList[i].dwChannelID + ", 状态: " + (stVideoChlList[i].enStatus == 1 ? "在线" : "离线") + ", 名称: " + new String(stVideoChlList[i].szChnName).trim());
|
||||
}
|
||||
} else {
|
||||
System.out.printf("通道查询失败, 错误码:%d\n", netdevsdk.NETDEV_GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 抓拍图片
|
||||
*/
|
||||
private static void captureImage() {
|
||||
if (null == lpUserID) {
|
||||
System.out.println("请先登录设备");
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置通道为1
|
||||
ChannelID = 1;
|
||||
String strPicPath = "D:\\test\\ys\\carousel.jpg";
|
||||
|
||||
// 创建保存目录
|
||||
File picDir = new File("D:\\test\\ys");
|
||||
if (!picDir.exists()) {
|
||||
picDir.mkdir();
|
||||
}
|
||||
|
||||
// 使用NETDEV_CaptureNoPreview直接保存图片文件
|
||||
System.out.println("正在抓拍图片...");
|
||||
boolean bRet = netdevsdk.NETDEV_CaptureNoPreview(lpUserID, ChannelID, 0, strPicPath, 1);
|
||||
|
||||
if (bRet) {
|
||||
System.out.println("抓图成功! 保存路径: " + strPicPath);
|
||||
} else {
|
||||
System.out.printf("抓图失败, 错误码:%d\n", netdevsdk.NETDEV_GetLastError());
|
||||
System.out.println("请确认设备是否支持非预览抓图功能");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 登出设备
|
||||
*/
|
||||
private static void logoutDevice() {
|
||||
if (null != lpUserID) {
|
||||
System.out.println("正在登出设备...");
|
||||
netdevsdk.NETDEV_Logout(lpUserID);
|
||||
lpUserID = null;
|
||||
System.out.println("设备登出成功");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放SDK
|
||||
*/
|
||||
private static void cleanupSDK() {
|
||||
System.out.println("正在释放SDK...");
|
||||
netdevsdk.NETDEV_Cleanup();
|
||||
System.out.println("SDK释放成功");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package top.wms.admin.controller.ys.lib;
|
||||
|
||||
import com.sun.jna.Platform;
|
||||
|
||||
class BaseFun {
|
||||
// 获取操作平台信息
|
||||
public static String getOsArch() {
|
||||
String arch = System.getProperty("os.arch").toLowerCase();
|
||||
final String name = System.getProperty("os.name");
|
||||
String osArch;
|
||||
switch(Platform.getOSType()) {
|
||||
case Platform.WINDOWS: {
|
||||
if ("i386".equals(arch))
|
||||
arch = "x86";
|
||||
else if ("x86_64".equals(arch)) {
|
||||
arch = "amd64";
|
||||
}
|
||||
osArch = "win32-" + arch;
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
osArch = name.toLowerCase();
|
||||
if ("x86".equals(arch)) {
|
||||
arch = "i386";
|
||||
}
|
||||
if ("x86_64".equals(arch)) {
|
||||
arch = "amd64";
|
||||
}
|
||||
int space = osArch.indexOf(" ");
|
||||
if (space != -1) {
|
||||
osArch = osArch.substring(0, space);
|
||||
}
|
||||
osArch += "-" + arch;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return osArch;
|
||||
}
|
||||
|
||||
//获取加载SDK库
|
||||
public static String LoadSDKLibrary() {
|
||||
String filePath = System.getProperty("user.dir").replaceFirst("/","").replaceAll("%20"," ");
|
||||
String loadLibrary = "";
|
||||
String OsArch = getOsArch();
|
||||
|
||||
if(OsArch.toLowerCase().startsWith("win32-x86")) {
|
||||
loadLibrary = filePath + "\\wms-webapi\\src\\main\\resources\\lib\\win32\\";
|
||||
} else if(OsArch.toLowerCase().startsWith("win32-amd64") ) {
|
||||
loadLibrary = filePath + "\\wms-webapi\\src\\main\\resources\\lib\\win64\\";
|
||||
}
|
||||
String loadSDKLibrary = loadLibrary + "NetDEVSDK";
|
||||
System.out.printf("[Load SDKLibrary Path : %s]\n", loadSDKLibrary);
|
||||
return loadSDKLibrary;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
package top.wms.admin.controller.ys.utils;
|
||||
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.util.Vector;
|
||||
|
||||
public class CheckTableModle extends DefaultTableModel {
|
||||
public CheckTableModle(Vector data, Vector columnNames) {
|
||||
super(data, columnNames);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 根据类型返回显示空间
|
||||
// * 布尔类型返回显示checkbox
|
||||
// */
|
||||
public Class getColumnClass(int c) {
|
||||
return getValueAt(0, c).getClass();
|
||||
}
|
||||
|
||||
public void selectAllOrNull(boolean value) {
|
||||
for (int i = 0; i < getRowCount(); i++) {
|
||||
this.setValueAt(value, i, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package top.wms.admin.controller.ys.utils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.TableCellEditor;
|
||||
|
||||
|
||||
public class ComboBoxTable extends JTable {
|
||||
/**
|
||||
* 序列化
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private int myRow = -1, myCol = -1;
|
||||
TableCellEditor myEditor;
|
||||
|
||||
public void setComboCell(int r, int c, String[]items) {
|
||||
this.myRow = r;
|
||||
this.myCol = c;
|
||||
TableCellEditor ce = new MyComboBoxEditor(items);
|
||||
this.myEditor = ce;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableCellEditor getCellEditor(int row, int column) {
|
||||
System.out.println(row + "," + column + ";" + myRow + "," + myCol + "," + myEditor);
|
||||
if (row == myRow && column == myCol && myEditor != null)
|
||||
return myEditor;
|
||||
return super.getCellEditor(row, column);
|
||||
}
|
||||
|
||||
class MyComboBoxEditor extends DefaultCellEditor {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MyComboBoxEditor(String[] items) {
|
||||
super(new JComboBox(items));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,496 @@
|
||||
package top.wms.admin.controller.ys.utils;
|
||||
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.LineBorder;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateChooser extends JPanel
|
||||
{
|
||||
|
||||
private int width = 200 ; // 日期控件的宽度
|
||||
private int height = 220 ; // 日期控件的高度
|
||||
|
||||
private GridBagLayout gridBagLayout1 = new GridBagLayout();
|
||||
public JTextField jTextFieldDate = new JTextField();
|
||||
private DateChooserButton btnChoose = new DateChooserButton( " ▼ " ); // ▼是指:▼下拉箭头的unicode码
|
||||
private String parten;
|
||||
private Container owner;
|
||||
private int length = 140 ;
|
||||
|
||||
|
||||
/**
|
||||
* @wbp.parser.constructor
|
||||
*/
|
||||
public DateChooser(Container owner, int length) {
|
||||
this .owner = owner;
|
||||
this .parten = " yyyy-MM-dd HH:mm:ss " ;
|
||||
this .length = length;
|
||||
try {
|
||||
init();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
/* *
|
||||
* 根据一个所有者和一个日期的显示格式构造一个DateChooser对象。
|
||||
*/
|
||||
public DateChooser(Container owner, String partten, int length) {
|
||||
this .owner = owner;
|
||||
this .parten = partten;
|
||||
this .length = length;
|
||||
try {
|
||||
init();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
/* *
|
||||
* 根据一个所有者和一个日期的显示格式构造一个DateChooser对象。
|
||||
*/
|
||||
public DateChooser(Container owner, String partten) {
|
||||
this .owner = owner;
|
||||
this .parten = partten;
|
||||
try {
|
||||
init();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
/* *
|
||||
* 以缺省的partten构建DateChooser对象
|
||||
* 日期选择框的所有者必须是Frame或者是JFrame对象。
|
||||
*/
|
||||
public DateChooser(Container owner) {
|
||||
this .owner = owner;
|
||||
this .parten = " yyyy-MM-dd HH:mm:ss" ;
|
||||
try {
|
||||
init();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/* *
|
||||
* 系统初始化
|
||||
* @throws Exception
|
||||
*/
|
||||
private void init() throws Exception {
|
||||
jTextFieldDate.setColumns(10);
|
||||
jTextFieldDate.setEditable(true);
|
||||
jTextFieldDate.setEnabled(true);
|
||||
jTextFieldDate.setToolTipText( " 单击右边的按钮即可选择日期 " );
|
||||
btnChoose.setToolTipText( " 单击即可选择日期 " );
|
||||
this .setLayout(gridBagLayout1);
|
||||
// dateField.setEditable( false );
|
||||
btnChoose.addActionListener( new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
DateChooser. this .btnChoose_actionPerformed(e);
|
||||
}
|
||||
});
|
||||
Date date = new Date();
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(parten);
|
||||
this .setText(simpleDateFormat.format(date));
|
||||
this .add(jTextFieldDate, new GridBagConstraints( 0 , 0 , 1 , 1 , 20.0 , 0.0
|
||||
, GridBagConstraints.CENTER,
|
||||
GridBagConstraints.NONE,
|
||||
new Insets( 0 , 0 , 0 , 0 ), 60, 0 ));
|
||||
this .add(btnChoose, new GridBagConstraints( 1 , 0 , 1 , 1 , 0.0 , 0.0
|
||||
, GridBagConstraints.CENTER, GridBagConstraints.NONE,
|
||||
new Insets( 0 , 0 , 0 , 0 ), 0 , 0 ));
|
||||
}
|
||||
public void setToolTipText(String text) {
|
||||
jTextFieldDate.setToolTipText(text);
|
||||
jTextFieldDate.setToolTipText(text);
|
||||
}
|
||||
/* *
|
||||
* 下拉按钮的事件处理
|
||||
* @param e ActionEvent
|
||||
*/
|
||||
public void btnChoose_actionPerformed(ActionEvent e) {
|
||||
Rectangle r = jTextFieldDate.getBounds();
|
||||
Point pOnScreen = jTextFieldDate.getLocationOnScreen();
|
||||
|
||||
Point result = new Point(pOnScreen.x, pOnScreen.y+20 );
|
||||
// Point powner = owner.getLocation();
|
||||
// int offsetX = (pOnScreen.x + width) - (powner.x + owner.getWidth());
|
||||
// int offsetY = (pOnScreen.y + r.height + height) -
|
||||
// (powner.y + owner.getHeight());
|
||||
//
|
||||
// if (offsetX > 0 ) {
|
||||
// result.x -= offsetX;
|
||||
// }
|
||||
//
|
||||
// if (offsetY > 0 ) {
|
||||
// result.y -= height + r.height;
|
||||
// }
|
||||
|
||||
JDialog dateFrame = new JDialog();
|
||||
dateFrame.setModal( false );
|
||||
dateFrame.setUndecorated( true );
|
||||
dateFrame.setLocation(result);
|
||||
dateFrame.setSize(width, height);
|
||||
|
||||
dateFrame.addWindowListener( new WindowAdapter() {
|
||||
// 在任意的非日期选择区单击,则日期选择组件将变为非活动状态,自动释放资源。
|
||||
public void windowDeactivated(WindowEvent e) {
|
||||
JDialog f = (JDialog) e.getSource();
|
||||
f.dispose();
|
||||
}
|
||||
});
|
||||
DatePanel datePanel = new DatePanel(dateFrame, parten);
|
||||
dateFrame.getContentPane().setLayout( new BorderLayout());
|
||||
dateFrame.getContentPane().add(datePanel);
|
||||
dateFrame.setVisible( true );
|
||||
}
|
||||
/* *
|
||||
* 得到日期控件中的值
|
||||
* @return String
|
||||
*/
|
||||
public String getText() {
|
||||
return this .jTextFieldDate.getText();
|
||||
}
|
||||
/* *
|
||||
* 设置文本域的值
|
||||
* @param text String
|
||||
*/
|
||||
public void setText(String text) {
|
||||
this .jTextFieldDate.setText(text);
|
||||
}
|
||||
/* *
|
||||
* 该方法非常有用,是外部直接访问的TextField对象。
|
||||
* @return JTextField
|
||||
*/
|
||||
public JTextField getDateField() {
|
||||
return jTextFieldDate;
|
||||
}
|
||||
/* *
|
||||
* 内部类,日期选择控件的主体,封装了所有日期选择的内容,主要是一个Panel
|
||||
*/
|
||||
class DatePanel
|
||||
extends JPanel implements MouseListener,
|
||||
ChangeListener {
|
||||
|
||||
int startYear = 1970 ; // 默认【最小】显示年份
|
||||
int lastYear = 2050 ; // 默认【最大】显示年份
|
||||
|
||||
Color backGroundColor = Color.gray; // 底色
|
||||
// 月历表格配色---------------- //
|
||||
Color palletTableColor = Color.white; // 日历表底色
|
||||
Color weekFontColor = Color.blue; // 星期文字色
|
||||
Color dateFontColor = Color.black; // 日期文字色
|
||||
Color weekendFontColor = Color.red; // 周末文字色
|
||||
Color moveButtonColor = Color.GREEN; // 鼠标移动的日历底色
|
||||
Color todayBtnColor = Color.pink; // 今天的日历底色
|
||||
// 控制条配色------------------ //
|
||||
Color controlLineColor = Color.pink; // 控制条底色
|
||||
Color controlTextColor = Color.white; // 控制条标签文字色
|
||||
|
||||
JSpinner yearSpin;
|
||||
JSpinner monthSpin;
|
||||
JSpinner hourSpin;
|
||||
JButton[][] daysButton = new JButton[ 6 ][ 7 ];
|
||||
|
||||
JDialog f;
|
||||
|
||||
JPanel dayPanel = new JPanel(); // 日期panel
|
||||
JPanel yearPanel = new JPanel();
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
String pattern;
|
||||
|
||||
/* *
|
||||
* 日期选择控件放在了非模态对话框中
|
||||
*/
|
||||
public DatePanel(JDialog target, String pattern) {
|
||||
super();
|
||||
|
||||
this .f = target;
|
||||
this .pattern = pattern;
|
||||
|
||||
setLayout( new BorderLayout());
|
||||
setBorder( new LineBorder(backGroundColor, 2 ));
|
||||
setBackground(backGroundColor);
|
||||
initButton(); // 初始化放置日期的按钮。
|
||||
createYearAndMonthPanal(); //
|
||||
this .flushWeekAndDayPanal(calendar); // 之前必须先保证放置日期的按钮已经初始化。
|
||||
this .setLayout( new BorderLayout());
|
||||
this .add(yearPanel, BorderLayout.NORTH);
|
||||
this .add(dayPanel, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
/* *
|
||||
* 日期选择控件的按钮初始化
|
||||
*/
|
||||
private void initButton() {
|
||||
int actionCommandId = 1 ;
|
||||
for ( int i = 0 ; i < 6 ; i ++ ) {
|
||||
for ( int j = 0 ; j < 7 ; j ++ ) {
|
||||
JButton numberButton = new JButton();
|
||||
numberButton.setBorder(BorderFactory.createEmptyBorder());
|
||||
numberButton.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
numberButton.setActionCommand(String.valueOf(
|
||||
actionCommandId));
|
||||
|
||||
numberButton.addMouseListener( this );
|
||||
|
||||
numberButton.setBackground(palletTableColor);
|
||||
numberButton.setForeground(dateFontColor);
|
||||
numberButton.setText(String.valueOf(actionCommandId));
|
||||
numberButton.setPreferredSize( new Dimension( 25 , 25 ));
|
||||
daysButton[i][j] = numberButton;
|
||||
actionCommandId ++ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
private Date getNowDate() {
|
||||
return Calendar.getInstance().getTime();
|
||||
}
|
||||
private Calendar getNowCalendar() {
|
||||
Calendar result = Calendar.getInstance();
|
||||
return result;
|
||||
}
|
||||
private Date getSelectDate() {
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/* *
|
||||
* 创建年月日的面板
|
||||
*/
|
||||
private void createYearAndMonthPanal() {
|
||||
Calendar c = getNowCalendar();
|
||||
int currentYear = c. get (Calendar.YEAR);
|
||||
int currentMonth = c. get (Calendar.MONTH) + 1 ;
|
||||
int currentHour = c. get (Calendar.DAY_OF_MONTH);
|
||||
yearSpin = new JSpinner( new SpinnerNumberModel(
|
||||
currentYear,
|
||||
startYear, lastYear, 1 ));
|
||||
monthSpin = new JSpinner( new SpinnerNumberModel(
|
||||
currentMonth, 1 , 12 ,
|
||||
1 ));
|
||||
// hourSpin = new JSpinner( new javax.swing.SpinnerNumberModel(
|
||||
// currentHour, 0 , 23 ,
|
||||
// 1 ));
|
||||
|
||||
yearPanel.setLayout( new FlowLayout());
|
||||
yearPanel.setBackground(controlLineColor);
|
||||
|
||||
yearSpin.setPreferredSize( new Dimension( 48 , 20 ));
|
||||
yearSpin.setName( " Year " );
|
||||
yearSpin.setEditor( new JSpinner.NumberEditor(yearSpin, " #### " ));
|
||||
yearSpin.addChangeListener( this );
|
||||
yearPanel.add(yearSpin);
|
||||
|
||||
JLabel yearLabel = new JLabel( " 年 " );
|
||||
yearLabel.setForeground(controlTextColor);
|
||||
yearPanel.add(yearLabel);
|
||||
|
||||
monthSpin.setPreferredSize( new Dimension( 35 , 20 ));
|
||||
monthSpin.setName( " Month " );
|
||||
monthSpin.addChangeListener( this );
|
||||
yearPanel.add(monthSpin);
|
||||
|
||||
JLabel monthLabel = new JLabel( " 月 " );
|
||||
monthLabel.setForeground(controlTextColor);
|
||||
yearPanel.add(monthLabel);
|
||||
|
||||
}
|
||||
/* *
|
||||
* 根据日期刷新显示面板
|
||||
*/
|
||||
private void flushWeekAndDayPanal(Calendar c) {
|
||||
// c.set
|
||||
c. set (Calendar.DAY_OF_MONTH, 1 );
|
||||
c.setFirstDayOfWeek( 0 );
|
||||
int firstdayofWeek = c. get (Calendar.DAY_OF_WEEK);
|
||||
int lastdayofWeek = c.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
String colname[] = {
|
||||
" 日 " , " 一 " , " 二 " , " 三 " , " 四 " , " 五 " , " 六 " };
|
||||
int today = getNowCalendar(). get (Calendar.DAY_OF_MONTH);
|
||||
// 设置固定字体,以免调用环境改变影响界面美观
|
||||
dayPanel.setFont( new Font( " 宋体 " , Font.PLAIN, 12 ));
|
||||
dayPanel.setLayout( new GridBagLayout());
|
||||
dayPanel.setBackground(Color.white);
|
||||
|
||||
JLabel cell;
|
||||
|
||||
for ( int i = 0 ; i < 7 ; i ++ ) {
|
||||
cell = new JLabel(colname[i]);
|
||||
cell.setHorizontalAlignment(JLabel.CENTER);
|
||||
cell.setPreferredSize( new Dimension( 25 , 25 ));
|
||||
if (i == 0 || i == 6 ) {
|
||||
cell.setForeground(weekendFontColor);
|
||||
}
|
||||
else {
|
||||
cell.setForeground(weekFontColor);
|
||||
}
|
||||
dayPanel.add(cell, new GridBagConstraints(i, 0 , 1 , 1 , 0.0 , 0.0
|
||||
, GridBagConstraints.CENTER,
|
||||
GridBagConstraints.NONE,
|
||||
new Insets( 0 , 0 , 0 , 0 ), 0 , 0 )
|
||||
);
|
||||
}
|
||||
|
||||
int actionCommandId = 1 ;
|
||||
for ( int i = 0 ; i < 6 ; i ++ ) {
|
||||
for ( int j = 0 ; j < 7 ; j ++ ) {
|
||||
|
||||
JButton numberButton = daysButton[i][j];
|
||||
actionCommandId = Integer.parseInt(numberButton.
|
||||
getActionCommand());
|
||||
if (actionCommandId == today) {
|
||||
numberButton.setBackground(todayBtnColor);
|
||||
}
|
||||
if ( (actionCommandId + firstdayofWeek - 2 ) % 7 == 6 ||
|
||||
(actionCommandId + firstdayofWeek - 2 ) % 7 == 0 ) {
|
||||
numberButton.setForeground(weekendFontColor);
|
||||
}
|
||||
else {
|
||||
numberButton.setForeground(dateFontColor);
|
||||
}
|
||||
|
||||
if (actionCommandId <= lastdayofWeek) {
|
||||
int y = 0 ;
|
||||
if ( (firstdayofWeek - 1 ) <=
|
||||
(j + firstdayofWeek - 1 ) % 7 ) {
|
||||
y = i + 1 ;
|
||||
}
|
||||
else {
|
||||
y = i + 2 ;
|
||||
}
|
||||
dayPanel.add(numberButton,
|
||||
new GridBagConstraints( (j +
|
||||
firstdayofWeek -
|
||||
1 ) %
|
||||
7 , y, 1 , 1 , 0.0 , 0.0
|
||||
, GridBagConstraints.CENTER,
|
||||
GridBagConstraints.NONE,
|
||||
new Insets( 0 , 0 , 0 , 0 ), 0 , 0 )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getSelectedYear() {
|
||||
return ( (Integer) yearSpin.getValue()).intValue();
|
||||
}
|
||||
|
||||
private int getSelectedMonth() {
|
||||
return ( (Integer) monthSpin.getValue()).intValue();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* *
|
||||
* 年月小时的事件处理
|
||||
* @param e ChangeEvent
|
||||
*/
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
JSpinner source = (JSpinner) e.getSource();
|
||||
if (source.getName().equals( " Year " )) {
|
||||
|
||||
calendar. set (Calendar.YEAR, getSelectedYear());
|
||||
dayPanel.removeAll();
|
||||
this .flushWeekAndDayPanal(calendar);
|
||||
dayPanel.revalidate();
|
||||
dayPanel.updateUI();
|
||||
return ;
|
||||
}
|
||||
if (source.getName().equals( " Month " )) {
|
||||
calendar. set (Calendar.MONTH, getSelectedMonth() - 1 );
|
||||
|
||||
dayPanel.removeAll();
|
||||
this .flushWeekAndDayPanal(calendar);
|
||||
dayPanel.revalidate();
|
||||
dayPanel.updateUI();
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
/* *
|
||||
* 日期按钮的鼠标事件处理
|
||||
*/
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
jTextFieldDate.setColumns(10);
|
||||
jTextFieldDate.setEnabled(true);
|
||||
jTextFieldDate.setEditable(true);
|
||||
if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 1 ) {
|
||||
JButton source = (JButton) e.getSource();
|
||||
|
||||
String value = source.getText();
|
||||
int day = Integer.parseInt(value);
|
||||
calendar. set (Calendar.DAY_OF_MONTH, day);
|
||||
Date selectDate = this .getSelectDate();
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
|
||||
pattern);
|
||||
DateChooser. this .setText(simpleDateFormat.format(selectDate));
|
||||
|
||||
int year = calendar. get (Calendar.YEAR);
|
||||
int month = calendar. get (Calendar.MONTH) + 1 ;
|
||||
// System.out.println(year + "年" + month + "月" + day + "日");
|
||||
f.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void mousePressed(MouseEvent e) {
|
||||
// 空实现接口中的方法,不能删除
|
||||
}
|
||||
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
// 空实现接口中的方法,不能删除
|
||||
}
|
||||
|
||||
/* *
|
||||
* 鼠标移动到日历中的事件
|
||||
* @param e MouseEvent
|
||||
*/
|
||||
public void mouseEntered(MouseEvent e) {
|
||||
JButton jbutton = (JButton) e.getSource();
|
||||
jbutton.setBackground(moveButtonColor);
|
||||
|
||||
}
|
||||
|
||||
/* *
|
||||
* 鼠标移出日历中的事件
|
||||
* @param e MouseEvent
|
||||
*/
|
||||
public void mouseExited(MouseEvent e) {
|
||||
JButton jbutton = (JButton) e.getSource();
|
||||
int comm = Integer.parseInt(jbutton.getActionCommand());
|
||||
int today = getNowCalendar(). get (Calendar.DAY_OF_MONTH);
|
||||
if (comm == today) {
|
||||
jbutton.setBackground(todayBtnColor);
|
||||
}
|
||||
else {
|
||||
jbutton.setBackground(palletTableColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* *
|
||||
* 内部类,改变按钮的边框不可编辑区,使外观更加协调。
|
||||
*/
|
||||
class DateChooserButton
|
||||
extends JButton {
|
||||
public DateChooserButton(String text) {
|
||||
super(text);
|
||||
}
|
||||
public Insets getInsets() {
|
||||
return new Insets( 4 , 2 , 0 , 2 );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package top.wms.admin.controller.ys;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class ysNetController {
|
||||
|
||||
|
||||
|
||||
}
|
||||
BIN
wms-webapi/src/main/resources/lib/jna.jar
Normal file
BIN
wms-webapi/src/main/resources/lib/jna.jar
Normal file
Binary file not shown.
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<noInheritable/>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.VC90.CRT"
|
||||
version="9.0.21022.8"
|
||||
processorArchitecture="x86"
|
||||
publicKeyToken="1fc8b3b9a1e18e3b"
|
||||
/>
|
||||
<file name="msvcr90.dll" /> <file name="msvcp90.dll" /> <file name="msvcm90.dll" />
|
||||
</assembly>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<noInheritable/>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.VC90.MFC"
|
||||
version="9.0.21022.8"
|
||||
processorArchitecture="x86"
|
||||
publicKeyToken="1fc8b3b9a1e18e3b"
|
||||
/>
|
||||
<file name="mfc90.dll" /> <file name="mfc90u.dll" /> <file name="mfcm90.dll" /> <file name="mfcm90u.dll" />
|
||||
</assembly>
|
||||
BIN
wms-webapi/src/main/resources/lib/win64/NDAO.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NDAO.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NDFace.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NDFace.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NDPlayer.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NDPlayer.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NDRM_Module.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NDRM_Module.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NDRSA.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NDRSA.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NDRtmp.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NDRtmp.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/ND_Media.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/ND_Media.dll
Normal file
Binary file not shown.
423
wms-webapi/src/main/resources/lib/win64/NV12ToARGB_drvapi.ptx
Normal file
423
wms-webapi/src/main/resources/lib/win64/NV12ToARGB_drvapi.ptx
Normal file
@@ -0,0 +1,423 @@
|
||||
//
|
||||
// Generated by NVIDIA NVVM Compiler
|
||||
// Compiler built on Fri Jul 25 19:36:16 2014 (1406288176)
|
||||
// Cuda compilation tools, release 6.5, V6.5.13
|
||||
//
|
||||
|
||||
.version 4.1
|
||||
.target sm_30
|
||||
.address_size 64
|
||||
|
||||
.const .align 4 .u32 constAlpha;
|
||||
.const .align 4 .b8 constHueColorSpaceMat[36];
|
||||
|
||||
.visible .func _Z7YUV2RGBPjPfS0_S0_(
|
||||
.param .b64 _Z7YUV2RGBPjPfS0_S0__param_0,
|
||||
.param .b64 _Z7YUV2RGBPjPfS0_S0__param_1,
|
||||
.param .b64 _Z7YUV2RGBPjPfS0_S0__param_2,
|
||||
.param .b64 _Z7YUV2RGBPjPfS0_S0__param_3
|
||||
)
|
||||
{
|
||||
.reg .s32 %r<4>;
|
||||
.reg .f32 %f<24>;
|
||||
.reg .s64 %rd<5>;
|
||||
|
||||
|
||||
ld.param.u64 %rd1, [_Z7YUV2RGBPjPfS0_S0__param_0];
|
||||
ld.param.u64 %rd2, [_Z7YUV2RGBPjPfS0_S0__param_1];
|
||||
ld.param.u64 %rd3, [_Z7YUV2RGBPjPfS0_S0__param_2];
|
||||
ld.param.u64 %rd4, [_Z7YUV2RGBPjPfS0_S0__param_3];
|
||||
ld.u32 %r1, [%rd1];
|
||||
cvt.rn.f32.u32 %f1, %r1;
|
||||
ld.u32 %r2, [%rd1+4];
|
||||
cvt.rn.f32.s32 %f2, %r2;
|
||||
add.f32 %f3, %f2, 0fC4000000;
|
||||
ld.u32 %r3, [%rd1+8];
|
||||
cvt.rn.f32.s32 %f4, %r3;
|
||||
add.f32 %f5, %f4, 0fC4000000;
|
||||
ld.const.f32 %f6, [constHueColorSpaceMat];
|
||||
ld.const.f32 %f7, [constHueColorSpaceMat+4];
|
||||
mul.f32 %f8, %f3, %f7;
|
||||
fma.rn.f32 %f9, %f1, %f6, %f8;
|
||||
ld.const.f32 %f10, [constHueColorSpaceMat+8];
|
||||
fma.rn.f32 %f11, %f5, %f10, %f9;
|
||||
st.f32 [%rd2], %f11;
|
||||
ld.const.f32 %f12, [constHueColorSpaceMat+12];
|
||||
ld.const.f32 %f13, [constHueColorSpaceMat+16];
|
||||
mul.f32 %f14, %f3, %f13;
|
||||
fma.rn.f32 %f15, %f1, %f12, %f14;
|
||||
ld.const.f32 %f16, [constHueColorSpaceMat+20];
|
||||
fma.rn.f32 %f17, %f5, %f16, %f15;
|
||||
st.f32 [%rd3], %f17;
|
||||
ld.const.f32 %f18, [constHueColorSpaceMat+24];
|
||||
ld.const.f32 %f19, [constHueColorSpaceMat+28];
|
||||
mul.f32 %f20, %f3, %f19;
|
||||
fma.rn.f32 %f21, %f1, %f18, %f20;
|
||||
ld.const.f32 %f22, [constHueColorSpaceMat+32];
|
||||
fma.rn.f32 %f23, %f5, %f22, %f21;
|
||||
st.f32 [%rd4], %f23;
|
||||
ret;
|
||||
}
|
||||
|
||||
.visible .func (.param .b32 func_retval0) _Z13RGBAPACK_8bitfffj(
|
||||
.param .b32 _Z13RGBAPACK_8bitfffj_param_0,
|
||||
.param .b32 _Z13RGBAPACK_8bitfffj_param_1,
|
||||
.param .b32 _Z13RGBAPACK_8bitfffj_param_2,
|
||||
.param .b32 _Z13RGBAPACK_8bitfffj_param_3
|
||||
)
|
||||
{
|
||||
.reg .s32 %r<10>;
|
||||
.reg .f32 %f<12>;
|
||||
|
||||
|
||||
ld.param.f32 %f1, [_Z13RGBAPACK_8bitfffj_param_0];
|
||||
ld.param.f32 %f2, [_Z13RGBAPACK_8bitfffj_param_1];
|
||||
ld.param.f32 %f3, [_Z13RGBAPACK_8bitfffj_param_2];
|
||||
ld.param.u32 %r1, [_Z13RGBAPACK_8bitfffj_param_3];
|
||||
mov.f32 %f4, 0f00000000;
|
||||
max.f32 %f5, %f1, %f4;
|
||||
mov.f32 %f6, 0f437F0000;
|
||||
min.f32 %f7, %f5, %f6;
|
||||
max.f32 %f8, %f2, %f4;
|
||||
min.f32 %f9, %f8, %f6;
|
||||
max.f32 %f10, %f3, %f4;
|
||||
min.f32 %f11, %f10, %f6;
|
||||
cvt.rzi.u32.f32 %r2, %f11;
|
||||
cvt.rzi.u32.f32 %r3, %f9;
|
||||
shl.b32 %r4, %r3, 8;
|
||||
cvt.rzi.u32.f32 %r5, %f7;
|
||||
shl.b32 %r6, %r5, 16;
|
||||
or.b32 %r7, %r2, %r1;
|
||||
or.b32 %r8, %r7, %r4;
|
||||
or.b32 %r9, %r8, %r6;
|
||||
st.param.b32 [func_retval0+0], %r9;
|
||||
ret;
|
||||
}
|
||||
|
||||
.visible .func (.param .b32 func_retval0) _Z14RGBAPACK_10bitfffj(
|
||||
.param .b32 _Z14RGBAPACK_10bitfffj_param_0,
|
||||
.param .b32 _Z14RGBAPACK_10bitfffj_param_1,
|
||||
.param .b32 _Z14RGBAPACK_10bitfffj_param_2,
|
||||
.param .b32 _Z14RGBAPACK_10bitfffj_param_3
|
||||
)
|
||||
{
|
||||
.reg .s32 %r<13>;
|
||||
.reg .f32 %f<12>;
|
||||
|
||||
|
||||
ld.param.f32 %f1, [_Z14RGBAPACK_10bitfffj_param_0];
|
||||
ld.param.f32 %f2, [_Z14RGBAPACK_10bitfffj_param_1];
|
||||
ld.param.f32 %f3, [_Z14RGBAPACK_10bitfffj_param_2];
|
||||
ld.param.u32 %r1, [_Z14RGBAPACK_10bitfffj_param_3];
|
||||
mov.f32 %f4, 0f00000000;
|
||||
max.f32 %f5, %f1, %f4;
|
||||
mov.f32 %f6, 0f447FC000;
|
||||
min.f32 %f7, %f5, %f6;
|
||||
max.f32 %f8, %f2, %f4;
|
||||
min.f32 %f9, %f8, %f6;
|
||||
max.f32 %f10, %f3, %f4;
|
||||
min.f32 %f11, %f10, %f6;
|
||||
cvt.rzi.u32.f32 %r2, %f11;
|
||||
shr.u32 %r3, %r2, 2;
|
||||
cvt.rzi.u32.f32 %r4, %f9;
|
||||
shl.b32 %r5, %r4, 6;
|
||||
and.b32 %r6, %r5, -256;
|
||||
cvt.rzi.u32.f32 %r7, %f7;
|
||||
shl.b32 %r8, %r7, 14;
|
||||
and.b32 %r9, %r8, -65536;
|
||||
or.b32 %r10, %r3, %r1;
|
||||
or.b32 %r11, %r10, %r6;
|
||||
or.b32 %r12, %r11, %r9;
|
||||
st.param.b32 [func_retval0+0], %r12;
|
||||
ret;
|
||||
}
|
||||
|
||||
.visible .entry Passthru_drvapi(
|
||||
.param .u64 Passthru_drvapi_param_0,
|
||||
.param .u64 Passthru_drvapi_param_1,
|
||||
.param .u64 Passthru_drvapi_param_2,
|
||||
.param .u64 Passthru_drvapi_param_3,
|
||||
.param .u32 Passthru_drvapi_param_4,
|
||||
.param .u32 Passthru_drvapi_param_5
|
||||
)
|
||||
{
|
||||
.reg .pred %p<4>;
|
||||
.reg .s16 %rs<3>;
|
||||
.reg .s32 %r<32>;
|
||||
.reg .f32 %f<9>;
|
||||
.reg .s64 %rd<16>;
|
||||
|
||||
|
||||
ld.param.u64 %rd1, [Passthru_drvapi_param_0];
|
||||
ld.param.u64 %rd2, [Passthru_drvapi_param_1];
|
||||
ld.param.u64 %rd3, [Passthru_drvapi_param_2];
|
||||
ld.param.u64 %rd4, [Passthru_drvapi_param_3];
|
||||
ld.param.u32 %r3, [Passthru_drvapi_param_4];
|
||||
ld.param.u32 %r4, [Passthru_drvapi_param_5];
|
||||
mov.u32 %r5, %ctaid.x;
|
||||
shl.b32 %r6, %r5, 1;
|
||||
mov.u32 %r7, %ntid.x;
|
||||
mov.u32 %r8, %tid.x;
|
||||
shl.b32 %r9, %r8, 1;
|
||||
mad.lo.s32 %r1, %r6, %r7, %r9;
|
||||
mov.u32 %r10, %ntid.y;
|
||||
mov.u32 %r11, %ctaid.y;
|
||||
mov.u32 %r12, %tid.y;
|
||||
mad.lo.s32 %r2, %r10, %r11, %r12;
|
||||
setp.lt.u32 %p1, %r1, %r3;
|
||||
setp.lt.u32 %p2, %r2, %r4;
|
||||
and.pred %p3, %p1, %p2;
|
||||
@!%p3 bra BB3_2;
|
||||
bra.uni BB3_1;
|
||||
|
||||
BB3_1:
|
||||
cvta.to.global.u64 %rd5, %rd3;
|
||||
cvta.to.global.u64 %rd6, %rd1;
|
||||
shr.u64 %rd7, %rd4, 2;
|
||||
cvt.u32.u64 %r13, %rd7;
|
||||
cvt.u32.u64 %r14, %rd2;
|
||||
mad.lo.s32 %r15, %r2, %r14, %r1;
|
||||
cvt.u64.u32 %rd8, %r15;
|
||||
add.s64 %rd9, %rd6, %rd8;
|
||||
add.s32 %r16, %r15, 1;
|
||||
cvt.u64.u32 %rd10, %r16;
|
||||
add.s64 %rd11, %rd6, %rd10;
|
||||
ld.global.u8 %rs1, [%rd9];
|
||||
cvt.rn.f32.u16 %f1, %rs1;
|
||||
ld.global.u8 %rs2, [%rd11];
|
||||
cvt.rn.f32.u16 %f2, %rs2;
|
||||
mov.f32 %f3, 0f00000000;
|
||||
max.f32 %f4, %f1, %f3;
|
||||
mov.f32 %f5, 0f437F0000;
|
||||
min.f32 %f6, %f4, %f5;
|
||||
cvt.rzi.u32.f32 %r17, %f6;
|
||||
shl.b32 %r18, %r17, 8;
|
||||
shl.b32 %r19, %r17, 16;
|
||||
ld.const.u32 %r20, [constAlpha];
|
||||
or.b32 %r21, %r17, %r20;
|
||||
or.b32 %r22, %r21, %r18;
|
||||
or.b32 %r23, %r22, %r19;
|
||||
mad.lo.s32 %r24, %r2, %r13, %r1;
|
||||
mul.wide.u32 %rd12, %r24, 4;
|
||||
add.s64 %rd13, %rd5, %rd12;
|
||||
st.global.u32 [%rd13], %r23;
|
||||
max.f32 %f7, %f2, %f3;
|
||||
min.f32 %f8, %f7, %f5;
|
||||
cvt.rzi.u32.f32 %r25, %f8;
|
||||
shl.b32 %r26, %r25, 8;
|
||||
shl.b32 %r27, %r25, 16;
|
||||
or.b32 %r28, %r25, %r20;
|
||||
or.b32 %r29, %r28, %r26;
|
||||
or.b32 %r30, %r29, %r27;
|
||||
add.s32 %r31, %r24, 1;
|
||||
mul.wide.u32 %rd14, %r31, 4;
|
||||
add.s64 %rd15, %rd5, %rd14;
|
||||
st.global.u32 [%rd15], %r30;
|
||||
|
||||
BB3_2:
|
||||
ret;
|
||||
}
|
||||
|
||||
.visible .entry NV12ToARGB_drvapi(
|
||||
.param .u64 NV12ToARGB_drvapi_param_0,
|
||||
.param .u64 NV12ToARGB_drvapi_param_1,
|
||||
.param .u64 NV12ToARGB_drvapi_param_2,
|
||||
.param .u64 NV12ToARGB_drvapi_param_3,
|
||||
.param .u32 NV12ToARGB_drvapi_param_4,
|
||||
.param .u32 NV12ToARGB_drvapi_param_5
|
||||
)
|
||||
{
|
||||
.reg .pred %p<6>;
|
||||
.reg .s32 %r<98>;
|
||||
.reg .f32 %f<48>;
|
||||
.reg .s64 %rd<24>;
|
||||
|
||||
|
||||
ld.param.u64 %rd3, [NV12ToARGB_drvapi_param_0];
|
||||
ld.param.u64 %rd4, [NV12ToARGB_drvapi_param_2];
|
||||
ld.param.u64 %rd5, [NV12ToARGB_drvapi_param_3];
|
||||
ld.param.u32 %r21, [NV12ToARGB_drvapi_param_4];
|
||||
ld.param.u32 %r20, [NV12ToARGB_drvapi_param_5];
|
||||
ld.param.u32 %r1, [NV12ToARGB_drvapi_param_1];
|
||||
mov.u32 %r22, %ctaid.x;
|
||||
shl.b32 %r23, %r22, 1;
|
||||
mov.u32 %r24, %ntid.x;
|
||||
mov.u32 %r25, %tid.x;
|
||||
shl.b32 %r26, %r25, 1;
|
||||
mad.lo.s32 %r2, %r23, %r24, %r26;
|
||||
mov.u32 %r27, %ntid.y;
|
||||
mov.u32 %r28, %ctaid.y;
|
||||
mov.u32 %r29, %tid.y;
|
||||
mad.lo.s32 %r3, %r27, %r28, %r29;
|
||||
setp.lt.u32 %p1, %r2, %r21;
|
||||
setp.lt.u32 %p2, %r3, %r20;
|
||||
and.pred %p3, %p1, %p2;
|
||||
@!%p3 bra BB4_7;
|
||||
bra.uni BB4_1;
|
||||
|
||||
BB4_1:
|
||||
cvta.to.global.u64 %rd1, %rd4;
|
||||
cvta.to.global.u64 %rd6, %rd3;
|
||||
shr.u64 %rd7, %rd5, 2;
|
||||
cvt.u32.u64 %r4, %rd7;
|
||||
mad.lo.s32 %r30, %r3, %r1, %r2;
|
||||
cvt.u64.u32 %rd8, %r30;
|
||||
add.s64 %rd9, %rd6, %rd8;
|
||||
ld.global.u8 %r31, [%rd9];
|
||||
shl.b32 %r5, %r31, 2;
|
||||
add.s32 %r32, %r30, 1;
|
||||
cvt.u64.u32 %rd10, %r32;
|
||||
add.s64 %rd11, %rd6, %rd10;
|
||||
ld.global.u8 %r33, [%rd11];
|
||||
shl.b32 %r6, %r33, 2;
|
||||
shr.s32 %r7, %r3, 1;
|
||||
add.s32 %r34, %r7, %r20;
|
||||
mad.lo.s32 %r35, %r34, %r1, %r2;
|
||||
cvt.u64.u32 %rd12, %r35;
|
||||
add.s64 %rd13, %rd6, %rd12;
|
||||
ld.global.u8 %r94, [%rd13];
|
||||
add.s32 %r36, %r35, 1;
|
||||
cvt.u64.u32 %rd14, %r36;
|
||||
add.s64 %rd2, %rd6, %rd14;
|
||||
and.b32 %r37, %r3, 1;
|
||||
setp.eq.b32 %p4, %r37, 1;
|
||||
@!%p4 bra BB4_5;
|
||||
bra.uni BB4_2;
|
||||
|
||||
BB4_2:
|
||||
ld.global.u8 %r95, [%rd2];
|
||||
shr.u32 %r38, %r20, 1;
|
||||
add.s32 %r39, %r38, -1;
|
||||
setp.ge.u32 %p5, %r7, %r39;
|
||||
@%p5 bra BB4_4;
|
||||
|
||||
add.s32 %r40, %r20, %r7;
|
||||
add.s32 %r41, %r40, 1;
|
||||
mad.lo.s32 %r42, %r41, %r1, %r2;
|
||||
cvt.u64.u32 %rd16, %r42;
|
||||
add.s64 %rd17, %rd6, %rd16;
|
||||
ld.global.u8 %r43, [%rd17];
|
||||
add.s32 %r44, %r94, %r43;
|
||||
add.s32 %r45, %r44, 1;
|
||||
shr.u32 %r94, %r45, 1;
|
||||
add.s32 %r46, %r42, 1;
|
||||
cvt.u64.u32 %rd18, %r46;
|
||||
add.s64 %rd19, %rd6, %rd18;
|
||||
ld.global.u8 %r47, [%rd19];
|
||||
add.s32 %r48, %r95, %r47;
|
||||
add.s32 %r49, %r48, 1;
|
||||
shr.u32 %r95, %r49, 1;
|
||||
|
||||
BB4_4:
|
||||
shl.b32 %r50, %r94, 12;
|
||||
or.b32 %r51, %r50, %r5;
|
||||
shl.b32 %r52, %r95, 22;
|
||||
or.b32 %r97, %r51, %r52;
|
||||
or.b32 %r53, %r50, %r6;
|
||||
or.b32 %r96, %r53, %r52;
|
||||
bra.uni BB4_6;
|
||||
|
||||
BB4_5:
|
||||
shl.b32 %r54, %r94, 12;
|
||||
ld.global.u8 %r55, [%rd2];
|
||||
shl.b32 %r56, %r55, 22;
|
||||
or.b32 %r57, %r54, %r5;
|
||||
or.b32 %r97, %r57, %r56;
|
||||
or.b32 %r58, %r54, %r6;
|
||||
or.b32 %r96, %r58, %r56;
|
||||
|
||||
BB4_6:
|
||||
bfe.u32 %r59, %r97, 10, 10;
|
||||
bfe.u32 %r60, %r97, 20, 10;
|
||||
bfe.u32 %r61, %r96, 10, 10;
|
||||
bfe.u32 %r62, %r96, 20, 10;
|
||||
and.b32 %r63, %r97, 1023;
|
||||
cvt.rn.f32.u32 %f1, %r63;
|
||||
add.s32 %r64, %r59, -512;
|
||||
cvt.rn.f32.s32 %f2, %r64;
|
||||
add.s32 %r65, %r60, -512;
|
||||
cvt.rn.f32.s32 %f3, %r65;
|
||||
ld.const.f32 %f4, [constHueColorSpaceMat];
|
||||
ld.const.f32 %f5, [constHueColorSpaceMat+4];
|
||||
mul.f32 %f6, %f2, %f5;
|
||||
fma.rn.f32 %f7, %f1, %f4, %f6;
|
||||
ld.const.f32 %f8, [constHueColorSpaceMat+8];
|
||||
fma.rn.f32 %f9, %f3, %f8, %f7;
|
||||
ld.const.f32 %f10, [constHueColorSpaceMat+12];
|
||||
ld.const.f32 %f11, [constHueColorSpaceMat+16];
|
||||
mul.f32 %f12, %f2, %f11;
|
||||
fma.rn.f32 %f13, %f1, %f10, %f12;
|
||||
ld.const.f32 %f14, [constHueColorSpaceMat+20];
|
||||
fma.rn.f32 %f15, %f3, %f14, %f13;
|
||||
ld.const.f32 %f16, [constHueColorSpaceMat+24];
|
||||
ld.const.f32 %f17, [constHueColorSpaceMat+28];
|
||||
mul.f32 %f18, %f2, %f17;
|
||||
fma.rn.f32 %f19, %f1, %f16, %f18;
|
||||
ld.const.f32 %f20, [constHueColorSpaceMat+32];
|
||||
fma.rn.f32 %f21, %f3, %f20, %f19;
|
||||
and.b32 %r66, %r96, 1023;
|
||||
cvt.rn.f32.u32 %f22, %r66;
|
||||
add.s32 %r67, %r61, -512;
|
||||
cvt.rn.f32.s32 %f23, %r67;
|
||||
add.s32 %r68, %r62, -512;
|
||||
cvt.rn.f32.s32 %f24, %r68;
|
||||
mul.f32 %f25, %f23, %f5;
|
||||
fma.rn.f32 %f26, %f22, %f4, %f25;
|
||||
fma.rn.f32 %f27, %f24, %f8, %f26;
|
||||
mul.f32 %f28, %f23, %f11;
|
||||
fma.rn.f32 %f29, %f22, %f10, %f28;
|
||||
fma.rn.f32 %f30, %f24, %f14, %f29;
|
||||
mul.f32 %f31, %f23, %f17;
|
||||
fma.rn.f32 %f32, %f22, %f16, %f31;
|
||||
fma.rn.f32 %f33, %f24, %f20, %f32;
|
||||
mov.f32 %f34, 0f00000000;
|
||||
max.f32 %f35, %f9, %f34;
|
||||
mov.f32 %f36, 0f447FC000;
|
||||
min.f32 %f37, %f35, %f36;
|
||||
max.f32 %f38, %f15, %f34;
|
||||
min.f32 %f39, %f38, %f36;
|
||||
max.f32 %f40, %f21, %f34;
|
||||
min.f32 %f41, %f40, %f36;
|
||||
cvt.rzi.u32.f32 %r69, %f41;
|
||||
shr.u32 %r70, %r69, 2;
|
||||
cvt.rzi.u32.f32 %r71, %f39;
|
||||
shl.b32 %r72, %r71, 6;
|
||||
and.b32 %r73, %r72, -256;
|
||||
cvt.rzi.u32.f32 %r74, %f37;
|
||||
shl.b32 %r75, %r74, 14;
|
||||
and.b32 %r76, %r75, -65536;
|
||||
ld.const.u32 %r77, [constAlpha];
|
||||
or.b32 %r78, %r70, %r77;
|
||||
or.b32 %r79, %r78, %r73;
|
||||
or.b32 %r80, %r79, %r76;
|
||||
mad.lo.s32 %r81, %r3, %r4, %r2;
|
||||
mul.wide.u32 %rd20, %r81, 4;
|
||||
add.s64 %rd21, %rd1, %rd20;
|
||||
st.global.u32 [%rd21], %r80;
|
||||
max.f32 %f42, %f27, %f34;
|
||||
min.f32 %f43, %f42, %f36;
|
||||
max.f32 %f44, %f30, %f34;
|
||||
min.f32 %f45, %f44, %f36;
|
||||
max.f32 %f46, %f33, %f34;
|
||||
min.f32 %f47, %f46, %f36;
|
||||
cvt.rzi.u32.f32 %r82, %f47;
|
||||
shr.u32 %r83, %r82, 2;
|
||||
cvt.rzi.u32.f32 %r84, %f45;
|
||||
shl.b32 %r85, %r84, 6;
|
||||
and.b32 %r86, %r85, -256;
|
||||
cvt.rzi.u32.f32 %r87, %f43;
|
||||
shl.b32 %r88, %r87, 14;
|
||||
and.b32 %r89, %r88, -65536;
|
||||
or.b32 %r90, %r83, %r77;
|
||||
or.b32 %r91, %r90, %r86;
|
||||
or.b32 %r92, %r91, %r89;
|
||||
add.s32 %r93, %r81, 1;
|
||||
mul.wide.u32 %rd22, %r93, 4;
|
||||
add.s64 %rd23, %rd1, %rd22;
|
||||
st.global.u32 [%rd23], %r92;
|
||||
|
||||
BB4_7:
|
||||
ret;
|
||||
}
|
||||
|
||||
|
||||
BIN
wms-webapi/src/main/resources/lib/win64/NetCloudSDK.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NetCloudSDK.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NetDEVDiscovery.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NetDEVDiscovery.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/NetDEVSDK.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/NetDEVSDK.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/RSA.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/RSA.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/dsp_audio_aac_enc.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/dsp_audio_aac_enc.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/dsp_audio_g711.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/dsp_audio_g711.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/dsp_video_mjpeg.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/dsp_video_mjpeg.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/fisheye_rectify.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/fisheye_rectify.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/intel_gpu_dec.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/intel_gpu_dec.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/libcrypto-3-x64.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/libcrypto-3-x64.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/libcurl.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/libcurl.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/libssl-3-x64.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/libssl-3-x64.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/libtunnel.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/libtunnel.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/mfc90.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/mfc90.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/mfc90u.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/mfc90u.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/mfcm90.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/mfcm90.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/mfcm90u.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/mfcm90u.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/msvcm90.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/msvcm90.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/msvcp120.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/msvcp120.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/msvcp90.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/msvcp90.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/msvcr120.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/msvcr120.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/msvcr90.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/msvcr90.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/mxml1.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/mxml1.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/nvidia_gpu_dec.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/nvidia_gpu_dec.dll
Normal file
Binary file not shown.
BIN
wms-webapi/src/main/resources/lib/win64/pthreadVC2.dll
Normal file
BIN
wms-webapi/src/main/resources/lib/win64/pthreadVC2.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user