add Samsung app2 tags, small optimize

git-svn-id: svn://kolibrios.org@6315 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2016-03-10 21:44:56 +00:00
parent 5240ce4bd2
commit 17a5bf20e7

View File

@ -52,6 +52,10 @@ dd gr_927c_Pa
dw 0x927c ;app2 ¤«ï Canon dw 0x927c ;app2 ¤«ï Canon
db 'Ca' db 'Ca'
dd gr_927c_Ca dd gr_927c_Ca
dw 0x927c ;app2 ¤«ï Samsung
db 'Sa'
dd gr_927c_Sa
.end: .end:
align 4 align 4
@ -819,6 +823,59 @@ db 0x40,0x24,'FilterInfo',0
dd 0 dd 0
;¤ ­­ë¥ app2 ¤«ï Samsung
align 4
gr_927c_Sa:
db 0x00,0x01,'MakerNoteVersion',0
db 0x00,0x02,'DeviceType',0
db 0x00,0x03,'SamsungModelID',0
db 0x00,0x21,'PictureWizard',0
db 0x00,0x30,'LocalLocationName',0
db 0x00,0x31,'LocationName',0
db 0x00,0x35,'PreviewIFD',0
db 0x00,0x43,'CameraTemperature',0
db 0x00,0x45,'RawCompressionMode',0
db 0x01,0x00,'FaceDetect',0
db 0x01,0x20,'FaceRecognition',0
db 0x01,0x23,'FaceName',0
db 0xa0,0x01,'FirmwareName',0
db 0xa0,0x03,'LensType',0
db 0xa0,0x04,'LensFirmware',0
db 0xa0,0x05,'InternalLensSerialNumber',0
db 0xa0,0x10,'SensorAreas',0
db 0xa0,0x11,'ColorSpace',0
db 0xa0,0x12,'SmartRange',0
db 0xa0,0x13,'ExposureCompensation',0
db 0xa0,0x14,'ISO',0
db 0xa0,0x18,'ExposureTime',0
db 0xa0,0x19,'FNumber',0
db 0xa0,0x1a,'FocalLengthIn35mmFormat',0
db 0xa0,0x20,'EncryptionKey',0
db 0xa0,0x21,'WB_RGGBLevelsUncorrected',0
db 0xa0,0x22,'WB_RGGBLevelsAuto',0
db 0xa0,0x23,'WB_RGGBLevelsIlluminator1',0
db 0xa0,0x24,'WB_RGGBLevelsIlluminator2',0
db 0xa0,0x28,'WB_RGGBLevelsBlack',0
db 0xa0,0x30,'ColorMatrix',0
db 0xa0,0x31,'ColorMatrixSRGB',0
db 0xa0,0x32,'ColorMatrixAdobeRGB',0
db 0xa0,0x33,'CbCrMatrixDefault',0
db 0xa0,0x34,'CbCrMatrix',0
db 0xa0,0x35,'CbCrGainDefault',0
db 0xa0,0x36,'CbCrGain',0
db 0xa0,0x40,'ToneCurveSRGBDefault',0
db 0xa0,0x41,'ToneCurveAdobeRGBDefault',0
db 0xa0,0x42,'ToneCurveSRGB',0
db 0xa0,0x43,'ToneCurveAdobeRGB',0
db 0xa0,0x48,'RawData?',0
db 0xa0,0x50,'Distortion?',0
db 0xa0,0x51,'ChromaticAberration?',0
db 0xa0,0x52,'Vignetting?',0
db 0xa0,0x53,'VignettingCorrection?',0
db 0xa0,0x54,'VignettingSetting?',0
dd 0
;input: ;input:
; bof - 㪠§ â¥«ì ­  ­ ç «® ä ©«  ; bof - 㪠§ â¥«ì ­  ­ ç «® ä ©« 
; app1 - 㪠§ â¥«ì ¤«ï § ¯®«­¥­¨ï exif.app1 ; app1 - 㪠§ â¥«ì ¤«ï § ¯®«­¥­¨ï exif.app1
@ -957,9 +1014,7 @@ pushad
mov ebx,dword[eax+8] mov ebx,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
mov eax,[app1] mov eax,[app1]
add ebx,[eax+4] add ebx,[eax+4]
@ -1021,9 +1076,7 @@ pushad
mov ebx,dword[eax+4] mov ebx,dword[eax+4]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
cmp ebx,4 cmp ebx,4
jle .no_suport ;­ §¢ ­¨¥ ¯à®¨§¢®¤¨â¥«ï ¬¥­ìè¥ 4 ᨬ¢®«®¢, ­¥ ¯®¤¤¥à¦¨ ¢ ¥âáï jle .no_suport ;­ §¢ ­¨¥ ¯à®¨§¢®¤¨â¥«ï ¬¥­ìè¥ 4 ᨬ¢®«®¢, ­¥ ¯®¤¤¥à¦¨ ¢ ¥âáï
@ -1031,9 +1084,7 @@ pushad
mov ebx,dword[eax+8] mov ebx,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
;¯à®¢¥àª  ¯®¤¤¥à¦¨¢ ¥¬ëå ¯à®¨§¢®¤¨â¥«¥© ;¯à®¢¥àª  ¯®¤¤¥à¦¨¢ ¥¬ëå ¯à®¨§¢®¤¨â¥«¥©
@ -1045,6 +1096,10 @@ pushad
je .suport je .suport
cmp dword[ebx],'Pana' cmp dword[ebx],'Pana'
je .suport je .suport
cmp dword[ebx],'SAMS'
je .suport
cmp dword[ebx],'sams'
je .suport
;¢á¥ ®áâ «ì­ë¥ ­¥ ¯®¤¤¥à¦¨¢ îâáï ;¢á¥ ®áâ «ì­ë¥ ­¥ ¯®¤¤¥à¦¨¢ îâáï
jmp .no_suport jmp .no_suport
@ -1067,23 +1122,36 @@ pushad
sub eax,8 sub eax,8
mov dword[edi+4],eax mov dword[edi+4],eax
mov word[edi+offs_id_gr_mak],'Ni' mov word[edi+offs_id_gr_mak],'Ni'
jmp .end_f
@@: @@:
cmp dword[ebx],'Pana' cmp dword[ebx],'Pana'
jne @f jne @f
;for Panasonic ;for Panasonic
add dword[edi],12 add dword[edi],12
mov word[edi+offs_id_gr_mak],'Pa' mov word[edi+offs_id_gr_mak],'Pa'
jmp .end_f
@@: @@:
cmp dword[ebx],'Cano' cmp dword[ebx],'Cano'
jne @f jne @f
;for Canon ;for Canon
mov word[edi+offs_id_gr_mak],'Ca' mov word[edi+offs_id_gr_mak],'Ca'
jmp .end_f
@@:
cmp dword[ebx],'SAMS'
je @f
cmp dword[ebx],'sams'
je @f
jmp .end_f
@@:
;for Samsung
mov word[edi+offs_id_gr_mak],'Sa'
jmp .end_f
@@: @@:
jmp @f
.no_suport: .no_suport:
mov dword[edi],0 mov dword[edi],0
@@: .end_f:
popad popad
ret ret
endp endp
@ -1215,9 +1283,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov esi,dword[eax+8] mov esi,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror si,8 bswap esi
ror esi,16
ror si,8
@@: @@:
mov eax,[app1] mov eax,[app1]
mov eax,[eax+4] mov eax,[eax+4]
@ -1269,9 +1335,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov esi,dword[eax+8] mov esi,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror si,8 bswap esi
ror esi,16
ror si,8
@@: @@:
mov eax,[app1] mov eax,[app1]
mov eax,[eax+4] mov eax,[eax+4]
@ -1316,9 +1380,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov ebx,dword[eax+8] mov ebx,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
stdcall str_len,edi stdcall str_len,edi
add edi,eax add edi,eax
@ -1343,9 +1405,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov ebx,dword[eax+8] mov ebx,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
stdcall str_len,edi stdcall str_len,edi
add edi,eax add edi,eax
@ -1355,9 +1415,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov eax,[ebx] mov eax,[ebx]
bt edx,0 bt edx,0
jnc @f jnc @f
ror ax,8 bswap eax
ror eax,16
ror ax,8
@@: @@:
stdcall convert_int_to_str, [t_max] ;áâ ¢¨¬ 1-¥ ç¨á«® stdcall convert_int_to_str, [t_max] ;áâ ¢¨¬ 1-¥ ç¨á«®
stdcall str_n_cat,edi,txt_div,[t_max] ;áâ ¢¨¬ §­ ª ¤¥«¥­¨ï stdcall str_n_cat,edi,txt_div,[t_max] ;áâ ¢¨¬ §­ ª ¤¥«¥­¨ï
@ -1366,9 +1424,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov eax,[ebx+4] mov eax,[ebx+4]
bt edx,0 bt edx,0
jnc @f jnc @f
ror ax,8 bswap eax
ror eax,16
ror ax,8
@@: @@:
stdcall convert_int_to_str, [t_max] ;áâ ¢¨¬ 2-¥ ç¨á«® stdcall convert_int_to_str, [t_max] ;áâ ¢¨¬ 2-¥ ç¨á«®
;.over4b_05: ;.over4b_05:
@ -1433,9 +1489,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov esi,dword[eax+8] mov esi,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror si,8 bswap esi
ror esi,16
ror si,8
@@: @@:
mov eax,[app1] mov eax,[app1]
mov eax,[eax+4] mov eax,[eax+4]
@ -1488,9 +1542,7 @@ proc read_tag_value, app1:dword, t_max:dword
mov ebx,dword[eax+8] mov ebx,dword[eax+8]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
stdcall str_len,edi stdcall str_len,edi
add edi,eax add edi,eax
@ -1522,9 +1574,7 @@ get_tag_data_size:
mov ebx,dword[eax+4] mov ebx,dword[eax+4]
bt edx,0 bt edx,0
jnc @f jnc @f
ror bx,8 bswap ebx
ror ebx,16
ror bx,8
@@: @@:
ret ret
@ -1607,7 +1657,6 @@ align 4
xor edx,edx ;®ç¨áâ¨âì edx xor edx,edx ;®ç¨áâ¨âì edx
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
push edx ;¯®«®¦¨âì ¢ á⥪ push edx ;¯®«®¦¨âì ¢ á⥪
;dec edi ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx call .str ;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
pop eax pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï)) @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))