Skip to content

Commit

Permalink
2008-01-07
Browse files Browse the repository at this point in the history
  • Loading branch information
makiuchi-d committed Sep 23, 2015
1 parent 134e722 commit c5cc2a4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 28 deletions.
9 changes: 5 additions & 4 deletions Avisynth/delogo.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ class deLOGO : public GenericVideoFilter {
}

// ロゴデータ数取得
unsigned char num;
LOGO_FILE_HEADER lfh;
DWORD readed = 0;
SetFilePointer(hfile,LOGO_FILE_HEADER_STR_SIZE,0,FILE_BEGIN);
ReadFile(hfile,&num,1,&readed,NULL);
if(readed!=1){
SetFilePointer(hfile,0,0,FILE_BEGIN);
ReadFile(hfile,&lfh,sizeof(LOGO_FILE_HEADER),&readed,NULL);
if(readed!=sizeof(LOGO_FILE_HEADER)){
throw "Failed in reading logofile. - ロゴデータの読み込みに失敗しました";
}
unsigned int num = SWAP_ENDIAN(lfh.logonum.l);

// 該当ロゴを探す
int i;
Expand Down
8 changes: 4 additions & 4 deletions Avisynth/delogo.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,4,0
PRODUCTVERSION 0,0,4,0
FILEVERSION 0,0,5,0
PRODUCTVERSION 0,0,5,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS VOS__WINDOWS32
Expand All @@ -21,12 +21,12 @@ BEGIN
BEGIN
VALUE "Comments", "YUY2,YV12 �Ή�\0"
VALUE "FileDescription", "���ߐ����S �t�B���^ Plugin for AviSynth 2.5\0"
VALUE "FileVersion", "0.0.4.0\0"
VALUE "FileVersion", "0.0.5.0\0"
VALUE "InternalName", "deLogo\0"
VALUE "LegalCopyright", "(C) MakKi\0"
VALUE "OriginalFilename", "delogo.dll\0"
VALUE "ProductName", "���ߐ����S �t�B���^\0"
VALUE "ProductVersion", "0.04\0"
VALUE "ProductVersion", "0.05\0"
END
END
BLOCK "VarFileInfo"
Expand Down
35 changes: 16 additions & 19 deletions logo.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
/*====================================================================
* ロゴパターン logo.h
*
*
*
* [ロゴデータファイル構造]
*
* "logo file x.xx\n" // ファイルヘッダ文字列:バージョン情報とか(31byte)
* "<logo file x.xx>" // ファイルヘッダ文字列:バージョン情報(28byte)
* +----
* | ファイルに含まれるロゴデータの数(1byte)
* | ファイルに含まれるロゴデータの数(4byte, BigEndian)
* +----
* | LOGO_HEADER // データヘッダ
* +----
Expand All @@ -25,25 +23,24 @@
#ifndef ___LOGO_H
#define ___LOGO_H

/* ロゴファイルヘッダ
* 31BYTEの文字列
* データ数 1BYTE
*/
#define LOGO_FILE_HEADER_STR "<logo data file ver0.1>\0\0\0\0\0\0\0\0\0\0\0"
#define LOGO_FILE_HEADER_STR_SIZE 31
/* ロゴヘッダ文字列 */
#define LOGO_FILE_HEADER_STR "<logo data file ver0.1>\0\0\0\0\0"
#define LOGO_FILE_HEADER_STR_SIZE 28

/*--------------------------------------------------------------------
* LOGO_FILE_HEADER 構造体
* ファイルヘッダ.
* バージョン情報と含まれるデータ数
*-------------------------------------------------------------------*/
typedef struct {
char str[LOGO_FILE_HEADER_STR_SIZE];
unsigned char logonum;
char str[LOGO_FILE_HEADER_STR_SIZE];
union{
unsigned long l;
unsigned char c[4];
} logonum;
} LOGO_FILE_HEADER;


/* ロゴデータ最大サイズ:
* ロゴデータをプロファイルに保存しないようにしたため、
* サイズ制限は実質なくなった
*/
#define LOGO_MAXPIXEL (21840)
#define LOGO_MAXSIZE (0x40000)
#define SWAP_ENDIAN(x) (((x&0xff)<<24)|((x&0xff00)<<8)|((x&0xff0000)>>8)|((x&0xff000000)>>24))

/* 不透明度最大値 */
#define LOGO_MAX_DP 1000
Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----------------------------------------------------------------------
���ߐ����S �t�B���^ for AviSynth 2.5 ver 0.04 by MakKi
���ߐ����S �t�B���^ for AviSynth 2.5 ver 0.05 by MakKi
-----------------------------------------------------------------------

�y�@�\�z
Expand Down Expand Up @@ -67,6 +67,7 @@

�y�X�V�����z

2008/01/07 ver 0.05 �E���S�t�@�C���̍ő�f�[�^���g���ɑΉ�
2007/06/06 ver 0.04 �Edepth�������Ȃ��ꍇ������o�O���C��
�Eyc_y,yc_u,yc_v�̌������ア�o�O���C��
2007/03/21 ver 0.03 �E�S����������
Expand Down

0 comments on commit c5cc2a4

Please sign in to comment.