Skip to content

Commit 4cc16f1

Browse files
committed
2003-11-02
1 parent 2b0e95c commit 4cc16f1

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

delogo.cpp

+11-9
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,13 @@ PVideoFrame __stdcall EraseLOGO_YUY2::GetFrame(int n, IScriptEnvironment *env)
122122
env->MakeWritable(&frame);
123123

124124
BYTE* dst = frame->GetWritePtr();
125-
const int dst_w = frame->GetRowSize();
126-
const int dst_h = frame->GetHeight();
125+
const int dst_w = frame->GetRowSize();
126+
const int dst_pitch = frame->GetPitch();
127+
const int dst_h = frame->GetHeight();
127128

128129
LOGO_PIXEL_YUY2* lgp = (LOGO_PIXEL_YUY2*)(lgh +1);
129130

130-
dst += lgh->x * 2 + lgh->y * dst_w;
131+
dst += lgh->x * 2 + lgh->y * dst_pitch;
131132

132133
for(int i=0;i<lgh->h && i<dst_h-lgh->y;i++){
133134
for(int j=0;j<lgh->w && j<dst_w/2-lgh->x;j+=2){
@@ -154,7 +155,7 @@ PVideoFrame __stdcall EraseLOGO_YUY2::GetFrame(int n, IScriptEnvironment *env)
154155
dst += 4;
155156
lgp += 1;
156157
}
157-
dst += dst_w - j * 2;
158+
dst += dst_pitch - j * 2;
158159
lgp += (lgh->w - j)/2;
159160
}
160161

@@ -176,11 +177,12 @@ PVideoFrame __stdcall AddLOGO_YUY2::GetFrame(int n, IScriptEnvironment *env)
176177

177178
BYTE* dst = frame->GetWritePtr();
178179
const int dst_w = frame->GetRowSize();
180+
const int dst_pitch = frame->GetPitch();
179181
const int dst_h = frame->GetHeight();
180182

181183
LOGO_PIXEL_YUY2* lgp = (LOGO_PIXEL_YUY2*)(lgh +1);
182184

183-
dst += lgh->x * 2 + lgh->y * dst_w;
185+
dst += lgh->x * 2 + lgh->y * dst_pitch;
184186

185187
for(int i=0;i<lgh->h && i<dst_h-lgh->y;i++){
186188
for(int j=0;j<lgh->w && j<dst_w/2-lgh->x;j+=2){
@@ -195,8 +197,8 @@ PVideoFrame __stdcall AddLOGO_YUY2::GetFrame(int n, IScriptEnvironment *env)
195197
dst += 4;
196198
lgp += 1;
197199
}
198-
dst += dst_w - j * 2;
199-
lgp += (lgh->w - j)/2;;
200+
dst += dst_pitch - j * 2;
201+
lgp += (lgh->w - j)/2;
200202
}
201203
return frame;
202204
}
@@ -309,14 +311,14 @@ void deLOGO_Base::AdjustLogo(int x,int y,int depth)
309311
adjx = x % 4;
310312
} else {
311313
adjdata->x = data->x + int((x-3)/4);
312-
adjx = 4 - (-x%4);
314+
adjx = (4 + (x%4)) %4;
313315
}
314316
if(y>=0){
315317
adjdata->y = data->y + int(y/4);
316318
adjy = y % 4;
317319
} else {
318320
adjdata->y = data->y + int((y-3)/4);
319-
adjy = 4 - (-y%4);
321+
adjy = (4 + (y%4)) %4;
320322
}
321323

322324
adjdata->w = w = data->w + 1; // 1/4単位調整するため

delogo.rc

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//Microsoft Developer Studio generated resource script.
22
//
33
#include "resource.h"
4-
#define VS_VERSION_INFO 1
4+
55
#define APSTUDIO_READONLY_SYMBOLS
66
/////////////////////////////////////////////////////////////////////////////
77
//
@@ -28,7 +28,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
2828
//
2929

3030
VS_VERSION_INFO VERSIONINFO
31-
FILEVERSION 0,0,1,2
31+
FILEVERSION 0,0,1,3
3232
PRODUCTVERSION 0,0,1,0
3333
FILEFLAGSMASK 0x3fL
3434
#ifdef _DEBUG
@@ -42,21 +42,21 @@ VS_VERSION_INFO VERSIONINFO
4242
BEGIN
4343
BLOCK "StringFileInfo"
4444
BEGIN
45-
BLOCK "041104b0"
45+
BLOCK "041104c0"
4646
BEGIN
47-
VALUE "Comments", "YUY2��p"
47+
VALUE "Comments", "YUY2��p\0"
4848
VALUE "FileDescription", "���ߐ����S �t�B���^ Plugin for AviSynth 2.5\0"
49-
VALUE "FileVersion", "0.0.1.2\0"
49+
VALUE "FileVersion", "0.0.1.3\0"
5050
VALUE "InternalName", "deLogo\0"
5151
VALUE "LegalCopyright", "(C) MakKi\0"
5252
VALUE "OriginalFilename", "delogo.dll\0"
5353
VALUE "ProductName", "���ߐ����S �t�B���^\0"
54-
VALUE "ProductVersion", "0.01b\0"
54+
VALUE "ProductVersion", "0.01c\0"
5555
END
5656
END
5757
BLOCK "VarFileInfo"
5858
BEGIN
59-
VALUE "Translation", 0x411, 1200
59+
VALUE "Translation", 0x411, 1216
6060
END
6161
END
6262

readme.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-----------------------------------------------------------------------
2-
���ߐ����S �t�B���^ for AviSynth 2.5 ver 0.01b by MakKi
2+
���ߐ����S �t�B���^ for AviSynth 2.5 ver 0.01c by MakKi
33
-----------------------------------------------------------------------
44

55
�y�@�\�z
@@ -60,6 +60,8 @@
6060

6161
�y�X�V�����z
6262

63+
2003/11/02 ver 0.01c �Epos_x,pos_y�̋������������������̂��C��
64+
�ECrop���Ă��鎞���S�������o�O�C��
6365
2003/11/01 ver 0.01b �Epos_x,pos_y�ɕ��̒l�����Ă��������ɂȂ��Ă����o�O�C��
6466
2003/10/26 ver 0.01a �Epos_x,pos_y��-200�����̎��G���[�ɂȂ邱�Ƃ��������̂��C��
6567
2003/10/01 ver 0.01 �E���J

0 commit comments

Comments
 (0)