<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>내 맘대로 보는 세상 &#187; Computer</title>
	<atom:link href="http://b.mytears.org/tag/computer/feed" rel="self" type="application/rss+xml" />
	<link>http://b.mytears.org</link>
	<description>평범한 일상 속의 보석찾기..</description>
	<lastBuildDate>Sat, 19 Jun 2010 11:27:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>wp-codebox, wp-openid 버그 패치</title>
		<link>http://b.mytears.org/2009/01/1236</link>
		<comments>http://b.mytears.org/2009/01/1236#comments</comments>
		<pubDate>Thu, 29 Jan 2009 08:45:12 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1236</guid>
		<description><![CDATA[<p>wp-codebox의 경우 jquery 를 사용하는 다른 플러그인과 함께 사용할 경우 jquery를 두 번 호출하게 되어 자바스크립트 에러를 발생시킵니다.</p>
<p>script를 wp_enqueue_script를 사용해서 삽입하지 않고, 직접 삽입을 하기 때문에 발생하는 문제인데, 아래 패치를 적용하면 문제를 일으키지 않습니다.</p>
<p></p>
<p></p>
<p>?View Code DIFFdiff -urN wp-codebox_org/main.php wp-codebox/main.php</p>
<p>--- wp-codebox_org/main.php	2008-12-27 08:52:10.000000000 +0900</p>
<p>+++ wp-codebox/main.php	2009-01-29 22:47:24.525402649 +0900</p>
<p>@@ -1,15 +1,22 @@</p>
<p> &#60;?php </p>
<p>&#160;</p>
<p> // function for head output ...</p>
<p><a href='http://b.mytears.org/2009/01/1236'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>9/14/2006 -- <a href="http://b.mytears.org/2006/09/411" title="wordpress: 최근 추가한 플러그인들&#8230;">wordpress: 최근 추가한 플러그인들&#8230; (4)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1414" title="WP-Eolin 플러그인">WP-Eolin 플러그인 (3)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1409" title="Daum 블로거 뉴스를 위한 Trackback for Korean 패치">Daum 블로거 뉴스를 위한 Trackback for Korean 패치 (0)</a></li><li>2/2/2009 -- <a href="http://b.mytears.org/2009/02/1355" title="워드프레스 2.7을 위한 Trackback for Korean 패치">워드프레스 2.7을 위한 Trackback for Korean 패치 (6)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1236&rdate=2009-01-29+17%3A45%3A12&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1236&rdate=2009-01-29+17%3A45%3A12&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>wp-codebox의 경우 jquery 를 사용하는 다른 플러그인과 함께 사용할 경우 jquery를 두 번 호출하게 되어 자바스크립트 에러를 발생시킵니다.</p>
<p>script를 wp_enqueue_script를 사용해서 삽입하지 않고, 직접 삽입을 하기 때문에 발생하는 문제인데, 아래 패치를 적용하면 문제를 일으키지 않습니다.</p>
<p><span id="more-1236"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1236code3'); return false;">View Code</a> DIFF</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p12363"><td class="code" id="p1236code3"><pre class="diff" style="font-family:monospace;">diff -urN wp-codebox_org/main.php wp-codebox/main.php
<span style="color: #888822;">--- wp-codebox_org/main.php	<span style="">2008</span>-<span style="">12</span>-<span style="">27</span> 08:<span style="">52</span>:<span style="">10.000000000</span> +0900</span>
<span style="color: #888822;">+++ wp-codebox/main.php	<span style="">2009</span>-01-<span style="">29</span> <span style="">22</span>:<span style="">47</span>:<span style="">24.525402649</span> +0900</span>
<span style="color: #440088;">@@ -<span style="">1</span>,<span style="">15</span> +<span style="">1</span>,<span style="">22</span> @@</span>
 &lt;?php 
&nbsp;
 // function for head output sytles
<span style="color: #00b000;">+function codebox_init<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span></span>
<span style="color: #00b000;">+	global $cb_path;</span>
<span style="color: #00b000;">+	</span>
<span style="color: #00b000;">+	//URL to the plugin directory</span>
<span style="color: #00b000;">+	$cb_path = WP_PLUGIN_URL.&quot;/wp-codebox&quot;;	</span>
<span style="color: #00b000;">+	</span>
<span style="color: #00b000;">+	wp_enqueue_script<span style="">&#40;</span> 'jquery' <span style="">&#41;</span>;</span>
<span style="color: #00b000;">+	wp_enqueue_script<span style="">&#40;</span> 'wp-codebox', $cb_path.&quot;/js/codebox.js&quot;, FALSE, <span style="">1.3</span> <span style="">&#41;</span>;</span>
<span style="color: #00b000;">+<span style="">&#125;</span></span>
 function codebox_header<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span>
 	global $cb_path;
<span style="color: #991111;">-	$cb_path = get_bloginfo<span style="">&#40;</span>'wpurl'<span style="">&#41;</span>.&quot;/wp-content/plugins/wp-codebox&quot;;	//URL to the plugin directory</span>
<span style="color: #991111;">-	$hHead = &quot;\n&quot;.&quot;&lt;!-- Start Of Script Generated By CodeBox --&gt;&quot;.&quot;\n&quot;;</span>
<span style="color: #991111;">-	$hHead .= &quot;	&lt;link rel=\&quot;stylesheet\&quot; href=\&quot;<span style="">&#123;</span>$cb_path<span style="">&#125;</span>/css/codebox.css\&quot; type=\&quot;text/css\&quot; media=\&quot;screen\&quot; /&gt;\n&quot;;</span>
<span style="color: #991111;">-	$hHead .= &quot;	&lt;script language=\&quot;javascript\&quot; type=\&quot;text/javascript\&quot; src=\&quot;&quot;.get_bloginfo<span style="">&#40;</span>'wpurl'<span style="">&#41;</span>.&quot;/wp-includes/js/jquery/jquery.js\&quot;&gt;&lt;/script&gt;\n&quot;;</span>
<span style="color: #991111;">-	$hHead .= &quot;	&lt;script language=\&quot;javascript\&quot; type=\&quot;text/javascript\&quot; src=\&quot;<span style="">&#123;</span>$cb_path<span style="">&#125;</span>/js/codebox.js\&quot; &gt;&lt;/script&gt;\n&quot;;</span>
<span style="color: #991111;">-	$hHead .= &quot;&lt;!-- End Of Script Generated By CodeBox --&gt;&quot;.&quot;\n&quot;;</span>
<span style="color: #991111;">-	print<span style="">&#40;</span>$hHead<span style="">&#41;</span>;</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+	echo '</span>
<span style="color: #00b000;">+	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;'.$cb_path.'/css/codebox.css&quot; media=&quot;screen&quot; /&gt;</span>
<span style="color: #00b000;">+	';</span>
<span style="color: #00b000;">+	</span>
 <span style="">&#125;</span>
&nbsp;
 // function for admin head output only
<span style="color: #440088;">@@ -<span style="">170</span>,<span style="">4</span> +<span style="">177</span>,<span style="">4</span> @@</span>
   $agent = $_SERVER<span style="">&#91;</span>'HTTP_USER_AGENT'<span style="">&#93;</span>;
   return eregi<span style="">&#40;</span>&quot;win&quot;, $agent<span style="">&#41;</span> &amp;&amp; eregi<span style="">&#40;</span>&quot;msie&quot;,$agent<span style="">&#41;</span> &amp;&amp; !eregi<span style="">&#40;</span>&quot;opera&quot;,$agent<span style="">&#41;</span>;
 <span style="">&#125;</span>
<span style="color: #991111;">-?&gt;</span>
<span style="color: #aaaaaa; font-style: italic;">\ No newline at end of file</span>
<span style="color: #00b000;">+?&gt;</span>
diff -urN wp-codebox_org/wp-codebox.php wp-codebox/wp-codebox.php
<span style="color: #888822;">--- wp-codebox_org/wp-codebox.php	<span style="">2008</span>-<span style="">12</span>-<span style="">27</span> 08:<span style="">52</span>:<span style="">10.000000000</span> +0900</span>
<span style="color: #888822;">+++ wp-codebox/wp-codebox.php	<span style="">2009</span>-01-<span style="">29</span> <span style="">22</span>:<span style="">40</span>:<span style="">01.649298169</span> +0900</span>
<span style="color: #440088;">@@ -<span style="">64</span>,<span style="">6</span> +<span style="">64</span>,<span style="">7</span> @@</span>
 <span style="">&#125;</span>
&nbsp;
 // output to the &lt;head&gt; section of the page
<span style="color: #00b000;">+add_action<span style="">&#40;</span>'init', 'codebox_init'<span style="">&#41;</span>;</span>
 add_action<span style="">&#40;</span>'wp_head', 'codebox_header'<span style="">&#41;</span>;
&nbsp;
 /**</pre></td></tr></table></div>

<p>그리고 wp-openid의 경우 page와 함께 사용하는 것을 고려하지 않고 있기 때문에 page에 코멘트를 남길 수 있도록 해놓은 경우에 자바스크립트 에러를 발생시킵니다. </p>
<p>이 부분은 common.php의 991번째 줄 정도를 다음과 같이 수정하면 해결할 수 있습니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1236code4'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p12364"><td class="code" id="p1236code4"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> openid_js_setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// if (is_single() || is_comments_popup() || is_admin()) {</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_comments_popup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>원 저작자들에게 메일을 보내놓기는 했는데, 적용이 언제쯤 될지는 잘 모르겠네요. :)</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1236&rdate=2009-01-29+17%3A45%3A12&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1236&rdate=2009-01-29+17%3A45%3A12&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>9/14/2006 -- <a href="http://b.mytears.org/2006/09/411" title="wordpress: 최근 추가한 플러그인들&#8230;">wordpress: 최근 추가한 플러그인들&#8230; (4)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1414" title="WP-Eolin 플러그인">WP-Eolin 플러그인 (3)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1409" title="Daum 블로거 뉴스를 위한 Trackback for Korean 패치">Daum 블로거 뉴스를 위한 Trackback for Korean 패치 (0)</a></li><li>2/2/2009 -- <a href="http://b.mytears.org/2009/02/1355" title="워드프레스 2.7을 위한 Trackback for Korean 패치">워드프레스 2.7을 위한 Trackback for Korean 패치 (6)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1236/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>번역: 한국의 홈브류 인터넷</title>
		<link>http://b.mytears.org/2009/01/1228</link>
		<comments>http://b.mytears.org/2009/01/1228#comments</comments>
		<pubDate>Wed, 28 Jan 2009 04:57:28 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[activeX]]></category>
		<category><![CDATA[banking]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[inisafeweb]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Intranet]]></category>
		<category><![CDATA[javasciprt]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[seed]]></category>
		<category><![CDATA[translating]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xecureweb]]></category>
		<category><![CDATA[공인인증]]></category>
		<category><![CDATA[문제]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1228</guid>
		<description><![CDATA[<p>오랫만에 일찍 학교에 나온 김에 아침부터 서핑을 즐기다가, 제가 아침에 공개한 글과 관련된 좋은 내용의 글을 발견해서 살짜쿵 번역을 해봤습니다. &#8216;국내 CA 시스템 = 공인인증 시스템&#8217; 이라고 이해하시면 되겠습니다. 약간의 의역이 있고, 오역도 있을 수 있습니다. -_-a</p>
<p>읽다보면 참 부끄러운 부분이 많아요.</p>
<p>원문: http://web.archive.org/we...ean-home-brew-on-the-web/</p>
<p>&#8211;</p>
<p>Vladimir씨는 SEED에 관련된 기술적인 문제를 얘기하기 위해 한국의 인터넷 뱅킹을 이용해본 경험을 이야기 했습니다. ...</p>
<p><a href='http://b.mytears.org/2009/01/1228'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>2/7/2010 -- <a href="http://b.mytears.org/2010/02/2165" title="인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가?">인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가? (3)</a></li><li>4/6/2009 -- <a href="http://b.mytears.org/2009/04/1888" title="오픈웹 관련해서 시끄러운 하루하루&#8230;">오픈웹 관련해서 시끄러운 하루하루&#8230; (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1228&rdate=2009-01-28+13%3A57%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1228&rdate=2009-01-28+13%3A57%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>오랫만에 일찍 학교에 나온 김에 아침부터 서핑을 즐기다가, 제가 아침에 공개한 글과 관련된 좋은 내용의 글을 발견해서 살짜쿵 번역을 해봤습니다. &#8216;국내 CA 시스템 = 공인인증 시스템&#8217; 이라고 이해하시면 되겠습니다. 약간의 의역이 있고, 오역도 있을 수 있습니다. -_-a</p>
<p>읽다보면 참 부끄러운 부분이 많아요.</p>
<p>원문: <a href='http://web.archive.org/web/20071225181340/http://webstandard.or.kr/en/2007/03/17/korean-home-brew-on-the-web/'>http://web.archive.org/we...ean-home-brew-on-the-web/</a></p>
<p>&#8211;<br />
Vladimir씨는 SEED에 관련된 기술적인 문제를 얘기하기 위해 한국의 인터넷 뱅킹을 이용해본 경험을 이야기 했습니다. 그가 한국 사이트에서 겪었던 문제들 덕분에 그 문제에 대해 기술적인 부분을 설명할 기회가 왔네요. (이 글을 읽기 전에 Vladimir씨가 쓴 <a href='http://web.archive.org/web/20070906022130/blog.vlad1.com/archives/2007/03/16/141/'>&#8220;It&#8217;s gone to SEED&#8221;</a>를 먼저 읽으시기 바랍니다.)</p>
<p>1997년에 SEED가 처음 나왔을 당시엔 암호화를 위해선 ActiveX나 NSPlugin(브라우져 전쟁 이후에 사라졌음)를 이용할 수 밖엔 없었습니다. 이 플러그인들은 국내 전용의 CA들로부터 개인 인증서를 발행하고, 관리하는 역할과 돈을 보낼 때 계좌번호 같은 &#8220;중요한 텍스트&#8221; 들에 &#8220;전자 서명을 더하는&#8221; 역할을 담당했습니다. INISafeWeb 또한 이런 플러그인들 중 하나입니다. (한국에는 금융/전자상거래 및 전자 정부 사용 등의 서비스를 위한 국내 전용 CA들이 8개 정도 있습니다. 이런 서비스를 이용하기 위해서는 같은 기능을 하는 ActiveX를 최소 3개 이상 설치해야만 합니다. 참 웃긴 일이죠.)</p>
<p><span id="more-1228"></span>이제부터 ActiveX를 사용한 거래 과정을 명확하게 설명해볼까 합니다. 만약 누군가 보안된 거래를 하려한다면 그 사람은 필요한 정보를 HTML Form에 채워넣습니다. Submit에 의해 호출된 Javascript는 이 정보를 암호화를 담당하는 ActiveX 컨트롤에 전해주게 됩니다. 이 컨트롤은 이 값들을 암호화하고 사용자의 공개키를 이용하여 전자 서명을 추가합니다. ActiveX에 의해 암호화된 메시지는 HTML Form으로 다시 전해지고, 마지막으로 form.submit()이 실행됩니다. 웹서버는 사용자의 인증서로 만들어진 데이터를 OCSP 같은 CA를 통해 복호/검증하게 됩니다.  그런 다음 웹서버에서는 요청된 작업이 실행된 후 그 결과를 브라우져로 보내줍니다. 이 때 일부 은행 사이트에선 결과를 ActiveX와 Javascript를 통해 복호해야 하는 암호 메시지로 보내줍니다.</p>
<p>이 과정은 사실 SSL을 이용할 때와 거의 동일합니다. 대부분의 브라우져는 Mr Vladimir씨가 보았던 인터페이스와 비슷한 인증서 관리자를 가지고 있는데 한국에서는 왜 브라우져의 기본 함수를 사용하지 않는걸까요? 그 이유는 SEED라는 암호화 알고리즘과 표준화 되지 않은 브라우져의 전자 서명 기능입니다. 10년 전에 이미 생각되었던crypto.signText()같은 형태인데, 어쨌든 암호화를 담당하는 ActiveX들이 이런 함수를 가지고 있습니다.</p>
<p>마지막으로, 다른 ActiveX 컨트롤들에 대해 설명해보겠습니다. 예전에 키로깅이나 개인 인증서에 대한 해킹으로 인한 금융 사고들이 있었던 적이 있습니다. 이건 사실 한국 사용자들의 무분별한 ActiveX설치로 인해 발생한 문제였습니다. (대부분의 사람들이 IE에서 ActiveX 설치와 관련된 보안 경고를 보여줬을 때 &#8220;Yes&#8221;를 클릭하도록 학습되어 있습니다. 왜냐구요? 대부분의 공용 서비스에서 ActiveX를 사용하거든요. 그러다보니 spyware나 malware에 속수무책일 수 밖에 없습니다. 보안과 관련해서는 악순환일 수 밖에 없습니다.) 그렇기 때문에 대부분의 은행에서는 강제로 키로깅(&#8220;Softcamp&#8221;)을 막고, 파이어월을 제공하고, ActiveX들에 대한 백신(&#8220;하우리&#8221;)을  제공하기 시작했습니다. InsisWeb은 신한은행에서만 보험을 위해 사용하는 ActiveX입니다. 이런 툴들은 여러 회사의 제품이 나와있으므로, 암호화를 위한 ActiveX 때와 마찬가지로 설치된 ActiveX는 계속해서 늘어납니다. 아마 대부분의 한국인들은 공용 서비스를 이용하기 위해 10개 이상의 ActiveX를 사용하고 있을거에요.</p>
<p>문제는 ActiveX가 사이트와 매우 긴밀하게 연결되어 있기 때문에 사용자들이 이 ActiveX를 선택할 권리가 없다는 것입니다. 그게 끝이 아닙니다. 대부분의 전자 정부 사이트는 모든 인쇄 서비스에 DRM을 걸기 위해 ActiveX를 사용합니다. 신용카드 거래를 위한 ActiveX 컨트롤들도 여러가지입니다. 한국에서는 심지어 Visa3D마저도 ActiveX로 구동됩니다. (정부는 국내 CA시스템들에  30만원이 넘는 거래에 대해 국내 CA System을 사용하도록 하는 가이드라인을 제공하고 있습니다. 온라인 쇼핑몰에서 뭔가를 사고 싶다면, 위에서 얘기한 것들을 설치해야합니다.) 전자 상거래를 하고 싶다면&#8230;? 또 다른 ActiveX가 필요하겠죠.</p>
<p>상황은 매우 심각합니다. 윈도우 98에 대한 지원이 얼마 남지 않았꼬, 곧 XP SP2에 대한 지원도 끝날거라는 경고가 있었습니다. 하지만 한국 정부는 이런 사실을 무시하고 있고, 대부분의 소프트웨어 회사는 자신들의 밥그릇을 지키려고 낑낑데고 있을 뿐입니다. 현재 한국에서의 상황은 SEED만의 문제가 아닙니다. 내부 해커들의 공격에 시달리는 윈도우와 인터넷 익스플로러에 맞춰진 국내 인트라넷 시스템이 되어버렸습니다. 한국의 홈브류[1] 인터넷이죠.</p>
<p>&#8211;<br />
[1] 홈브류란 단어는 집에서 만드는 무언가를 얘기할 때 많이 쓰던데 뭐라고 표현해야할지 모르겠어서 발음대로 표기했습니다. 홈브류 맥주, 홈브류 와인 이런 식으로 쓰는 말이에요.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1228&rdate=2009-01-28+13%3A57%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1228&rdate=2009-01-28+13%3A57%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>2/7/2010 -- <a href="http://b.mytears.org/2010/02/2165" title="인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가?">인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가? (3)</a></li><li>4/6/2009 -- <a href="http://b.mytears.org/2009/04/1888" title="오픈웹 관련해서 시끄러운 하루하루&#8230;">오픈웹 관련해서 시끄러운 하루하루&#8230; (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1228/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>인터넷 뱅킹과 크로스 브라우징</title>
		<link>http://b.mytears.org/2009/01/1224</link>
		<comments>http://b.mytears.org/2009/01/1224#comments</comments>
		<pubDate>Wed, 28 Jan 2009 02:05:03 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[activeX]]></category>
		<category><![CDATA[banking]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[cross browsing]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[inisafeweb]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[standard]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xecureweb]]></category>
		<category><![CDATA[공인인증]]></category>
		<category><![CDATA[전자서명]]></category>
		<category><![CDATA[크로스브라우징]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1224</guid>
		<description><![CDATA[<p>나는 오늘도 인터넷 뱅킹을 위해 모 은행의 홈페이지로 접속했고, 플러그인을 설치해야한다는 페이지를 5분동안 보고 있어야 했다. &#8216;왜 안넘어가는거야!&#8217; 라고 짜증을 내며 브라우저를 보니 firefox다. 비굴하게 32bit 버젼의 인터넷 익스플로러를 사용해서 접속하니 나도 모르게 실행되는 백신과 키보드 보안 프로그램 그리고 XecureWeb&#8230;</p>
<p>이 은행에 있던 돈을 다른 은행에 있는 계좌로 이체를 시킨 뒤 잔고가 얼마인지 확인하기 위해 또 ...</p>
<p><a href='http://b.mytears.org/2009/01/1224'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>4/6/2009 -- <a href="http://b.mytears.org/2009/04/1888" title="오픈웹 관련해서 시끄러운 하루하루&#8230;">오픈웹 관련해서 시끄러운 하루하루&#8230; (2)</a></li><li>2/7/2010 -- <a href="http://b.mytears.org/2010/02/2165" title="인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가?">인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가? (3)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1224&rdate=2009-01-28+11%3A05%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1224&rdate=2009-01-28+11%3A05%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>나는 오늘도 인터넷 뱅킹을 위해 모 은행의 홈페이지로 접속했고, 플러그인을 설치해야한다는 페이지를 5분동안 보고 있어야 했다. &#8216;왜 안넘어가는거야!&#8217; 라고 짜증을 내며 브라우저를 보니 firefox다. 비굴하게 32bit 버젼의 인터넷 익스플로러를 사용해서 접속하니 나도 모르게 실행되는 백신과 키보드 보안 프로그램 그리고 XecureWeb&#8230;</p>
<p>이 은행에 있던 돈을 다른 은행에 있는 계좌로 이체를 시킨 뒤 잔고가 얼마인지 확인하기 위해 또 다른 은행사 홈페이지로 접속을 했고, 또 다른 프로그램들이 실행되기 시작했다.</p>
<p>도대체 <a href='www.softforum.com'>XecureWeb</a>, <a href='http://initech.com/www/html/index.html'>INISafeWeb</a>등이 뭐하는 프로그램이길래 설치를 강요받아야 하고, 또 무슨 근거로 신뢰를 강요받아야 하는걸까?</p>
<h3 id="toc-xecureweb-inisafeweb----">XecureWeb / INISafeWeb 도대체 얘네 뭐하는 애들이야?</h3>
<p>크게 인터넷 뱅킹에서 필요한 기능은 두 가지 이다. 인터넷 뱅킹을 하는 동안 오가는 데이터를 중간에서 가로챈다고 하더라도 그 내용을 알아 볼 수 없게 하기 위해 보안 채널을 구성하는 것이 그 첫번째이고, 거래(계좌 이체 등)를 한 사람이 본인이라는 사실을 증명하는 것이 그 두번째이다.</p>
<p><span id="more-1224"></span>위에 열거한 프로그램들이 위에서 얘기한 두 가지 기능을 제공하기 위한 플러그인이라 할 수 있지만 불행하게도 Microsoft Windows용 플러그인만 제공되고 있다.[1] 덕분에 Mac OS X 이나 Linux 등에서는 인터넷 뱅킹을 이용하는 게 쉽지 않고, 일부 플러그인의 경우 윈도우용 firefox를 위한 플러그인도 제공하고 있지만 플러그인의 버젼을 체크하는 javascript 문제로 firefox에서는 동작하지 않는 경우가 태반이라 (BC카드 홈페이지가 대표적 사례) 인터넷 뱅킹은 윈도우용 인터넷 익스플로러 전용 서비스라고 해도 과언이 아닌 것 같다.</p>
<h3 id="toc---">그럼 대안은 없는건가?</h3>
<p>우선 보안 채널을 형성하는 것과 관련해서는 http over ssl(이하 https)이라는 훌륭한 대안이 있다. 위에서 얘기한 플러그인들의 경우 브라우저나 웹서버에서 기본으로 제공하는 방법이 아닌 자신들 고유의 방법으로 보안 채널을 형성해야 하기 때문에 개발이 복잡해질 수 밖에 없다.</p>
<p>하지만 https 는 대부분의 웹서버와 브라우저에 구현되어 있기 때문에 프로토콜을 https로 명시해주면 끝이므로 개발 비용 및 추가 비용이 발생하지 않는다. 이미 널리 사용되고 있는 방법이므로 Microsoft Windows, Mac OS X, Linux, Firefox, Internet explorer, Opera, lynx, links, w3m 등 어떤 OS, 어떤 브라우저에서도 이용에 제한을 받지 않는다. 심지어는 w3m 같은 텍스트 브라우저마저도 https를 지원한다.</p>
<table>
<tr>
<th>&nbsp;</th>
<th>https</th>
<th>XecureWeb / INISafeWeb</th>
</tr>
<tr>
<th>개발</th>
<td>간단</td>
<td>복잡</td>
</tr>
<tr>
<th>호환성</th>
<td>높음</td>
<td>낮음</td>
</tr>
<tr>
<th>추가비용</th>
<td>없음</td>
<td>라이센스비 + 개발비</td>
</tr>
<tr>
<th>유지보수</th>
<td>간단</td>
<td>복잡</td>
</tr>
<tr>
<th>크롤링(검색엔진)</th>
<td>가능</td>
<td>어려움</td>
</tr>
</table>
<p>거래를 한 사람이 나라는 사실을 증명하는 방법으로는 전자 서명이 있고, 이는 페이지의 해쉬 값을 내 <i>공인인증서로 암호화 한 내용</i>[2]을 덧붙이는 식으로 구현된다.</p>
<p>이를 위해 필요한 기능은 공인인증서(자신의 사설인증서)로 페이지의 해쉬 값을 암호화 하는 기능이며, 기본적으로 브라우저에서 제공되는 기능은 아니기 때문에 플러그인이 필요할 수 밖에 없다. 최근 크로스 브라우징에 대한 흥보의 효과인지 얼마 전 <a href='http://www.inicis.com/'>이니시스</a>에서는 플래쉬 기반의 공인인증 시스템을 발표했지만 아쉽게도 아직까지 이 서비스는 전자 결제 대행에서만 이용이 가능 한 것으로 보인다. (오해가 있을 수 있을 것 같은데, INISafeWeb은 이니시스가 아닌 이니테크의 제품이다.)</p>
<p>하지만 그렇다 하더라도 같은 기능을 위해 각 사이트마다 다른 플러그인을 설치하도록 하는 것은 좋은 방법이라 할 수 없을 것 같다. 더 좋은 해결책이라면 공인인증을 위한 MIMETYPE을 표준화하고 이 MIMETYPE에 대한 처리를 담당하는 플러그인의 API, 즉 공인인증 API를 표준화 하여 이 API를 제대로 구현하고만 있다면 어떤 구현물을 사용하던 서로 호환이 가능하도록 만드는 것이라고 생각한다.</p>
<p>공인인증에 대한 표준화가 이루어진다면 하나의 공인인증 플러그인만으로도 모든 은행의 인터넷 뱅킹 서비스를 자유롭게 이용할 수 있게 될테고, 공인인증 플러그인이 제공되지 않는 브라우저라면 사용자가 <i>스스로 플러그인을 제작해서 사용</i>[3]하는 것도 가능해질 것이다.</p>
<h3 id="toc-">마치며</h3>
<p>웹은 특정 OS, 특정 브라우저에 제한되어서는 안된다고 생각한다. 암호화 채널을 https 로 바꾸는 것 만으로도 내 통장 거래 내역을 어떤 OS, 어떤 브라우져에서든지 간단히 확인할 수 있게 될 것이다. 비록 반쪽짜리이지만 이 정도만으로도 불편의 반 이상은 해결될 것이라 생각한다. 적용을 위해 약간의 노력이 필요하겠지만 이후 유지 보수의 편리함 등을 생각하면 이 노력은 충분한 의미가 있을 거라고 생각한다. (플러그인에 대한 라이센스 따위는 더 이상 필요 없어진다. 물론 XecureWeb 이라거나 INISafeWeb 등 현 기득권 업체들이 이 시장을 놓치려 하지 않을 것이므로 이 문제는 정치적으로 해결해야할 것이다.)</p>
<p>게다가 공인인증 API 를 표준화 하게 되면 나머지 반쪽의 문제도 해결될 것이다. 많은 것을 바라는 것은 아니다. 단지 자신이 좋아하는 운영체제, 자신이 좋아하는 브라우저를 사용하면서도 차별을 받지 않을 수 있길 바랄 뿐&#8230;</p>
<p>[1] XecureWeb의 경우 MS Windows / Mac OS X / Linux 용 플러그인을 모두 제공한다.</p>
<p>[2] 이를 이해하기 위해선 우선 공개키 / 비밀키 알고리즘에 대해 알아야 한다. 간단하게만 얘기하면 어떤 값을 공개키로 암호화 한 것은 비밀키로 복호화 할 수 있고, 어떤 값을 비밀키로 암호화 한 것은 공개키로 복호화가 가능하다.</p>
<p>비밀키는 나만 가질 수 있으므로 공개된 키로 암호화되어 전송된 내용은 나만이 해석할 수 있게 된다. 그렇기 때문에 보안 채널을 구성할 땐 공개키를 이용해서 암호화 하는 방식을 사용한다. (상대방에게 데이터를 전송할 땐 상대방의 공개키를 이용해서 암호화 한 뒤 보내고, 누군가 내게 데이터를 보낼 땐 내 공개키를 이용해서 암호화 한 뒤 보내주게 된다.)</p>
<p>반대로 내 비밀키로 암호화된 내용은 누구나 공개키로 풀어볼 수 있으므로 데이타를 보낼 때 데이터의 뒤에 그 데이타를 내 비밀키로 암호화된 내용을 덧붙인다면 이게 내가 보낸 데이타라는 것을 증명할 수 있게 된다. 실제로는 데이타 자체를 암호화 해서 보내기 보다는 데이타의 해쉬 값을 비밀키로 암호화 한 뒤 원래의 데이타 뒤에 이 값을 붙여서 보내게 된다. 이를 이용하는 애플리케이션으로는 <a href="http://enigmail.mozdev.org/home/index.php">enigmail</a> 등이 있다.</p>
<p>[3] RSS에 비유를 해보자. RSS는 표준화가 되어있기 때문에 RSS feed를 관리하기 위해 특정 애플리케이션을 사용해야할 필요는 없다. 만약 자신이 사용하는 OS에 RSS Reader가 존재하지 않는다면 표준을 참고해서 직접 Reader를 작성할 수도 있다. </p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1224&rdate=2009-01-28+11%3A05%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1224&rdate=2009-01-28+11%3A05%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>4/6/2009 -- <a href="http://b.mytears.org/2009/04/1888" title="오픈웹 관련해서 시끄러운 하루하루&#8230;">오픈웹 관련해서 시끄러운 하루하루&#8230; (2)</a></li><li>2/7/2010 -- <a href="http://b.mytears.org/2010/02/2165" title="인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가?">인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가? (3)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1224/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>블로그 업데이트 완료!</title>
		<link>http://b.mytears.org/2009/01/1222</link>
		<comments>http://b.mytears.org/2009/01/1222#comments</comments>
		<pubDate>Sat, 24 Jan 2009 05:22:36 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[cse]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hanrss]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1222</guid>
		<description><![CDATA[<p>제가 생각했던 부분은 이제 다 정리된 것 같네요.</p>
<p>검색 기능을 아예 없애버릴까 하다가 adsense에서 Google CSE(Custom Searching Engine)를 지원하길래 Google CSE를 적용해보았습니다. </p>
<p>검색 결과도 제 블로그 내에서 볼 수 있으니 블로그 자체 검색을 이용하는 듯한 느낌이라 좋았지만 배경 색을 투명하게 지정할 수 없다는 점은 조금 유감이었습니다.</p>
<p>feedburner에 feed를 만들고 기본으로 제공되는 feed를 모두 feedburner로 리다이렉트 시켜버렸는데, 통계 ...</p>
<p><a href='http://b.mytears.org/2009/01/1222'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/15/2009 -- <a href="http://b.mytears.org/2009/01/1088" title="블로그 업데이트 중&#8230;">블로그 업데이트 중&#8230; (3)</a></li><li>4/25/2009 -- <a href="http://b.mytears.org/2009/04/1981" title="Wordpress: textcube에서 보낸 트랙백 문제">Wordpress: textcube에서 보낸 트랙백 문제 (0)</a></li><li>4/12/2009 -- <a href="http://b.mytears.org/2009/04/1945" title="워드프레스용 블로거 위젯 플러그인">워드프레스용 블로거 위젯 플러그인 (5)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1414" title="WP-Eolin 플러그인">WP-Eolin 플러그인 (3)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1222&rdate=2009-01-24+14%3A22%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1222&rdate=2009-01-24+14%3A22%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>제가 생각했던 부분은 이제 다 정리된 것 같네요.</p>
<p>검색 기능을 아예 없애버릴까 하다가 adsense에서 Google CSE(Custom Searching Engine)를 지원하길래 Google CSE를 적용해보았습니다. </p>
<p>검색 결과도 제 블로그 내에서 볼 수 있으니 블로그 자체 검색을 이용하는 듯한 느낌이라 좋았지만 배경 색을 투명하게 지정할 수 없다는 점은 조금 유감이었습니다.</p>
<p><span id="more-1222"></span>feedburner에 feed를 만들고 기본으로 제공되는 feed를 모두 <a href='http://feedburner.google.com'>feedburner</a>로 리다이렉트 시켜버렸는데, 통계 정보 같은건 실시간으로 확인할 수 있는게 아닌 것 같습니다. </p>
<p><a href='http://hanrss.com'>Hanrss</a>에서는 HTTP 301 Response(Moved Permanently)를 확인한 뒤 피드 주소가 알아서 수정되었습니다. ATOM, RSS, RSS2 모두 같은 feedburner 주소로 리다이렉트 되었기 때문에 셋 모두 같은 주소로 수정되었지만 구독자 수가 합쳐지지는 않는 모습은 조금 아쉽습니다.</p>
<p>워드프레스에 <a href='http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/'>새로운 Related Post 플러그인</a>이 나왔길래 설치를 했더니 예전 버젼보다 훨씬 쓸만하네요. 예전 버젼은 테마를 수정해야했고, RSS에는 표시가 되질 않는 문제가 있었는데 이 플러그인은 원 클릭으로 모든게 다 처리됩니다. </p>
<p>태그가 기본 기능이 되었기 때문인지 결과가 더 정확해진 것 같기도 하네요.</p>
<p>그리고 이젠 제 블로그에서도 OpenID로 로그인을 할 수 있게 되었지만, 사용자 참여가 없는 사이트다 보니 사용을 하는 분은 없네요. -_-a</p>
<p>어쨌든! IE에서 어떻게 보이는지 별다르게 체크를 안하긴 했지만 아마 fixed positioning을 한 header와 searching form이 스크롤된다는 걸 제외하면 별 문제는 없을 거라고 생각해요. 캬캬캬</p>
<p>이제 이틀 후면 양력/음력 모두 새해입니다. 올해는 정말 좋은 일만 있었음 좋겠네요. 다들 새해 복 많이 받으세요~</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1222&rdate=2009-01-24+14%3A22%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1222&rdate=2009-01-24+14%3A22%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/15/2009 -- <a href="http://b.mytears.org/2009/01/1088" title="블로그 업데이트 중&#8230;">블로그 업데이트 중&#8230; (3)</a></li><li>4/25/2009 -- <a href="http://b.mytears.org/2009/04/1981" title="Wordpress: textcube에서 보낸 트랙백 문제">Wordpress: textcube에서 보낸 트랙백 문제 (0)</a></li><li>4/12/2009 -- <a href="http://b.mytears.org/2009/04/1945" title="워드프레스용 블로거 위젯 플러그인">워드프레스용 블로거 위젯 플러그인 (5)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1414" title="WP-Eolin 플러그인">WP-Eolin 플러그인 (3)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1222/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Cairo test…</title>
		<link>http://b.mytears.org/2009/01/1211</link>
		<comments>http://b.mytears.org/2009/01/1211#comments</comments>
		<pubDate>Fri, 23 Jan 2009 17:13:30 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[cairo]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[fontconfig]]></category>
		<category><![CDATA[freetype]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1211</guid>
		<description><![CDATA[<p>서체 관련된 샘플 페이지를 만들면서 손에 익숙한 gd를 활용해왔는데, gd의 fontconfig 지원이 미약하다보니 아쉬운 점들이 눈에 보이기 시작했습니다. </p>
<p>가장 큰 예로 굴림체, 바탕체, 나눔고딕_코딩 글꼴 같은 고정폭(정확하게는 dual-width) 서체의 영문/한글 너비가 동일하게 보여지는 문제는 fontconfig의 global advance옵션을 통해 해결할 수 있지만, gd에서는 fontconfig의 옵션을 제대로 활용하지 않고 있기 때문에 이 문제를 해결할 수가 없었습니다.</p>
<p>그런 이유로 ...</p>
<p><a href='http://b.mytears.org/2009/01/1211'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>8/1/2008 -- <a href="http://b.mytears.org/2008/08/661" title="한글 서체들 샘플을 만들어봤습니다.">한글 서체들 샘플을 만들어봤습니다. (3)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>9/19/2006 -- <a href="http://b.mytears.org/2006/09/415" title="내가 참여했던 오픈소스">내가 참여했던 오픈소스 (1)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1211&rdate=2009-01-24+02%3A13%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1211&rdate=2009-01-24+02%3A13%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>서체 관련된 샘플 페이지를 만들면서 손에 익숙한 <a href='http://libgd.org'>gd</a>를 활용해왔는데, gd의 fontconfig 지원이 미약하다보니 아쉬운 점들이 눈에 보이기 시작했습니다. </p>
<p>가장 큰 예로 굴림체, 바탕체, 나눔고딕_코딩 글꼴 같은 고정폭(정확하게는 dual-width) 서체의 영문/한글 너비가 동일하게 보여지는 문제는 <a href='http://fontconfig.org'>fontconfig</a>의 global advance옵션을 통해 해결할 수 있지만, gd에서는 fontconfig의 옵션을 제대로 활용하지 않고 있기 때문에 이 문제를 해결할 수가 없었습니다.</p>
<p>그런 이유로 fontconfig를 제대로 활용하는 그래픽 API를 찾던 도중 <a href='http://cairographics.org'>Cairo</a>가 생각났습니다. Cairo는 <a href='http://freedesktop.org'>fdo</a>에서 개발한 그래픽 API로 현재 모질라, Gnome 등에서 활발하게 사용되고 있는데, 의외로 X 없이도 설치가 가능하고, API도 아주 단순해서 제가 활용하려던 용도로 딱이더군요.</p>
<p><span id="more-1211"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1211code6'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p12116"><td class="code" id="p1211code6"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">char</span> <span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span><span style="color: #009900;">&#123;</span>
	<span style="color: #ff0000;">&quot;다람쥐 쳇바퀴 돌아 아햏햏 똠방각하&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #ff0000;">&quot;abcdefghijklmnopqrstuvwxyz&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #ff0000;">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #ff0000;">&quot;1234567890!@#$%^&amp;*()&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
cairo_surface_t <span style="color: #339933;">*</span>surface<span style="color: #339933;">;</span>cairo_t <span style="color: #339933;">*</span>cr<span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> i<span style="color: #339933;">;</span>  
<span style="color: #993333;">double</span> pos<span style="color: #339933;">;</span>
cairo_font_extents_t fe<span style="color: #339933;">;</span>cairo_text_extents_t te<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Prepare drawing area */</span>
surface <span style="color: #339933;">=</span> cairo_image_surface_create <span style="color: #009900;">&#40;</span>CAIRO_FORMAT_ARGB32<span style="color: #339933;">,</span> <span style="color: #0000dd;">500</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>cr <span style="color: #339933;">=</span> cairo_create <span style="color: #009900;">&#40;</span>surface<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cairo_set_font_size <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> size<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cairo_set_source_rgb <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cairo_select_font_face <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> font<span style="color: #339933;">,</span>
        CAIRO_FONT_SLANT_NORMAL<span style="color: #339933;">,</span> CAIRO_FONT_WEIGHT_NORMAL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
cairo_font_extents <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>fe<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
pos <span style="color: #339933;">=</span> <span style="color:#800080;">3.0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">4</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    cairo_text_extents <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> text<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>te<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    pos <span style="color: #339933;">+=</span> te.<span style="color: #202020;">height</span> <span style="color: #339933;">+</span> <span style="color:#800080;">3.0</span><span style="color: #339933;">;</span>
&nbsp;
    cairo_move_to <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> <span style="color:#800080;">3.0</span><span style="color: #339933;">,</span> pos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    cairo_show_text <span style="color: #009900;">&#40;</span>cr<span style="color: #339933;">,</span> text<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
cairo_surface_write_to_png<span style="color: #009900;">&#40;</span>surface<span style="color: #339933;">,</span> out <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
cairo_destroy <span style="color: #009900;">&#40;</span>cr<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cairo_surface_destroy <span style="color: #009900;">&#40;</span>surface<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>위 코드 정도만으로도 서체를 렌더링하고, 그 결과를 png로 저장할 수 있습니다. (surface를 resize하는 기능이 없기 때문에 저대로보단, 약간의 꼼수를 부려야할 것 같습니다.)</p>
<p>freetype의 경우 초기화에만 저 정도 코드가 필요하다는 것을 생각하면 -_-a 아주 편리하다고 할 수 있겠습니다.</p>
<p>언제 짬을 내서 서체 샘플을 새롭게 빌드해야겠네요. 카이로 만세!!!</p>
<p>테스트 코드나 결과물은 아래서&#8230;</p>
<p><a href='http://mytears.org/tmp/dir/?path=./cairo&#038;N'>http://mytears.org/tmp/dir/?path=./cairo&#038;N</a></p>
</pre><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1211&rdate=2009-01-24+02%3A13%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1211&rdate=2009-01-24+02%3A13%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>8/1/2008 -- <a href="http://b.mytears.org/2008/08/661" title="한글 서체들 샘플을 만들어봤습니다.">한글 서체들 샘플을 만들어봤습니다. (3)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>9/19/2006 -- <a href="http://b.mytears.org/2006/09/415" title="내가 참여했던 오픈소스">내가 참여했던 오픈소스 (1)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1211/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Punbb update</title>
		<link>http://b.mytears.org/2009/01/1192</link>
		<comments>http://b.mytears.org/2009/01/1192#comments</comments>
		<pubDate>Fri, 23 Jan 2009 02:40:45 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[bbs]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[punbb]]></category>
		<category><![CDATA[Unfix]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1192</guid>
		<description><![CDATA[<p>오늘 아침부터 갑자기 Unfix에 설치되어 있는 punbb가 스팸에 노출되기 시작했습니다. 사용자 등록을 위해선 email 인증이 필요하다보니 지금까진 별다른 피해가 없었지만 스팸 봇들이 점점 진화를 하다보니 이것도 점차 무의미해지는 것 같네요.</p>
<p>어쨌든 오랫동안 업데이트를 안한 것도 있고 해서 최신 버젼의 punbb로 업데이트를 감행했습니다. 1.2 버젼에서는 말만 plugin이지 실제로는 프로그램의 코드를 수정해야하는 일이 잦았기 때문에 지속적인 업데이트가 쉽지 ...</p>
<p><a href='http://b.mytears.org/2009/01/1192'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>9/4/2006 -- <a href="http://b.mytears.org/2006/09/396" title="wordpress: korean trackback!">wordpress: korean trackback! (22)</a></li><li>8/26/2006 -- <a href="http://b.mytears.org/2006/08/379" title="ErrorDocument 수정">ErrorDocument 수정 (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1192&rdate=2009-01-23+11%3A40%3A45&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1192&rdate=2009-01-23+11%3A40%3A45&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>오늘 아침부터 갑자기 <a href='http://unfix.net'>Unfix</a>에 설치되어 있는 <a href='http://punbb.informer.com/'>punbb</a>가 스팸에 노출되기 시작했습니다. 사용자 등록을 위해선 email 인증이 필요하다보니 지금까진 별다른 피해가 없었지만 스팸 봇들이 점점 진화를 하다보니 이것도 점차 무의미해지는 것 같네요.</p>
<p>어쨌든 오랫동안 업데이트를 안한 것도 있고 해서 최신 버젼의 punbb로 업데이트를 감행했습니다. 1.2 버젼에서는 말만 plugin이지 실제로는 프로그램의 코드를 수정해야하는 일이 잦았기 때문에 지속적인 업데이트가 쉽지 않았지만 1.3 버젼의 extension은 마치 워드프레스의 plugin과 같이 원클릭 설치가 가능하기 때문에 매우 유용할 것으로 보입니다.</p>
<p>punbb 측에서 공식적으로 배포하는 익스텐션은 다음과 같습니다.</p>
<blockquote><ul>
<li>pun_antispam &#8211; 회원 등록 등에 CAPCHA 이미지 표시</li>
<li>pun_bbcode &#8211; BBCode 지원</li>
<li>pun_pm &#8211; 개인 메시징 기능</li>
<li>pun_poll &#8211; 투표 기능 넣기</li>
<li>pun_quote &#8211; JS를 이용한 빠른 인용이 가능</li>
<li>pun_repository &#8211; Repository에서 있는 익스텐션 설치 도우미</li>
</ul>
<p>* <a href='http://punbb.informer.com/extensions/'>http://punbb.informer.com/extensions/</a></p></blockquote>
<p>위에 나와있는 것들 외에도 비공식적으로 제공되는 extension들이 존재하며, 비공식 익스텐션들은 다음 URL에서 찾아보실 수 있습니다. (물론 홈페이지 포럼에서 찾는게 더 나을지도 모르겠네요. -_-a)</p>
<p>* <a href='http://punbb.informer.com/unofficial/punbb-1.3/extensions/'>http://punbb.informer.com...ial/punbb-1.3/extensions/</a></p>
<p>Akismet, Gravatar 같은 익스텐션들도 모두 제공되기 때문에 더 이상 귀찮게 mod를 할 필요는 없을 것 같네요. </p>
<p>설날(제 음력 생일)이 몇 일 남지 않았습니다. 다들 새해 복 많이 받으세요~ </p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1192&rdate=2009-01-23+11%3A40%3A45&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1192&rdate=2009-01-23+11%3A40%3A45&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>9/4/2006 -- <a href="http://b.mytears.org/2006/09/396" title="wordpress: korean trackback!">wordpress: korean trackback! (22)</a></li><li>8/26/2006 -- <a href="http://b.mytears.org/2006/08/379" title="ErrorDocument 수정">ErrorDocument 수정 (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1192/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>공개 서체: 네이버 나눔고딕_코딩</title>
		<link>http://b.mytears.org/2009/01/1181</link>
		<comments>http://b.mytears.org/2009/01/1181#comments</comments>
		<pubDate>Thu, 22 Jan 2009 23:56:18 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[license]]></category>
		<category><![CDATA[naver]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[공개]]></category>
		<category><![CDATA[나눔고딕_코딩]]></category>
		<category><![CDATA[서체]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1181</guid>
		<description><![CDATA[<p>얼마전 네이버에서 고정폭 서체인 &#8216;나눔고딕_코딩&#8217; 서체를 OFL(Open Font License)로 공개하였고, gd를 이용해서 뽑은 12pt 샘플은 다음과 같습니다.</p>
<p></p>
<p>gd의 문제로 인하여 영문과 한글의 폭이 동일하게 출력되었는데, 맥이나 윈도우, 리눅스(약간의 설정 필요) 등에서는 영문과 한글의 폭이 2:1 이다보니 서체 이름에서와 동일하게 코딩용으로 사용하기에 딱이겠네요.</p>
<p>* http://dev.naver.com/projects/nanumfont</p>
<p>덧: 서체 이름에 사용된 언더바(&#8216;_&#8217;) 때문에 맥에서 약간의 문제가 있었는데, 서체가 업데이트 되면서 이름이 ...</p>
<p><a href='http://b.mytears.org/2009/01/1181'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>7/17/2008 -- <a href="http://b.mytears.org/2008/07/660" title="공개 서체: 서울체">공개 서체: 서울체 (6)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1384" title="포탈 사이트와 공개 서체&#8230;">포탈 사이트와 공개 서체&#8230; (15)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1181&rdate=2009-01-23+08%3A56%3A18&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1181&rdate=2009-01-23+08%3A56%3A18&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>얼마전 네이버에서 고정폭 서체인 &#8216;나눔고딕_코딩&#8217; 서체를 OFL(Open Font License)로 공개하였고, gd를 이용해서 뽑은 12pt 샘플은 다음과 같습니다.</p>
<blockquote><p><img src='http://mytears.org/resources/font-sample/나눔고딕_코딩:style=Regular_12.png' alt='나눔고딕_코딩 12pt 샘플' /></p></blockquote>
<p>gd의 문제로 인하여 영문과 한글의 폭이 동일하게 출력되었는데, 맥이나 윈도우, 리눅스(약간의 설정 필요) 등에서는 영문과 한글의 폭이 2:1 이다보니 서체 이름에서와 동일하게 코딩용으로 사용하기에 딱이겠네요.</p>
<p>* <a href='http://dev.naver.com/projects/nanumfont'>http://dev.naver.com/projects/nanumfont</a></p>
<p>덧: 서체 이름에 사용된 언더바(&#8216;_&#8217;) 때문에 맥에서 약간의 문제가 있었는데, 서체가 업데이트 되면서 이름이 &#8216;나눔고딕코딩&#8217;으로 바뀌었고, 맥에서도 문제 없이 사용할 수 있게 되었습니다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1181&rdate=2009-01-23+08%3A56%3A18&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1181&rdate=2009-01-23+08%3A56%3A18&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>7/17/2008 -- <a href="http://b.mytears.org/2008/07/660" title="공개 서체: 서울체">공개 서체: 서울체 (6)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1384" title="포탈 사이트와 공개 서체&#8230;">포탈 사이트와 공개 서체&#8230; (15)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1181/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>공개 서체들 소개…</title>
		<link>http://b.mytears.org/2009/01/1151</link>
		<comments>http://b.mytears.org/2009/01/1151#comments</comments>
		<pubDate>Fri, 16 Jan 2009 09:35:08 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[공개]]></category>
		<category><![CDATA[서체]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=1151</guid>
		<description><![CDATA[<p>내 눈엔 순천향체가 젤 이뻐보인다. 참고로 프리뷰에서 &#8216;아햏햏, 똠방각하&#8217;가 제대로 보이질 않는다면 한글 2350자만을 지원하는 서체임.</p>
<p></p>
<p></p>
<p>패키지</p>
<p>서체이름</p>
<p>스타일</p>
<p>구분</p>
<p>프리뷰</p>
<p></p>
<p></p>
<p>나눔글꼴</p>
<p>나눔고딕</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>나눔명조</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>나눔고딕코딩</p>
<p>나눔고딕코딩</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>다음체</p>
<p>다음</p>
<p>Regular</p>
<p>한글 2,350자</p>
<p></p>
<p></p>
<p></p>
<p>SemiBold</p>
<p>한글 2,350자</p>
<p></p>
<p></p>
<p></p>
<p>렉시굴림</p>
<p>렉시굴림</p>
<p>Regular</p>
<p>한글 2,350자</p>
<p></p>
<p></p>
<p></p>
<p>서울 서체</p>
<p>서울 남산체</p>
<p>Light</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>ExtraBold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>서울 한강체</p>
<p>Light</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>순천향체</p>
<p>순천향체</p>
<p>Regular</p>
<p>한글 2,350자</p>
<p></p>
<p></p>
<p></p>
<p>아리따체</p>
<p>아리따</p>
<p>Light</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>SemiBold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>은글꼴</p>
<p>은돋움</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>은그래픽</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>은궁서</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>은바탕</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>은필기</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>Bold</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>한겨레결체</p>
<p>한겨레결체</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>ttf-alee</p>
<p>은진</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>은진낙서</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>구슬</p>
<p>Regular</p>
<p>한글 전용</p>
<p></p>
<p></p>
<p></p>
<p>반달</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>방울</p>
<p>Regular</p>
<p>한글 11,172자</p>
<p></p>
<p></p>
<p></p>
<p>네이버 사전체</p>
<p>네이버 ...</p>
<p><a href='http://b.mytears.org/2009/01/1151'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li><li>7/17/2008 -- <a href="http://b.mytears.org/2008/07/660" title="공개 서체: 서울체">공개 서체: 서울체 (6)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1384" title="포탈 사이트와 공개 서체&#8230;">포탈 사이트와 공개 서체&#8230; (15)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1151&rdate=2009-01-16+18%3A35%3A08&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1151&rdate=2009-01-16+18%3A35%3A08&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>내 눈엔 순천향체가 젤 이뻐보인다. 참고로 프리뷰에서 &#8216;아햏햏, 똠방각하&#8217;가 제대로 보이질 않는다면 한글 2350자만을 지원하는 서체임.</p>
<table>
<tr>
<th>패키지</th>
<th>서체이름</th>
<th>스타일</th>
<th>구분</th>
<th>프리뷰</th>
</tr>
<tr>
<td rowspan="4"><a href="http://hangeul.naver.com/index.nhn?goto=fonts">나눔글꼴</a></td>
<td rowspan="2">나눔고딕</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/나눔고딕.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/나눔고딕Bold.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2">나눔명조</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/나눔명조.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/나눔명조Bold.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2"><a href="http://dev.naver.com/projects/nanumfont">나눔고딕코딩</a></td>
<td rowspan="2">나눔고딕코딩</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/NanumGothic_Coding.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/NanumGothic_Coding_Bold.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2"><a href="http://fontevent.daum.net/">다음체</a></td>
<td rowspan="2">다음</td>
<td>Regular</td>
<td>한글 2,350자</td>
<td><img src='http://mytears.org/tmp/cairo/font/Daum_Regular.ttf-14.png' /></td>
</tr>
<tr>
<td>SemiBold</td>
<td>한글 2,350자</td>
<td><img src='http://mytears.org/tmp/cairo/font/Daum_SemiBold.ttf-14.png' /></td>
</tr>
<tr>
<td><a href=""><a href="http://kldp.net/projects/linuxlexifont/">렉시굴림</a></td>
<td>렉시굴림</td>
<td>Regular</td>
<td>한글 2,350자</td>
<td><img src='http://mytears.org/tmp/cairo/font/LexiGulim.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="6"><a href="http://design.seoul.go.kr/dscontent/designseoul.php?MenuID=490&#038;pgID=57">서울 서체</a></td>
<td rowspan="4">서울 남산체</td>
<td>Light</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SeoulNamsanL.ttf-14.png' /></td>
</tr>
<tr>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SeoulNamsanM.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SeoulNamsanB.ttf-14.png' /></td>
</tr>
<tr>
<td>ExtraBold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SeoulNamsanEB.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2">서울 한강체</td>
<td>Light</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SeoulHangangL.ttf-14.png' /></td>
</tr>
<tr>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SeoulHangangM.ttf-14.png' /></td>
</tr>
<tr>
<td><a href="http://www.sch.ac.kr/sch/index.jsp?menuID=20080318173724998673">순천향체</a></td>
<td>순천향체</td>
<td>Regular</td>
<td>한글 2,350자</td>
<td><img src='http://mytears.org/tmp/cairo/font/SOONCHUNHYANG.TTF-14.png' /></td>
</tr>
<tr>
<td rowspan="4"><a href="http://www.amorepacific.co.kr/company/ci/font.jsp">아리따체</a></td>
<td rowspan="4">아리따</td>
<td>Light</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/arittaL.otf-14.png' /></td>
</tr>
<tr>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/arittaM.otf-14.png' /></td>
</tr>
<tr>
<td>SemiBold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/arittaSB.otf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/arittaB.otf-14.png' /></td>
</tr>
<tr>
<td rowspan="9"><a href="http://kldp.net/projects/unfonts/">은글꼴</a></td>
<td rowspan="2">은돋움</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnDotum.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnDotumBold.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2">은그래픽</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnGraphic.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnGraphicBold.ttf-14.png' /></td>
</tr>
<tr>
<td>은궁서</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnGungseo.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2">은바탕</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnBatang.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnBatangBold.ttf-14.png' /></td>
</tr>
<tr>
<td rowspan="2">은필기</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnPilgi.ttf-14.png' /></td>
</tr>
<tr>
<td>Bold</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/UnPilgiBold.ttf-14.png' /></td>
</tr>
<tr>
<td><a href="http://bbs.hani.co.kr/Board/ui_hkr_alim/Contents.asp?STable=ui_hkr_alim&#038;RNo=56&#038;Search=&#038;Text=&#038;GoToPage=1&#038;Idx=56&#038;Sorting=2">한겨레결체</a></td>
<td>한겨레결체</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/한겨레결체.TTF-14.png' /></td>
</tr>
<tr>
<td rowspan="5"><a href="http://alee.anj.kr/fonts/alee/">ttf-alee</a></td>
<td>은진</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/Eunjin.ttf-14.png' /></td>
</tr>
<tr>
<td>은진낙서</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/EunjinNakseo.ttf-14.png' /></td>
</tr>
<tr>
<td>구슬</td>
<td>Regular</td>
<td>한글 전용</td>
<td><img src='http://mytears.org/tmp/cairo/font/Guseul.ttf-14.png' /></td>
</tr>
<tr>
<td>반달</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/Bandal.ttf-14.png' /></td>
</tr>
<tr>
<td>방울</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/Bangwool.ttf-14.png' /></td>
</tr>
<tr>
<td><a href="http://cndic.naver.com/font.nhn">네이버 사전체</a></td>
<td>네이버 사전체</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/NAVERDIC.TTF-14.png' /></td>
</tr>
<tr>
<td rowspan="3"><a href="http://www.yonsei.ac.kr/contents/intro/font.html">연체체</a></td>
<td>연세 제목체</td>
<td>Regular</td>
<td>한글 2,350자</td>
<td><img src='http://mytears.org/tmp/cairo/font/YonseiBold.TTF-14.png' /></td>
</tr>
<tr>
<td>연세 소제목체</td>
<td>Regular</td>
<td>한글 2,350자</td>
<td><img src='http://mytears.org/tmp/cairo/font/YonseiLight.TTF-14.png' /></td>
</tr>
<tr>
<td>연세 로고체</td>
<td>Regular</td>
<td>영문, 숫자</td>
<td><img src='http://mytears.org/tmp/cairo/font/YONSLOGO.TTF-14.png' /></td>
</tr>
<tr>
<td><a href="http://font.chosun.com/">조선일보 명조체</a></td>
<td>조선일보 명조체</td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='http://mytears.org/tmp/cairo/font/ChosunM.ttf-14.png' /></td>
</tr>
<tr>
<td><a href="http://faq.ktug.or.kr/faq/%B9%AE%C8%AD%BA%CE%B1%DB%B2%C3">문화부 글꼴</a></td>
<td></td>
<td>Regular</td>
<td>한글 2,350자</td>
<td><img src='' /></td>
</tr>
<tr>
<td><a href="http://kldp.net/projects/baekmuk">백묵 글꼴</a></td>
<td></td>
<td>Regular</td>
<td>한글 11,172자</td>
<td><img src='' /></td>
</tr>
</table>
<p>위 결과는 cairo+freetype을 이용해서 렌더링한 결과입니다. 사용된 소스는 아래 URL에서 확인하실 수 있습니다.</p>
<p>* <a href='http://mytears.org/tmp/cairo/text.c'>http://mytears.org/tmp/cairo/text.c</a></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1151&rdate=2009-01-16+18%3A35%3A08&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D1151&rdate=2009-01-16+18%3A35%3A08&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li><li>7/17/2008 -- <a href="http://b.mytears.org/2008/07/660" title="공개 서체: 서울체">공개 서체: 서울체 (6)</a></li><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1384" title="포탈 사이트와 공개 서체&#8230;">포탈 사이트와 공개 서체&#8230; (15)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2009/01/1151/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CG: dithering</title>
		<link>http://b.mytears.org/2008/11/731</link>
		<comments>http://b.mytears.org/2008/11/731#comments</comments>
		<pubDate>Fri, 21 Nov 2008 01:29:58 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[dithering]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[image processing]]></category>

		<guid isPermaLink="false">http://b.mytears.org/?p=731</guid>
		<description><![CDATA[<p>팩스에서 처럼 이미지를 흑/백 으로만 표현할 수 있는 경우에도 어느 정도의 명암을 표현하기 위한 방법으로 아래와 같은 오리지널 이미지가 있을 때&#8230;</p>
<p></p>
<p>한 픽셀 값은 0~255 사이의 값을 가진다고 하고, 128 이상의 값은 하얀 색으로, 128 미만 값은 검은 색으로 표현하면 결과는 다음과 같다.</p>
<p></p>
<p>보다시피 디테일은 거의 사라져버리기 때문에 이런 것을 피하기 위해 디더링이란 기법을 사용하곤 한다. 수식으로 ...</p>
<p><a href='http://b.mytears.org/2008/11/731'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>10/29/2007 -- <a href="http://b.mytears.org/2007/10/612" title="CG: gaussian blur">CG: gaussian blur (0)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D731&rdate=2008-11-21+10%3A29%3A58&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D731&rdate=2008-11-21+10%3A29%3A58&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>팩스에서 처럼 이미지를 흑/백 으로만 표현할 수 있는 경우에도 어느 정도의 명암을 표현하기 위한 방법으로 아래와 같은 오리지널 이미지가 있을 때&#8230;</p>
<p><img src='/wp-content/upload/lena512.gif' /></p>
<p>한 픽셀 값은 0~255 사이의 값을 가진다고 하고, 128 이상의 값은 하얀 색으로, 128 미만 값은 검은 색으로 표현하면 결과는 다음과 같다.</p>
<p><img src='/wp-content/upload/lena512_thres.gif' /></p>
<p>보다시피 디테일은 거의 사라져버리기 때문에 이런 것을 피하기 위해 디더링이란 기법을 사용하곤 한다. 수식으로 이를 표현해보자면 다음과 같고&#8230;</p>
<p><img src='/wp-content/upload/eq_dither.gif' /></p>
<p>말로 설명하자면 랜덤 값을 더해준 뒤 128 을 기준으로 Thresholding 을 한다! 정도로 표현이 가능할 듯&#8230; 이론적으론 매우 간단하지만 효과는 확실하다. -16~16 의 랜덤 값을 이용하여 dithering 한 결과는 다음과 같다.</p>
<p><img src='/wp-content/upload/lena512_dither_32.gif' /></p>
<p>-32~32 사이의 랜덤 값을 이용할 경우는&#8230;</p>
<p><img src='/wp-content/upload/lena512_dither_64.gif' /></p>
<p>확실히 좀 디테일이 조금 생겨나는 것을 확인할 수가 있다. 장비들이 좋아지면서 이런 식의 트릭들에 대한 연구는 사라져가는 것 같다. -_ㅠ</p>
<p>위 테스트에 사용한 코드:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p731code8'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p7318"><td class="code" id="p731code8"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;stdio.h&gt;</span>
<span style="color: #339933;">#include &lt;time.h&gt;</span>
<span style="color: #339933;">#include &lt;stdlib.h&gt;</span>
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span> <span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">char</span><span style="color: #339933;">**</span> argv <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #993333;">int</span> i<span style="color: #339933;">,</span> j<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #339933;">*</span> src<span style="color: #339933;">;</span>
        <span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #339933;">*</span> dst<span style="color: #339933;">;</span>
&nbsp;
        FILE<span style="color: #339933;">*</span> in<span style="color: #339933;">;</span>
        FILE<span style="color: #339933;">*</span> out<span style="color: #339933;">;</span>
&nbsp;
        src <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span>malloc<span style="color: #009900;">&#40;</span><span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        dst <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span>malloc<span style="color: #009900;">&#40;</span><span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        srand<span style="color: #009900;">&#40;</span>time<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        in <span style="color: #339933;">=</span> fopen<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;lena512.raw&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;rb&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fread<span style="color: #009900;">&#40;</span> src<span style="color: #339933;">,</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">512</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">,</span> in <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fclose<span style="color: #009900;">&#40;</span>in<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> j <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">512</span> <span style="color: #339933;">;</span> j<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">512</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> src<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">128</span> <span style="color: #009900;">&#41;</span>
                                dst<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">255</span><span style="color: #339933;">;</span>
                        <span style="color: #b1b100;">else</span>
                                dst<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        out <span style="color: #339933;">=</span> fopen<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;lena512_thres.raw&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;wb&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fwrite<span style="color: #009900;">&#40;</span> dst<span style="color: #339933;">,</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">512</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">,</span> out <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fclose<span style="color: #009900;">&#40;</span>out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> j <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">512</span> <span style="color: #339933;">;</span> j<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">512</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>src<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> rand<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">%</span><span style="color:#800080;">32</span> <span style="color: #339933;">-</span> <span style="color: #0000dd;">32</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">128</span> <span style="color: #009900;">&#41;</span>
                                dst<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">255</span><span style="color: #339933;">;</span>
                        <span style="color: #b1b100;">else</span>
                                dst<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        out <span style="color: #339933;">=</span> fopen<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;lena512_dither_32.raw&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;wb&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fwrite<span style="color: #009900;">&#40;</span> dst<span style="color: #339933;">,</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">512</span><span style="color: #339933;">*</span><span style="color: #0000dd;">512</span><span style="color: #339933;">,</span> out <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        fclose<span style="color: #009900;">&#40;</span>out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>
<div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D731&rdate=2008-11-21+10%3A29%3A58&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F%3Fp%3D731&rdate=2008-11-21+10%3A29%3A58&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>10/29/2007 -- <a href="http://b.mytears.org/2007/10/612" title="CG: gaussian blur">CG: gaussian blur (0)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/11/731/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>공개 서체: 다음체</title>
		<link>http://b.mytears.org/2008/09/673</link>
		<comments>http://b.mytears.org/2008/09/673#comments</comments>
		<pubDate>Sat, 13 Sep 2008 08:27:31 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[daum]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[공개]]></category>
		<category><![CDATA[서체]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/09/673</guid>
		<description><![CDATA[<p>국내 포털 중 하나인 다음 측에서 새로운 공개 서체를 발표했습니다. 자유롭게 사용할 수 있는 양질의 한글 서체가 하나 둘 늘어가는 현실에 기분이 참 좋습니다.</p>
<p>http://fontevent.daum.net/</p>
<p>서체 이름은 &#8216;다음&#8217; 이고, 레귤러와 세미볼드 이렇게 두 가지 스타일로 제공되고 있지만, family name 이 각각 &#8216;Daum_Regular&#8217; 와 &#8216;Daum_Semibod&#8217; 로 서로 다르기 때문에 같은 서체로 인식이 되지는 않습니다. 각 서체의 적용 예는 ...</p>
<p><a href='http://b.mytears.org/2008/09/673'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1384" title="포탈 사이트와 공개 서체&#8230;">포탈 사이트와 공개 서체&#8230; (15)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li><li>7/17/2008 -- <a href="http://b.mytears.org/2008/07/660" title="공개 서체: 서울체">공개 서체: 서울체 (6)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F09%2F673&rdate=2008-09-13+17%3A27%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F09%2F673&rdate=2008-09-13+17%3A27%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>국내 포털 중 하나인 <a href='http://daum.net'>다음</a> 측에서 새로운 공개 서체를 발표했습니다. 자유롭게 사용할 수 있는 양질의 한글 서체가 하나 둘 늘어가는 현실에 기분이 참 좋습니다.</p>
<p><a href='http://fontevent.daum.net/'>http://fontevent.daum.net/</a></p>
<p>서체 이름은 &#8216;다음&#8217; 이고, 레귤러와 세미볼드 이렇게 두 가지 스타일로 제공되고 있지만, family name 이 각각 &#8216;Daum_Regular&#8217; 와 &#8216;Daum_Semibod&#8217; 로 서로 다르기 때문에 같은 서체로 인식이 되지는 않습니다. 각 서체의 적용 예는 아래에&#8230;</p>
<p><img src='http://mytears.org/resources/font-sample/%EB%8B%A4%EC%9D%8C:style=Regular_12.png' /></p>
<p><img src='http://mytears.org/resources/font-sample/%EB%8B%A4%EC%9D%8C:style=SemiBold_12.png' /></p>
<p>새로운 서체가 추가된 김에 <a href='http://mytears.org/resources/font-sample/'>font-sample</a> 페이지도 업데이트 해보았습니다. :)</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F09%2F673&rdate=2008-09-13+17%3A27%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F09%2F673&rdate=2008-09-13+17%3A27%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/8/2009 -- <a href="http://b.mytears.org/2009/02/1384" title="포탈 사이트와 공개 서체&#8230;">포탈 사이트와 공개 서체&#8230; (15)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li><li>7/17/2008 -- <a href="http://b.mytears.org/2008/07/660" title="공개 서체: 서울체">공개 서체: 서울체 (6)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/09/673/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>메모리 복사 코드 최적화…</title>
		<link>http://b.mytears.org/2008/08/666</link>
		<comments>http://b.mytears.org/2008/08/666#comments</comments>
		<pubDate>Fri, 29 Aug 2008 18:31:59 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[loop unrolling]]></category>
		<category><![CDATA[mmx]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[prefetch]]></category>
		<category><![CDATA[simd]]></category>
		<category><![CDATA[sse]]></category>
		<category><![CDATA[캐쉬]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/08/666</guid>
		<description><![CDATA[<p>kldp 를 눈팅하다가 오늘 재밌는 문서를 읽게 되었습니다. 2001년도에 AMD 에서 나온 문서였는데, 그 내용이 상당히 흥미로워서 몇 가지 내용을 옮겨볼까 합니다. </p>
<p>메모리에서 연속된 값들을 다른 곳으로 복사하기 위해 사용할 수 있는 가장 간단한 어셈블리 코드는 다음과 같습니다.</p>
<p></p>
<p>?View Code ASM	mov esi, &#91;src&#93; // source array</p>
<p>	mov edi, &#91;dst&#93; // destination array</p>
<p>	mov ecx, &#91;len&#93; // number of ...</p>
<p><a href='http://b.mytears.org/2008/08/666'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/14/2007 -- <a href="http://b.mytears.org/2007/01/482" title="matrix multiply with mmx #2">matrix multiply with mmx #2 (3)</a></li><li>1/13/2007 -- <a href="http://b.mytears.org/2007/01/481" title="matrix multiply with mmx #1">matrix multiply with mmx #1 (3)</a></li><li>1/11/2007 -- <a href="http://b.mytears.org/2007/01/480" title="mmx">mmx (24)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>9/14/2006 -- <a href="http://b.mytears.org/2006/09/411" title="wordpress: 최근 추가한 플러그인들&#8230;">wordpress: 최근 추가한 플러그인들&#8230; (4)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F666&rdate=2008-08-30+03%3A31%3A59&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F666&rdate=2008-08-30+03%3A31%3A59&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>kldp 를 눈팅하다가 오늘 재밌는 문서를 읽게 되었습니다. 2001년도에 AMD 에서 나온 문서였는데, 그 내용이 상당히 흥미로워서 몇 가지 내용을 옮겨볼까 합니다. </p>
<p>메모리에서 연속된 값들을 다른 곳으로 복사하기 위해 사용할 수 있는 가장 간단한 어셈블리 코드는 다음과 같습니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code21'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66621"><td class="code" id="p666code21"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">shl</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">3</span> <span style="color: #339933;">//</span> convert to <span style="color: #000000; font-weight: bold;">byte</span> count
&nbsp;
	<span style="color: #00007f; font-weight: bold;">rep</span> <span style="color: #00007f; font-weight: bold;">movsb</span></pre></td></tr></table></div>

<p>rep movsb 명령은 repeat move single byte (바이트 단위로 값들을 반복해서 옮긴다.)라는 의미를 가집니다. esi 가 가리키는 곳에 있는 값을 edi 로 ecx 에 있는 개수 만큼 복사하게 됩니다. 이렇게 할 경우 일초에 약 620MB 를 복사할 수 있다고 하네요.</p>
<p>이 코드를 byte 단위가 아니라 4 byte 단위로 반복해서 복사를 하도록 하면 어떻게 될까요? 우선 코드는 다음과 같이 변하겠네요.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code22'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66622"><td class="code" id="p666code22"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">shl</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">1</span> <span style="color: #339933;">//</span> convert to <span style="color: #000000; font-weight: bold;">DWORD</span> count
&nbsp;
	<span style="color: #00007f; font-weight: bold;">rep</span> <span style="color: #00007f; font-weight: bold;">movsd</span></pre></td></tr></table></div>

<p>shl 인스트럭션은 두개의 오퍼랜드를 가지며 (shl operand1 operand2) operand1 에 있는 값을 operand2 에 있는 값만큼 왼쪽으로 shift 를 시키게 됩니다. movsd 는 mov single dword[1] 라고 보시면 됩니다. </p>
<p>결과적으로 이렇게 코드를 수정함으로 인해 1초에 640MB 를 복사할 수 있게 됩니다. 3% 정도 성능 향상이 생기네요.</p>
<p>그런데 최근에 나온 프로세서들에서는 rep 같은 복잡한 인스트럭션을 내부적으로 RISC 명령으로 바꿔서 실행하다 보니, 그리 효율적이지 못하답니다. 그러므로 rep 를 사용하지 말고 반복문을 사용해보도록 합시다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code23'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66623"><td class="code" id="p666code23"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">shl</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">1</span> <span style="color: #339933;">//</span> convert to <span style="color: #000000; font-weight: bold;">DWORD</span> count
&nbsp;
copyloop<span style="color: #339933;">:</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">eax</span>
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">4</span>
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">4</span>
	<span style="color: #00007f; font-weight: bold;">dec</span> <span style="color: #00007f;">ecx</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> copyloop</pre></td></tr></table></div>

<p>코드가 뭔가 좀 길어졌죠? 위 코드를 c로 표현하면 아래와 같습니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code24'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66624"><td class="code" id="p666code24"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span><span style="color: #339933;">*</span> src <span style="color: #339933;">=</span> esi<span style="color: #339933;">;</span>
<span style="color: #993333;">int</span><span style="color: #339933;">*</span> dst <span style="color: #339933;">=</span>  edi<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">int</span> i<span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> len <span style="color: #339933;">;</span> i <span style="color: #339933;">!=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">--</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	dst<span style="color: #339933;">++</span> <span style="color: #339933;">=</span> src<span style="color: #339933;">++;</span></pre></td></tr></table></div>

<p>c로 표현하니 어디서 많이 쓰던 코드죠? 쨌든! 이렇게 하니 1초에 650MB 를 복사할수 있었고 결과적으로 1.5% 정도 성능이 향상되었답니다.</p>
<p>그럼 여기다가 Loop 코드를 최적화 하는 기법인 Loop Unrolling 을 적용해봅시다. [2]</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code25'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66625"><td class="code" id="p666code25"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">shr</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">1</span> <span style="color: #339933;">//</span> convert to <span style="color: #0000ff;">16</span><span style="color: #339933;">-</span><span style="color: #000000; font-weight: bold;">byte</span> <span style="color: #000000; font-weight: bold;">size</span> count
	<span style="color: #339933;">//</span> <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">assumes</span> len <span style="color: #339933;">/</span> <span style="color: #0000ff;">16</span> is an integer<span style="color: #009900; font-weight: bold;">&#41;</span>
&nbsp;
copyloop<span style="color: #339933;">:</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">eax</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ebx</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">ebx</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">eax</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ebx</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">12</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">12</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">ebx</span>
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">16</span>
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">16</span>
	<span style="color: #00007f; font-weight: bold;">dec</span> <span style="color: #00007f;">ecx</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> copyloop</pre></td></tr></table></div>

<p>자 룹을 펼쳤더니 1초에 640MB 를 복사하였고, 결과적으로 1.5% 만큼 성능이 떨어졌습니다. 하지만 다행히도 Loop Unrolling 을 적용하고 나니 최적화를 할 여지가 많아졌네요.</p>
<p>캐쉬를 좀 더 잘 활용할 수 있도록 코드 순서를 바꿔봅시다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code26'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66626"><td class="code" id="p666code26"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">shr</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">1</span> <span style="color: #339933;">//</span> convert to <span style="color: #0000ff;">16</span><span style="color: #339933;">-</span><span style="color: #000000; font-weight: bold;">byte</span> <span style="color: #000000; font-weight: bold;">size</span> count
&nbsp;
copyloop<span style="color: #339933;">:</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ebx</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">eax</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">4</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">ebx</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ebx</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">12</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">eax</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #000000; font-weight: bold;">dword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #0000ff;">12</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #00007f;">ebx</span>
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">16</span>
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">16</span>
	<span style="color: #00007f; font-weight: bold;">dec</span> <span style="color: #00007f;">ecx</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> copyloop</pre></td></tr></table></div>

<p>이젠 1초에 660MB 를 복사할 수 있게 되었고, 3% 만큼 성능 향상이 일어났습니다.</p>
<p>여기서 끝이 아닙니다. 첨에 movsb 대신 movd 를 사용해서 1byte씩이 아닌 4byte 씩 복사를 하는 방법을 통해 최적화를 진행했었는데요, MMX 를 사용할 경우 movq 등의 인스트럭션을 이용해서 한 번에 8byte 씩을 복사하는게 가능해집니다. 또한 mm0~7 이라는 특수한 레지스터를 활용할 수 있으니 8*8 = 64 즉 한번에 64byte 씩을 복사해봅시다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code27'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66627"><td class="code" id="p666code27"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> <span style="color: #000000; font-weight: bold;">end</span> of source
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> <span style="color: #000000; font-weight: bold;">end</span> of destination
	<span style="color: #00007f; font-weight: bold;">neg</span> <span style="color: #00007f;">ecx</span> <span style="color: #339933;">//</span> use a negative <span style="color: #000000; font-weight: bold;">offset</span>
&nbsp;
copyloop<span style="color: #339933;">:</span>
	movq mm0<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm1<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm2<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm3<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm4<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm5<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm6<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm7<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm0
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm1
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm2
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm3
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm4
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm5
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm6
	movq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm7
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">8</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> copyloop
	emms <span style="color: #339933;">//</span> empty the MMX state</pre></td></tr></table></div>

<p>MMX 용 레지스터들인 mm0~7 은 FPU stack 의 일부를 활용하게 되므로, 이 레지스터 값을 바꿔주게 될 경우 FPU 와 관련해서 문제를 일으킬 수 있습니다. EMMX 는 이를 방지하기 위해 사용해야 하는 인스트럭션이 되겠습니다. 하여튼 이렇게 바꾸니 1초에 705MB 를 복사할 수 있게 되었고, 7% 만큼 성능이 향상되었습니다.</p>
<p>이젠 movntq 라는 인스트럭션을 통해 cache 를 우회해서 writing 을 진행해봅시다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code28'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66628"><td class="code" id="p666code28"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">neg</span> <span style="color: #00007f;">ecx</span>
&nbsp;
copyloop<span style="color: #339933;">:</span>
	movq mm0<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm1<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm2<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm3<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm4<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm5<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm6<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm7<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm0
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm1
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm2
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm3
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm4
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm5
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm6
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm7
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">8</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> copyloop
	sfence
	emms</pre></td></tr></table></div>

<p>movntq 를 활용한 다음에는 write buffer 를 비워주기 위해 sfence 를 사용해야 한다는군요. write 부분이 movq 에서 movntq 로 바뀌었고 emms 앞에 sfence 가 들어간 것을 제외하면 코드는 동일합니다. 하지만 성능 향상은 60% 로 굉장하네요. 1초에 1130MB 를 복사할 수 있었다고 합니다.</p>
<p>이젠 prefetch 도 활용해봅시다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code29'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66629"><td class="code" id="p666code29"><pre class="asm" style="font-family:monospace;">	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">neg</span> <span style="color: #00007f;">ecx</span>
&nbsp;
copyloop<span style="color: #339933;">:</span>
	prefetchnta <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">512</span><span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> fetch ahead by <span style="color: #0000ff;">512</span> bytes
	movq mm0<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm1<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm2<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm3<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm4<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm5<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm6<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm7<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm0
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm1
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm2
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm3
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm4
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm5
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm6
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm7
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">8</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> copyloop
	sfence
	emms</pre></td></tr></table></div>

<p>위 코드에는 현재 복사할 차례의 512 바이트를 미리 읽어두라는 의미의 prefetchnta 인스트럭션이 추가되었습니다. 한 번에 복사하는건 64Byte 인데 왜 512Byte 를 읽으라고 했는지 살짝 의문이네요. 제 생각에는 문서를 작성하신 분이 버그를 낸거라고 생각합니다.</p>
<p>하여튼 이젠 1초에 1240MB 를 복사할 수 있게 되었고, 10% 만큼 더 성능 향상이 생겼네요.</p>
<p>지금까지의 방법만으로도 꽤 많은 성능 향상이 있었지만, 한 번에 한 캐쉬 라인[3]만을 활용하고 있습니다. 하지만 실제 CPU 에는 훨씬 많은 캐쉬 라인이 존재하므로 이를 더 잘 활용할 수 있도록 코드를 수정해보겠습니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code30'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66630"><td class="code" id="p666code30"><pre class="asm" style="font-family:monospace;">#define CACHEBLOCK <span style="color: #0000ff;">400h</span> <span style="color: #339933;">//</span> number of QWORDs <span style="color: #00007f; font-weight: bold;">in</span> a chunk
&nbsp;
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>src<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> source array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>dst<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> destination array
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span>len<span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> total number of QWORDS <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #0000ff;">8</span> bytes<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #339933;">//</span> <span style="color: #009900; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">assumes</span> len <span style="color: #339933;">/</span> CACHEBLOCK = integer<span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">esi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">lea</span> <span style="color: #00007f;">edi</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	<span style="color: #00007f; font-weight: bold;">neg</span> <span style="color: #00007f;">ecx</span>
&nbsp;
mainloop<span style="color: #339933;">:</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> CACHEBLOCK <span style="color: #339933;">/</span> <span style="color: #0000ff;">16</span> <span style="color: #339933;">//</span> note<span style="color: #339933;">:</span> prefetch <span style="color: #00007f; font-weight: bold;">loop</span> is unrolled 2X
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> CACHEBLOCK <span style="color: #339933;">//</span> move up to <span style="color: #000000; font-weight: bold;">end</span> of block
&nbsp;
	prefetchloop<span style="color: #339933;">:</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ebx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">-</span><span style="color: #0000ff;">64</span><span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> read one address <span style="color: #00007f; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">this</span> cache line<span style="color: #339933;">...</span>
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">ebx</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">-</span><span style="color: #0000ff;">128</span><span style="color: #009900; font-weight: bold;">&#93;</span> <span style="color: #339933;">//</span> <span style="color: #339933;">...</span> <span style="color: #00007f; font-weight: bold;">and</span> one <span style="color: #00007f; font-weight: bold;">in</span> the previous line
	<span style="color: #00007f; font-weight: bold;">sub</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">16</span> <span style="color: #339933;">//</span> <span style="color: #0000ff;">16</span> QWORDS = <span style="color: #0000ff;">2</span> <span style="color: #0000ff;">64</span><span style="color: #339933;">-</span><span style="color: #000000; font-weight: bold;">byte</span> cache lines
	<span style="color: #00007f; font-weight: bold;">dec</span> <span style="color: #00007f;">eax</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> prefetchloop
	<span style="color: #00007f; font-weight: bold;">mov</span> <span style="color: #00007f;">eax</span><span style="color: #339933;">,</span> CACHEBLOCK <span style="color: #339933;">/</span> <span style="color: #0000ff;">8</span>
&nbsp;
writeloop<span style="color: #339933;">:</span>
	movq mm0<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm1<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm2<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm3<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm4<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm5<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm6<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movq mm7<span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">esi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span>
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm0
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">8</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm1
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">16</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm2
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">24</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm3
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">32</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm4
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">40</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm5
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">48</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm6
	movntq <span style="color: #000000; font-weight: bold;">qword</span> <span style="color: #000000; font-weight: bold;">ptr</span> <span style="color: #009900; font-weight: bold;">&#91;</span><span style="color: #00007f;">edi</span><span style="color: #339933;">+</span><span style="color: #00007f;">ecx</span><span style="color: #339933;">*</span><span style="color: #0000ff;">8</span><span style="color: #339933;">+</span><span style="color: #0000ff;">56</span><span style="color: #009900; font-weight: bold;">&#93;</span><span style="color: #339933;">,</span> mm7
&nbsp;
	<span style="color: #00007f; font-weight: bold;">add</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">8</span>
	<span style="color: #00007f; font-weight: bold;">dec</span> <span style="color: #00007f;">eax</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> writeloop
&nbsp;
	<span style="color: #00007f; font-weight: bold;">or</span> <span style="color: #00007f;">ecx</span><span style="color: #339933;">,</span> <span style="color: #00007f;">ecx</span>  <span style="color: #339933;">//</span> <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900; font-weight: bold;">&#40;</span> <span style="color: #00007f;">ecx</span> != <span style="color: #0000ff;">0</span> <span style="color: #009900; font-weight: bold;">&#41;</span>
	<span style="color: #00007f; font-weight: bold;">jnz</span> mainloop <span style="color: #339933;">//</span> <span style="color: #000000; font-weight: bold;">goto</span> mainloop
	sfence</pre></td></tr></table></div>

<p>여기서는 cache 가 1024 개의 cache line 을 가지고 있다고 가정했네요. (16진수인 400h 는 10진수로 바꿀 경어 1024 가 됩니다.) 미리 캐쉬 사이즈만큼 prefetch 명령들을 내려놓은 뒤 값들을 복사하게 될 때 쯤이면 이미 값들이 캐쉬에 올라와있게 되니 딜레이를 줄일 수 있게 되겠습니다.</p>
<p>효과가 있을까 싶지만, 실제 1초에 1976MB 를 복사할 수 있었고, 59% 의 성능향상이 추가로 발생했습니다. 초기 코드에 비하면 300% 의 성능 향상이라네요. 신기하죠. ;)</p>
<p>전 상당히 흥미롭게 읽었었는데, (비슷한 걸 해본 경험도 있고 해서) 재밌었는지 모르겠네요. sfence 나 movqnta, prefetchnta 같은 캐쉬와 관련된 명령들은 정확히 무슨 용도인지 이해하지 못하고 있었는데 이 문서를 통해 이해할 수 있었던 것 같네요. 관심이 있으신 분은 아래 문서를 읽어보시면 되겠습니다. FPU 관련된 최적화도 다루고 있는데, 관심이 없어서 그 부분은 옮기질 않았습니다. 그럼 다들 즐거운 주말 보내시길 ;)</p>
<p><a href='http://kldp.org/files/AMD_block_prefetch_paper.pdf'>http://kldp.org/files/AMD_block_prefetch_paper.pdf</a></p>
<p>[1] x86 호환 아키텍쳐에서는 사이즈를 byte, word, dword, qword, dqword 식으로 표현합니다. 이는 각각 1, 2, 4, 8, 16 바이트를 의미하며, word 가 2바이트이고 나머지의 앞에 붙은 알파벳들은 각각 double(*2), quad(*4), double quad(*8)를 나타내는 것이죠.</p>
<p>[2] Loop Unrolling 은 Loop 을 펼쳐서 파이프라인의 덕을 더 많이 볼 수 있도록 코드를 수정하는 방법입니다. 예를 들어</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code31'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66631"><td class="code" id="p666code31"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">16</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span>
	dst<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>위와 같은 코드를</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p666code32'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p66632"><td class="code" id="p666code32"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">16</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">+=</span><span style="color: #0000dd;">4</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	dst<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
	dst<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
	dst<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
	dst<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>이렇게 바꿀 경우 branch 로 인한 pipeline hazard 도 줄일 수 있고, add instruction 도 1/4 만큼만 사용하게 됨으로 인해 성능이 향상될 여지가 많습니다.</p>
<p>[3] 메모리에 어떤 값을 읽어들일 때 CPU 에서는 바이트 단위로 값을 읽지 않고, block 단위로 값들을 cache 에 복사하는데, 이 block 의 크기를 cache line 이라고 표현합니다. 펜티엄 계열의 경우 대부분 64byte 입니다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F666&rdate=2008-08-30+03%3A31%3A59&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F666&rdate=2008-08-30+03%3A31%3A59&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/14/2007 -- <a href="http://b.mytears.org/2007/01/482" title="matrix multiply with mmx #2">matrix multiply with mmx #2 (3)</a></li><li>1/13/2007 -- <a href="http://b.mytears.org/2007/01/481" title="matrix multiply with mmx #1">matrix multiply with mmx #1 (3)</a></li><li>1/11/2007 -- <a href="http://b.mytears.org/2007/01/480" title="mmx">mmx (24)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>9/14/2006 -- <a href="http://b.mytears.org/2006/09/411" title="wordpress: 최근 추가한 플러그인들&#8230;">wordpress: 최근 추가한 플러그인들&#8230; (4)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/08/666/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>YUVPlayer 업데이트…</title>
		<link>http://b.mytears.org/2008/08/662</link>
		<comments>http://b.mytears.org/2008/08/662#comments</comments>
		<pubDate>Fri, 01 Aug 2008 19:11:11 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[leak]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[texture]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[yuv]]></category>
		<category><![CDATA[yuvplayer]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/08/662</guid>
		<description><![CDATA[<p>사실 저나 제 주위 사람들 말고는 쓰는 사람이 거의 없는거 같긴 하지만 하여튼 메모리 릭을 일으키는 몇 가지 버그를 잡았습니다.</p>
<p></p>
<p></p>
<p>::GetDC(hWnd) 후 ::ReleaseDC(hWnd,dc) 를 호출 하지 않아서 생기는 메모리 릭</p>
<p>gdTexImage2D 를 반복 호출해서 생기게 되는 메모리 릭</p>
<p></p>
<p></p>
<p>정확하게 설명하면 위와 같구요. ::GetDC 로 받아온 Device Context 는 &#8220;꼭&#8221; ::ReleaseDC 를 호출해줘야 한다는 msdn 님의 가르침에 따라, 약간의 ...</p>
<p><a href='http://b.mytears.org/2008/08/662'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>6/9/2007 -- <a href="http://b.mytears.org/2007/06/544" title="YUVplayer for MS Windows">YUVplayer for MS Windows (6)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/542" title="OpenGL: texture vs glDrawPixels">OpenGL: texture vs glDrawPixels (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F662&rdate=2008-08-02+04%3A11%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F662&rdate=2008-08-02+04%3A11%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>사실 저나 제 주위 사람들 말고는 쓰는 사람이 거의 없는거 같긴 하지만 하여튼 메모리 릭을 일으키는 몇 가지 버그를 잡았습니다.</p>
<blockquote>
<ol>
<li>::GetDC(hWnd) 후 ::ReleaseDC(hWnd,dc) 를 호출 하지 않아서 생기는 메모리 릭</li>
<li>gdTexImage2D 를 반복 호출해서 생기게 되는 메모리 릭</li>
</ol>
</blockquote>
<p>정확하게 설명하면 위와 같구요. ::GetDC 로 받아온 Device Context 는 &#8220;꼭&#8221; ::ReleaseDC 를 호출해줘야 한다는 msdn 님의 가르침에 따라, 약간의 코드를 추가해줬습니다.</p>
<p>또한 gdTexImage2D 를 반복해서 호출하면 이전 텍스쳐 데이타가 사용하던 메모리 영역은 해제가 될 줄 알았는데, 실제로는 그렇지가 않네요. 텍스쳐 사이즈가 달라지는 경우엔 glDestroyTexture 후 glGenTexture, glBindTexture, glTexImage2D 를 차례로 호출해줘야 하고, 사이즈가 달라질 필요가 없는 경우라면 gdTexSubImage2D 를 사용하면 된답니다. 어려운 openGL 세상이에요. </p>
<p>자세한 수정 사항은 제 trac 페이지에서 확인하심 될 듯~</p>
<p><a href='http://trac.unfix.net/browser/yuvplayer/win/yuvplayer/OpenGLView.cpp'>http://trac.unfix.net/bro.../yuvplayer/OpenGLView.cpp</a></p>
<p>p.s) trac 이 ajax 를 활용하도록 업데이트 되었네요.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F662&rdate=2008-08-02+04%3A11%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F662&rdate=2008-08-02+04%3A11%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>6/9/2007 -- <a href="http://b.mytears.org/2007/06/544" title="YUVplayer for MS Windows">YUVplayer for MS Windows (6)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/542" title="OpenGL: texture vs glDrawPixels">OpenGL: texture vs glDrawPixels (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/08/662/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>한글 서체들 샘플을 만들어봤습니다.</title>
		<link>http://b.mytears.org/2008/08/661</link>
		<comments>http://b.mytears.org/2008/08/661#comments</comments>
		<pubDate>Fri, 01 Aug 2008 09:44:23 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[freetype]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[preview]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[글꼴]]></category>
		<category><![CDATA[샘플]]></category>
		<category><![CDATA[서체]]></category>
		<category><![CDATA[폰트]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/08/661</guid>
		<description><![CDATA[<p>며칠 전에 공개 글꼴들에 관련된 글을 포스팅했었는데요. :) 요번엔 그 글꼴들이 어떤 모양인지를 뽑아내봤습니다.</p>
<p>http://mytears.org/resources/font-sample/</p>
<p>gd 를 사용해서 샘플을 뽑아봤는데, gd 에서는 서체 래스터라이져로 freetype 을 사용하고 있고, 윈도우의 래스터라이져와 맥의 래스터라이져와는 약간의 차이를 보이기 때문에 실제로 사용할 때와 약간 차이가 있을 수도 있겠습니다.</p>
<p>글꼴을 뽑아내는데 사용한 프로그램은 아래에서 보실 수 있습니다.</p>
<p>http://trac.unfix.net/bro...preview/gd_font_preview.c</p>
<p>    </p>
<p>   ...</p>
<p><a href='http://b.mytears.org/2008/08/661'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F661&rdate=2008-08-01+18%3A44%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F661&rdate=2008-08-01+18%3A44%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>며칠 전에 공개 글꼴들에 관련된 글을 포스팅했었는데요. :) 요번엔 그 글꼴들이 어떤 모양인지를 뽑아내봤습니다.</p>
<p><a href='http://mytears.org/resources/font-sample/'>http://mytears.org/resources/font-sample/</a></p>
<p>gd 를 사용해서 샘플을 뽑아봤는데, gd 에서는 서체 래스터라이져로 freetype 을 사용하고 있고, 윈도우의 래스터라이져와 맥의 래스터라이져와는 약간의 차이를 보이기 때문에 실제로 사용할 때와 약간 차이가 있을 수도 있겠습니다.</p>
<p>글꼴을 뽑아내는데 사용한 프로그램은 아래에서 보실 수 있습니다.</p>
<p><a href='http://trac.unfix.net/browser/snippet/gd_font_preview/gd_font_preview.c'>http://trac.unfix.net/bro...preview/gd_font_preview.c</a></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F661&rdate=2008-08-01+18%3A44%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F08%2F661&rdate=2008-08-01+18%3A44%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>9/16/2008 -- <a href="http://b.mytears.org/2008/09/674" title="공개 서체: 순천향체">공개 서체: 순천향체 (0)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/08/661/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>exim 으로 메일 서버 구성하기…</title>
		<link>http://b.mytears.org/2008/03/639</link>
		<comments>http://b.mytears.org/2008/03/639#comments</comments>
		<pubDate>Thu, 20 Mar 2008 12:20:23 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[Unfix]]></category>
		<category><![CDATA[bogofilter]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[spam filter]]></category>
		<category><![CDATA[transport]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/03/639</guid>
		<description><![CDATA[<p>왠지 모르게 점점 마이너 한 것들만 사용하게 되네요. postfix 나 exim 을 사용해보니 여러가지 장점이 눈에 보이는데 막상 how to 문서같은게 그리 잘 나와있질 않다보니 사람들이 사용하기를 꺼리는 것 같아 처음으로 howto 문서를 하나 작성해려 합니다. </p>
<p>이 문서는 젠투에서 exim 을 사용하는 방법을 기준으로 설명하고 있습니다.</p>
<p>Table of Contents</p>
<p></p>
<p>기본 구성</p>
<p>필요한 소프트웨어 설치하기</p>
<p>가상호스트 설정하기</p>
<p>바이러스 필터 설정</p>
<p>스팸 필터 ...</p>
<p><a href='http://b.mytears.org/2008/03/639'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/26/2006 -- <a href="http://b.mytears.org/2006/09/427" title="스팸 필터 성능 공개 -_-v">스팸 필터 성능 공개 -_-v (1)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F03%2F639&rdate=2008-03-20+21%3A20%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F03%2F639&rdate=2008-03-20+21%3A20%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>왠지 모르게 점점 마이너 한 것들만 사용하게 되네요. postfix 나 exim 을 사용해보니 여러가지 장점이 눈에 보이는데 막상 how to 문서같은게 그리 잘 나와있질 않다보니 사람들이 사용하기를 꺼리는 것 같아 처음으로 howto 문서를 하나 작성해려 합니다. </p>
<p>이 문서는 젠투에서 exim 을 사용하는 방법을 기준으로 설명하고 있습니다.</p>
<h3 id="toc-table-of-contents">Table of Contents</h3>
<ol>
<li>기본 구성</li>
<li>필요한 소프트웨어 설치하기</li>
<li>가상호스트 설정하기</li>
<li>바이러스 필터 설정</li>
<li>스팸 필터 설정</li>
<li>dovecot 설정하기</li>
<li>smtp 인증 설정하기</li>
<li>다른 배포판을 사용할 때 유의점</li>
</ol>
<h3 id="toc--">기본 구성</h3>
<p>Mail Transfer Agent 로는 exim, 스팸 필터로는 bogofilter, 바이러스 필터는 clamav, pop3/imap server 로는 dovecot 을 사용하기로 하겠습니다. dovecot 이나 exim 이나 기본 적으로 실행하는 프로세스들이 많지 않기 때문에 프로세스 리스트를 확인할 때 깔끔해서 좋더군요.</p>
<h3 id="toc---">필요한 소프트웨어 설치하기</h3>
<p>저 같은 경우는 대강 다음과 같은 USE 플래그를 이용해서 설치를 진행했습니다. </p>
<p><code># emerge -pv exim bogofilter clamav dovecot procmail
&nbsp;
These are the packages that would be merged, in order:
&nbsp;
Calculating dependencies... done!
[ebuild   R   ] mail-mta/exim-4.69  USE="domainkeys dovecot-sasl exiscan exiscan-acl gnutls ipv6 pam perl sasl spf sqlite srs ssl syslog tcpd -X -dnsdb -ldap -lmtp -mailwrapper -mbox -mbx -mysql -nis -postgres -radius" 0 kB
[ebuild   R   ] mail-filter/bogofilter-1.1.6  USE="berkdb sqlite -gsl" 0 kB
[ebuild   R   ] app-antivirus/clamav-0.92.1-r1  USE="bzip2 crypt milter nls -mailwrapper (-selinux)" 14,927 kB
[ebuild   R   ] net-mail/dovecot-1.0.13-r1  USE="ipv6 pam pop3d ssl -debug -doc -kerberos -ldap -managesieve -mbox -mysql -postgres -sieve -suid -vpopmail" 0 kB
[ebuild   R   ] mail-filter/procmail-3.22-r7  USE="-mbox (-selinux)" 222 kB
&nbsp;
Total: 5 packages (5 reinstalls), Size of downloads: 15,149 kB</code></p>
<p>domainkeys 는 야후나 구글에서 사용하고 있는 domain key 를 제대로 검증하기 위한 USE 플래그가 되겠구요, dovecot-sasl 은 smtp 인증에 dovecot 을 이용하기 위한 플래그입니다. </p>
<p>spf, srs, domainkey 같은 플래그는 해당 기능을 사용하지 않겠다면 빼주셔도 무방합니다. CentOS 등에서는 dovecot-sasl 도 기본으로 지원이 안되더라구요. 하튼 관련해서 자세한 건 뒤에서 설명하도록 하겠습니다. </p>
<p>살펴보니 별로 특이한 플래그를 사용하지는 않네요. -_;; 젠투 유져라면 다들 아시겠지만 실제 설치는 위의 예제에서 -pv 를 제거하고 실행시키시면 됩니다.</p>
<h3 id="toc--1">가상호스트 설정하기</h3>
<p>설치가 무사히 끝났다면 가상호스트를 설정해봅시다. 젠투에서는 기본으로 설정파일을 만들어주지 않습니다. 그렇기 때문에 우선 /etc/exim/exim.conf.dist 를 복사해서 exim.conf 를 만들어줍니다.</p>
<p><code># cp /etc/exim/exim.conf.dist /etc/exim/exim.conf</code></p>
<p>그런 다음 자신이 좋아하는 편집기를 이용해서 exim.conf 파일을 열고, 아래와 같은 부분을 찾아서 자신의 환경에 맞게 수정을 한 뒤</p>
<p><code>primary_hostname = unfix.net
&nbsp;
domainlist local_domains = @ : localhost : dsearch;/etc/exim/virtual
domainlist relay_to_domains =
hostlist   relay_from_hosts = 127.0.0.1</code></p>
<p>router 부분에서 system_alias 바로 아래에 다음 코드를 추가해줍니다.</p>
<p><code>virtual:
  driver = redirect
  allow_fail
  allow_defer
  domains = dsearch;/etc/exim/virtual
  data = ${expand:${lookup{$local_part}lsearch*@{/etc/exim/virtual/$domain}}}
  retry_use_local_part
  file_transport = address_file
  pipe_transport = address_pipe</code></p>
<p>주 도메인이 있는 경우 localhost 대신 unfix.net 같은 도메인을 사용해도 무방합니다. 만약 위의 예제에서 localhost 대신 unfix.net 을 설정해주면 로컬에 있는 모든 계정은 <a href="mailto:id@unfix.net">id@unfix.net</a> 형태의 메일계정으로 사용이 가능해집니다. 주 도메인이 여러개라면 @ : localhost : mydomain1 : mydomain2 식으로 콜론(:) 을 이용해서 여러 개를 모두 적어주면 되겠습니다.</p>
<p>이젠 가상 호스트를 설정해봅시다. 만약 test.com 과 test.net 을 위한 가상호스트를 설정하려 한다면 다음과 같이 하면 됩니다.</p>
<p><code># mkdir /etc/exim/virtual
# vi /etc/exim/virtual/test.com
# vi /etc/exim/virtual/test.net</code></p>
<p>위에서 dsearch; &#8230; 으로 설정해놓은 디렉토리 안에다가 호스트 이름을 이용해서 alias 파일을 만들어주면 되니까 간단하죠? 각 파일에 들어가는 내용은 다음과 같습니다.</p>
<blockquote><p># test.com<br />
test: <a href="mailto:aqua@localhost">aqua@localhost</a><br />
melong: <a href="mailto:test@gmail.com">test@gmail.com</a>
</p></blockquote>
<blockquote><p># test.net<br />
aqua: <a href="mailto:test@localhost">test@localhost</a>
</p></blockquote>
<p>test.com 파일에 들어가 있는 test: <a href="mailto:aqua@localhost">aqua@localhost</a> 는 <a href="mailto:test@test.com">test@test.com</a> 으로 온 메일을 <a href="mailto:aqua@localhost">aqua@localhost</a> 로 포워드를 시키라는 거에요. 워낙 간단하니 다른 것들은 따로 설명 안해도 될 것 같네요. 단 위에서 localhost 대신 myhost.net 을 사용했다면 <a href="mailto:aqua@myhost.net">aqua@myhost.net</a> 처럼 설정해줘야 합니다.</p>
<p>여기까지 따라하셨다면 가상 호스트 설정은 끝! 가상 호스트 파일을 수정했을 때는 alias 를 수정했을 때와 달리 newalias 를 실행시키실 필요가 없습니다.</p>
<h3 id="toc---1">바이러스 필터 설정</h3>
<p>바이러스 필터로는 clamav 를 사용할 건데, USE 플래그로 exiscan 과 exiscan-acl 을 사용해서 설치했다면 clamd 와 연동하는건 아주 간단합니다.</p>
<p>exim.conf 에서 다음과 같은 줄을 찾아서 주석을 해제시키세요. </p>
<p><code>av_scanner = clamd:/var/run/clamav/clamd.sock</code></p>
<p>끝! clamd.sock 위치는 배포판에 따라 다를 수 있습니다. 자세한건 /etc/clamd.conf 를 참조하세요.</p>
<h3 id="toc---2">스팸 필터 설정</h3>
<h4 id="toc-spf">SPF</h4>
<p>Exim에는 기본으로 SPF와 관련된 코드가 있으므로 SPF를 사용하기 위해선 EXPERIMENTAL_SPF=yes 환경변수와 함께 exim을 빌드하면 됩니다.</p>
<p>설정은 global 섹션에서 acl_smtp_rcpt 로 등록되어 있는 것에 다음과 같은 설정을 넣어주면 됩니다.</p>
<p><code># Query the SPF information for the sender address domain, if any,
  # to see if the sending host is authorized to deliver its mail.
  # If not, reject the mail.
  #
  deny
    message     = [SPF] $sender_host_address is not allowed to send mail \
                  from $sender_address_domain
    log_message = SPF check failed.
    spf         = fail
&nbsp;
  # Add a SPF-Received: header to the message
  warn
    message     = $spf_received</code></p>
<p>젠투에선 acl_smtp_rcpt가 acl_check_rcpt로 되어 있기 떄문에 acl_check_rcpt 부분에 위 설정을 추가해줬습니다. </p>
<p>만약 warn message = $spf_received 를 넣어주지 않으면 헤더에 SPF결과를 출력하지 않게됩니다. SPF헤더를 붙일 경우에는 SMTP Auth를 이용해서 메일을 보내는 경우에도 SPF헤더가 붙는 문제가 있습니다. 이를 피하기 위해 설정을 아래처럼 수정해주도록 합시다.</p>
<p><code># Add a SPF-Received: header to the message
  warn
    message     = $spf_received
    !authenticated = *</code></p>
<h4 id="toc-srs">SRS</h4>
<p>SRS를 설정하기 위해 우선 global 섹션에 다음과 같은 내용을 추가해줍니다.</p>
<p><code>srs_config = somesecretkey</code></p>
<p>여기서 somesecretkey는 본인이 원하는 임의의 문자열을 넣으면 되겠습니다. 그 후 다음과 같이 userforward에 &#8217;srs=forward&#8217;를 넣어주면 됩니다. 간단하죠.</p>
<p><code>userforward:
  driver = redirect
  srs = forward
  check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
  file = $home/.forward
# allow_filter
  no_verify
  no_expn
  check_ancestor
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply</code></p>
<h4 id="toc-bogofilter">Bogofilter</h4>
<p>스팸 필터로는 베이시안 룰 기반의 스팸 필터인 bogofilter를 사용해봅시다. </p>
<p>bogofilter를 MTA와 연동시키는 데는 procmail을 이용할 수도 있지만, procmail은 로컬 유져에 한해서만 사용이 가능하고, alias 나 .forward 를 사용하게 되는 경우에는 사용할 수 없으므로 exim의 transport와 router를 이용해보겠습니다.</p>
<p>우선 transport를 다음과 같이 설정합니다.</p>
<p><code>bogofilter:
  driver = pipe
  command = /usr/sbin/exim -oMr bogodone -bS
  use_bsmtp = true
  transport_filter = /usr/bin/bogofilter -d /etc/bogofilter/ -e -p
  log_output = true
  return_path_add = false
  temp_errors = *
  home_directory = "/tmp"
  current_directory = "/tmp"
  message_prefix = ""
  message_suffix = ""</code></p>
<p>그리고 이 transport 를 이용하는 router를 만들어야 합니다. 참고로 router 는 순서에 민감하므로 삽입할 위치를 잘 선택해야 합니다. 저같은 경우는 system_alias 다음에다가 넣어두었습니다.</p>
<p><code>bogofilter:
  domains = +local_domains
  no_verify
  condition = ${if !eq {$received_protocol}{bogodone} {1}{0}}
  driver = accept
  transport = bogofilter</code></p>
<p>여기까지만 하게 되면 bogofilter가 각각의 메일 헤더에 &#8216;이 메일이 스팸/햄이다.&#8217; 라는 정보만을 넣어줄 뿐 스팸/햄을 다른 메일박스로 분류해주는 동작은 하질 않습니다.</p>
<p>그러므로 자동 분류를 위한 transport 와 router 를 또 추가해주도록 합니다.</p>
<p>transport 먼저&#8230;</p>
<p><code>spam_delivery:
  driver = appendfile
  directory = /home/$local_part/.maildir/.Spam
  maildir_format
  delivery_date_add
  envelope_to_add
  return_path_add</code></p>
<p>이렇게 하면 자신의 홈 디렉토리의 .maildir 아래 .Spam 이란 디렉토리를 만들고, 그 디렉토리에 스팸 메일을 저장하게 됩니다. </p>
<p>IMAP 으로 접속하면 Spam 메일들을 확인할 수 있기 때문에 이렇게 했는데, POP3 만 사용하는 거라면 그냥 제목에 [Spam] prefix 를 붙이게 하는 것도 나쁘지 않을 것 같습니다.</p>
<p>그 다음엔 이 transport 를 이용하는 router를 설정해야하는데, 이 때도 위치를 잘 생각해야 합니다. 저같은 경우엔 bogofilter router 바로 아래에 위치시켜 놓았습니다..</p>
<p><code>removingspam:
  driver = accept
  check_local_user
  condition = ${if match {$h_X-Bogosity:} {Spam, tests=bogofilter} {1}{0}}
  transport = spam_delivery</code></p>
<p>스팸 메일은 bogofilter 에 의해 X-Bogosity: Spam, test=bogofilter &#8230; 식의 헤더가 추가되기 때문에 이렇게 할 경우 스팸을 쉽게 분류해낼 수 있습니다.</p>
<h3 id="toc-dovecot-">dovecot 설정하기</h3>
<p>우선 /etc/dovecot.conf 파일을 열어서 서비스할 프로토콜 리스트를 적어주세요. 그 다음에 plaintext 로 로그인할 수 있도록 설정해주고, pop3 나 imaps 를 위해 ssl 을 사용할거라고 명시해주고, 마지막으로 dovecot-sasl 을 사용할 수 있도록 auth-client 를 활성화시켜주세요.</p>
<p>이를 종합해보면 다음과 같은 설정파일이 만들어집니다. 볼드로 표시한 부분이 제가 수정한 부분이에요. 주석을 제거하고 보니 정말 간단하네요. -_-;</p>
<p><code><b>protocols = imap imaps pop3 pop3s</b>
&nbsp;
listen = [::]
<b>disable_plaintext_auth = no</b>
&nbsp;
<b>ssl_disable = no
ssl_cert_file = /etc/ssl/private/unfix.net.crt
ssl_key_file = /etc/ssl/private/unfix.net.key</b>
&nbsp;
mail_location = maildir:~/.maildir
&nbsp;
protocol imap {
}
&nbsp;
protocol pop3 {
  <b>pop3_uidl_format = %08Xu%08Xv</b>
}
&nbsp;
protocol lda {
  postmaster_address = <a href="mailto:postmaster@example.com">postmaster@example.com</a>
}
&nbsp;
auth default {
  <b>mechanisms = plain login</b>
  passdb pam {
    args = "*"
  }
  userdb passwd {
  }
  user = root
  <b>socket listen {
    client {
      path = /var/run/dovecot/auth-client
      mode = 0666
    }
  }</b>
}</code></p>
<p>그리고 /etc/pam.d 로 가서 smtp 파일이 있는지를 체크해보시고 만약 없다면 system-login 이나 pop 등을 복사해서 smtp 파일을 만들어주세요. 이것 때문에 어제 혈압이 올랐던걸 생각하면 &#8230;!!!</p>
<p>여기까지 설정하셨음 90% 는 끝난겁니다.</p>
<h3 id="toc-smtp--">smtp 인증 설정하기</h3>
<p>자 다시 exim.conf 로 돌아와서 smtp 인증을 설정해봅시다. exim.conf 에서 authenticators 파트를 찾아서 아래와 같은 내용을 추가해줍시다.</p>
<p><code>plain:
  driver = dovecot
  public_name = PLAIN
  server_socket = /var/run/dovecot/auth-client
  server_set_id = $1
  server_advertise_condition = 1
&nbsp;
login:
  driver = dovecot
  public_name = LOGIN
  server_socket = /var/run/dovecot/auth-client
  server_set_id = $1
  server_advertise_condition = 1</code></p>
<p>이걸로 설정은 끝! 다음엔 데몬들을 띄워서 제대로 되나 확인을 해보세요.</p>
<p><code># /etc/init.d/dovecot start
# /etc/init.d/exim start</code></p>
<h3 id="toc-----">다른 배포판을 사용할 때 유의점</h3>
<p>제가 이것저것 확인해본 건 아니라 정확하게 알려드릴 순 없지만 CentOS 에서는 spf, srs, dovecot-sasl, domainkeys 등을 사용할 수가 없습니다. 그렇기 때문에 dovecot-auth 대신 saslauthd 를 사용해야 해요. saslauthd 를 사용할 때의 authenticator 파트는 다음과 같습니다.</p>
<p><code>PLAIN:
  driver = plaintext
  public_name = PLAIN
  server_condition           = ${if saslauthd{{$1}{$2}{smtp}}{1}{0}}
  server_set_id = $1
  server_advertise_condition = true
&nbsp;
LOGIN:
  driver = plaintext
  public_name = LOGIN
  server_condition           = ${if saslauthd{{$1}{$2}{smtp}}{1}{0}}
  server_set_id              = $1
  server_advertise_condition = true</code></p>
<p>server_condition 을 다음처럼 해서 pam 만으로도 인증을 할 수 있을지도 모르겠는데, 테스트하기가 귀찮네요. -_-; 혹시나 시도해보신분 있으면 결과를 좀 알려주세요.</p>
<p><code>server_condition = "${if pam{$2:$3}{1}{0}}"</code></p>
<p>참고로 인증을 saslauthd 를 통해서 하려는 경우 saslauthd 가 실행 중에 있어야 합니다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F03%2F639&rdate=2008-03-20+21%3A20%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F03%2F639&rdate=2008-03-20+21%3A20%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/26/2006 -- <a href="http://b.mytears.org/2006/09/427" title="스팸 필터 성능 공개 -_-v">스팸 필터 성능 공개 -_-v (1)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/03/639/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>spam filtering with transport/router of exim</title>
		<link>http://b.mytears.org/2008/02/629</link>
		<comments>http://b.mytears.org/2008/02/629#comments</comments>
		<pubDate>Tue, 26 Feb 2008 09:13:25 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[bogofilter]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[filtering]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[spam filter]]></category>
		<category><![CDATA[transport]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/02/629</guid>
		<description><![CDATA[<p>I used to classify spam mail with procmail, but procmail is excuted only for local users. So  when you use the .forward file, spam mail is also forwarded to the other email addresses.</p>
<p>It&#8217;s not so quite import but I don&#8217;t like this behavior. so I change the exim configuration to run bogofilter with the ...</p>
<p><a href='http://b.mytears.org/2008/02/629'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/11/2006 -- <a href="http://b.mytears.org/2006/09/404" title="bogofilter">bogofilter (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F629&rdate=2008-02-26+18%3A13%3A25&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F629&rdate=2008-02-26+18%3A13%3A25&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>I used to classify spam mail with procmail, but procmail is excuted only for local users. So  when you use the .forward file, spam mail is also forwarded to the other email addresses.</p>
<p>It&#8217;s not so quite import but I don&#8217;t like this behavior. so I change the exim configuration to run bogofilter with the transport/router of exim.</p>
<p>first let&#8217;s configure transport like this.</p>
<p><code>bogofilter:
  driver = pipe
  command = /usr/sbin/exim -oMr bogodone -bS
  use_bsmtp = true
  transport_filter = /usr/bin/bogofilter -d /etc/bogofilter/ -e -p
  log_output = true
  return_path_add = false
  temp_errors = *
  home_directory = "/tmp"
  current_directory = "/tmp"
  message_prefix = ""
  message_suffix = ""</code></p>
<p>after that you need to declare the router which uses this transport. Order is important in router. I put it right after the system_alias router.</p>
<p><code>bogofilter:
  domains = +local_domains
  no_verify
  condition = ${if !eq {$received_protocol}{bogodone} {1}{0}}
  driver = accept
  transport = bogofilter</code></p>
<p>With this configuration, bogofilter will be excuted but it put only an additional header like &#8220;X-bogofilter: &#8230;&#8221; so we need another transport/router to classify the spam mails.</p>
<p>Here&#8217;s the transport to do that.</p>
<p><code>spam_delivery:
  driver = appendfile
  directory = /home/$local_part/.maildir/.Spam
  maildir_format
  delivery_date_add
  envelope_to_add
  return_path_add</code></p>
<p>With this transport, we can put the spam mails to the .Spam folder within $HOME/.maildir. If you use the IMAP protocol, then you can simply check the spam mails by accessing Spam folder. But with POP3 protocol there&#8217;s no way to check it. So if you use POP3 then use the header filtering rules of client software instead.</p>
<p>And we also need to add a router which uses this transport. The order is important in here too. I put it below the bogofilter router.</p>
<p><code>removingspam:
  driver = accept
  check_local_user
  condition = ${if match {$h_X-Bogosity:} {Spam, tests=bogofilter} {1}{0}}
  transport = spam_delivery</code></p>
<p>Spam mail has the header, X-Bogosity: Spam, test=bogofilter &#8230;, so we can classify the spam mail easily.</p>
<p>To confirm it working, check the mail log. I checked /var/log/mail/current because I use metalog but in almosts linux distributions syslogd is included so check the /var/log/messages file.</p>
<blockquote><p>$ # tail -f /var/log/mail/current |grep R=<br />
Feb 26 16:48:31 [exim] 2008-02-26 16:48:31 1JRkT5-0001pz-Nx => mailaddr R=procmail T=procmail<br />
Feb 26 16:48:35 [exim] 2008-02-26 16:48:35 1JTuY0-00081q-7u => mailaddr R=removingspam T=spam_delivery<br />
Feb 26 16:48:44 [exim] 2008-02-26 16:48:44 1JQWAs-0002po-CR => mailaddr R=bogofilter T=bogofilter<br />
Feb 26 16:48:45 [exim] 2008-02-26 16:48:45 1JTuY5-000826-EK => mailaddr R=removingspam T=spam_delivery
</p></blockquote>
<p>The name of router/transport is located after R= and T= . The name of router appears after R=, and the name of transport appears after T=. According to this log, we can say that removespam or procmail router is used after the bogofilter excuted. </p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F629&rdate=2008-02-26+18%3A13%3A25&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F629&rdate=2008-02-26+18%3A13%3A25&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/11/2006 -- <a href="http://b.mytears.org/2006/09/404" title="bogofilter">bogofilter (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/02/629/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>exim 의 transport, router 를 이용한 스팸 필터링</title>
		<link>http://b.mytears.org/2008/02/628</link>
		<comments>http://b.mytears.org/2008/02/628#comments</comments>
		<pubDate>Tue, 26 Feb 2008 07:53:09 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[bogofilter]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[exim.conf]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[spam filter]]></category>
		<category><![CDATA[transport]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/02/628</guid>
		<description><![CDATA[<p>익숙한 걸 사용하려다보니 procmail 을 이용해서 bogofilter 를 수행하는 방법을 사용해 왔지만, procmail 은 로컬 유져에 한해서 실행되게 되므로, alias 나 .forward 를 사용하게 되는 경우 스팸 필터링을 하지 않게 된다.</p>
<p>하여튼 이게 좀 신경쓰여서 transport 와 router 를 이용해서 bogofilter 를 수행하도록 설정해봤다.</p>
<p>우선 transport 를 다음과 같이 설정해보자.</p>
<p>bogofilter:</p>
<p>  driver = pipe</p>
<p>  command = ...</p>
<p><a href='http://b.mytears.org/2008/02/628'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/11/2006 -- <a href="http://b.mytears.org/2006/09/404" title="bogofilter">bogofilter (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F628&rdate=2008-02-26+16%3A53%3A09&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F628&rdate=2008-02-26+16%3A53%3A09&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>익숙한 걸 사용하려다보니 procmail 을 이용해서 bogofilter 를 수행하는 방법을 사용해 왔지만, procmail 은 로컬 유져에 한해서 실행되게 되므로, alias 나 .forward 를 사용하게 되는 경우 스팸 필터링을 하지 않게 된다.</p>
<p>하여튼 이게 좀 신경쓰여서 transport 와 router 를 이용해서 bogofilter 를 수행하도록 설정해봤다.</p>
<p>우선 transport 를 다음과 같이 설정해보자.</p>
<p><code>bogofilter:
  driver = pipe
  command = /usr/sbin/exim -oMr bogodone -bS
  use_bsmtp = true
  transport_filter = /usr/bin/bogofilter -d /etc/bogofilter/ -e -p
  log_output = true
  return_path_add = false
  temp_errors = *
  home_directory = "/tmp"
  current_directory = "/tmp"
  message_prefix = ""
  message_suffix = ""</code></p>
<p>그리고 이 transport 를 이용하는 router 를 만든다. 참고로 router 는 순서에 민감하므로 삽입할 위치를 잘 조절해야 한다. 나같은 경우는 system_alias 다음에 선언해두었다. (alias 를 사용하는 주소들중 로컬 유져에게 전달되지 않는 건 mailman 과 관련된 것들 밖에 없는데 이거야 뭐 어짜피 인증된 사용자가 보낸 메일만 받으니 상관 없겠다는 마음으로&#8230;-_-;; )</p>
<p><code>bogofilter:
  domains = +local_domains
  no_verify
  condition = ${if !eq {$received_protocol}{bogodone} {1}{0}}
  driver = accept
  transport = bogofilter</code></p>
<p>여기까지만 하게 되면 bogofilter 를 수행하기는 하지만 이를 이용해서 메일을 옮긴다거나 하는 동작은 하지 않게 된다. 그러므로 이런 동작을 시키기 위한 transport 와 router 를 또 추가해주자.</p>
<p>역시나 transport 먼저&#8230;</p>
<p><code>spam_delivery:
  driver = appendfile
  directory = /home/$local_part/.maildir/.Spam
  maildir_format
  delivery_date_add
  envelope_to_add
  return_path_add</code></p>
<p>이렇게 하면 자신의 홈 디렉토리의 .maildir 아래 .Spam 이란 디렉토리를 만들고, 그 디렉토리에 스팸 메일을 저장하게 된다. IMAP 으로 접속하면 Spam 메일들을 확인할 수 있기 때문에 이렇게 했는데, POP3 만 사용하는 거라면 그냥 제목에 [Spam] prefix 를 붙이게 하는 것도 나쁘지 않을 듯&#8230;</p>
<p>그 다음엔 이 transport 를 이용하는 router! 역시나 어디다 위치시킬지 잘 생각해야 한다. 나같은 경우엔 bogofilter router 바로 아래에 이걸 위치시켜놓았다.</p>
<p><code>removingspam:
  driver = accept
  check_local_user
  condition = ${if match {$h_X-Bogosity:} {Spam, tests=bogofilter} {1}{0}}
  transport = spam_delivery</code></p>
<p>스팸 메일은 bogofilter 에 의해 X-Bogosity: Spam, test=bogofilter &#8230; 식의 헤더가 추가되기 때문에 이렇게 할 경우 스팸을 쉽게 분류해낼 수 있다.</p>
<p>잘 됐는지 확인은 메일로그를 이용해서 확인하면 된다. 나같은 경우는 metalog 를 사용하니 /var/log/mail/current 를 이용해서 확인해야 했는데 대부분의 경우 syslogd 를 사용할테니 /var/log/message 를 확인하면 될 것 같다.</p>
<blockquote><p>$ # tail -f /var/log/mail/current |grep R=<br />
Feb 26 16:48:31 [exim] 2008-02-26 16:48:31 1JRkT5-0001pz-Nx => 메일주소 R=procmail T=procmail<br />
Feb 26 16:48:35 [exim] 2008-02-26 16:48:35 1JTuY0-00081q-7u => 메일주소 R=removingspam T=spam_delivery<br />
Feb 26 16:48:44 [exim] 2008-02-26 16:48:44 1JQWAs-0002po-CR => 메일주소 R=bogofilter T=bogofilter<br />
Feb 26 16:48:45 [exim] 2008-02-26 16:48:45 1JTuY5-000826-EK => 메일주소 R=removingspam T=spam_delivery
</p></blockquote>
<p>유심해서 봐야할건 R=, T= 다음에 나오는 것들이다. R= 다음에 나오는 것은 사용된 router 를 의미하고, T= 다음에 나오는건 transport 를 의미한다. 위의 로그를 보면 bogofilter 를 수행한 뒤 removingspam router 를 이용해서 spam_delivery trasport 가 수행되기도 하고 혹은 이를 통과해서 procmail transport 가 수행되기도 하는 걸 확인할 수 있다.</p>
<p>기본으로는 procmail transport 가 없으니 원랜 local_delivery 가 나올 수도 있겠고 뭐 하여튼 router 나 transport 이름은 사용자가 맘대로 지으면 되는거라 상황에 따라 다 다를 듯&#8230;</p>
<p>스팸 없는 세상이 올 때까지 ㅠ.ㅠ 오늘도 삽질&#8230;</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F628&rdate=2008-02-26+16%3A53%3A09&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F628&rdate=2008-02-26+16%3A53%3A09&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/11/2006 -- <a href="http://b.mytears.org/2006/09/404" title="bogofilter">bogofilter (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/02/628/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS 삽질 후기: 잘못된 정보여 안녕!</title>
		<link>http://b.mytears.org/2008/02/627</link>
		<comments>http://b.mytears.org/2008/02/627#comments</comments>
		<pubDate>Sun, 17 Feb 2008 19:19:31 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[chcon]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[manage]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[structure]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wrong documents]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/02/627</guid>
		<description><![CDATA[<p>얼마 전에 아는 형 부탁으로 또 하나의 서버를 살펴봐주게 되었다. 장기적으로 할건 아니고 단발성으로 잠깐 봐주게 될 일이었는데&#8230;</p>
<p>여기 설치되어 있던 리눅스는 Fedora core2! 아는 사람은 다 알다시피 Fedora core2 는  업데이트 지원이 끊긴지 이미 오래된 배포판이다. 하여튼 알려진 버그들로 무장된 상태를 유지하는건 알바로써의 자세가 아니기 때문에 최신 버젼으로의 업데이트를 시도해봤지만 core2->8 으로의 업데이트는 실패!! ...</p>
<p><a href='http://b.mytears.org/2008/02/627'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>9/4/2006 -- <a href="http://b.mytears.org/2006/09/399" title="워드프레스를 https 와 함께 이용하는 방법!">워드프레스를 https 와 함께 이용하는 방법! (0)</a></li><li>8/13/2005 -- <a href="http://b.mytears.org/2005/08/227" title="php: mytrz-dviewer">php: mytrz-dviewer (36)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F627&rdate=2008-02-18+04%3A19%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F627&rdate=2008-02-18+04%3A19%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>얼마 전에 아는 형 부탁으로 또 하나의 서버를 살펴봐주게 되었다. 장기적으로 할건 아니고 단발성으로 잠깐 봐주게 될 일이었는데&#8230;</p>
<p>여기 설치되어 있던 리눅스는 Fedora core2! 아는 사람은 다 알다시피 Fedora core2 는  업데이트 지원이 끊긴지 이미 오래된 배포판이다. 하여튼 알려진 버그들로 무장된 상태를 유지하는건 알바로써의 자세가 아니기 때문에 최신 버젼으로의 업데이트를 시도해봤지만 core2->8 으로의 업데이트는 실패!! (core8 의 redhat-release를 설치한 뒤 yum upgrade 를 시도해봤지만 패키지 의존성이 해결되질 않는다. 7, 6, 5 도 마찬가지) </p>
<p>차례로 순서를 밟아가야 겠다는 생각이 들어서 3, 4, 5 순서로 시도를 해봤는데 8 까지 제대로 업데이트가 되지도 않았을 뿐더러 reboot 이 제대로 되지 않아 버렸다. 하하하하하하 (사고 쳤단 얘기) apache, mysql 등이 /usr/local/apache, /usr/local/mysql 등의 prefix 에 설치되어 있었고, init script 조차 제대로 없는 그런 암울한 상황이었는데 마침 잘됐다는 생각으로 CD 와 함께 IDC 에 방문했다. fedora 는 업데이트 주기가 너무 짧고, 내가 관리해야할 서버가 아닌 마당에 젠투를 깔아주는건 옳지 못하단 생각이 들었으며, 우분투 등을 깔아주기엔 내가 너무 무지했다. 결국 선택한건 CentOS 5.1!</p>
<p>불행히도 DVD rom 이 없었기 때문에 가져갔던 CentOS 5.1 dvd 는 사용할 수가 없었고, 혹시 몰라 구워갔던 CentOS 5.1 net install cd 를 사용해야 했다. 설치야 예전 레드햇 계열들과 별로 다르지 않으니 어렵지 않게 끝~</p>
<p>하지만 이게 왠 일! /home 계정 밑에 있는 파일들을 아파치에서 읽질 못한다! 혹시나 해서 apache 유져의 쉘을 /bin/bash 로 바꿔주고 apache 유져로 스위치한 뒤 파일들을 읽어보니 잘 읽어온다. -_-; 헉; 이젠 리눅스마저 날 농락하려 드는건가 싶은 마음이&#8230; ㅠ.ㅠ 정확히 뭐가 문젠지도 몰라서 검색어조차 찾을 수 없던 이 시점! selinux 라는 요상 야릇한 단어가 눈에 들어왔다. 하여튼! 검색을 통해 찾아낸 아래와 같은 명령어를 통해 이 문제를 해결할 수 있다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p627code34'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p62734"><td class="code" id="p627code34"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>home
<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*</span>;<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$x</span><span style="color: #000000; font-weight: bold;">/</span>public_html <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
    chcon <span style="color: #660033;">-R</span> <span style="color: #660033;">-t</span> httpd_user_content_t <span style="color: #007800;">$x</span><span style="color: #000000; font-weight: bold;">/</span>public_html
  <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
chcon <span style="color: #660033;">-R</span> <span style="color: #660033;">-t</span> httpd_user_content_t <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>skel<span style="color: #000000; font-weight: bold;">/</span>public_html</pre></td></tr></table></div>

<p>acl 을 사용하는건지 아님 뭔가 다른 방법을 사용해서 저런 secure context 를 저장하는 건지 까지는 모르겠지만 하여튼 강화된 보안 정책 덕에 초보 리눅서만 고생했다. ㅠ.ㅠ 그나저나 하고 싶었던 얘기는 내가 천재라 저런 문제를 해결했다는게 아니고, 웹에 잘못된 문서가 너무 많다는 것!</p>
<p>저 문제를 해결하기 위해 CentOS apache home 403 등으로 검색했을 경우 상위 랭크로 나오는 페이지들은 대부분 아파치 소스를 가져다 빌드해서 저 에러를 피해가는 요상한 방법이다. 그나마 거기에 설명된 설치 법에는 CFLAGS 등을 설정하지도 않고, 무슨 의미인지도 모르는 옵션들로 가득차 있으며 그나마 효율적이지도 않다.</p>
<p>linux 는 배포판 별로 파일 레이아웃에 대한 정책이 있다. 약간씩은 다르지만</p>
<blockquote><p>
/usr &#8211; 실행파일, 라이브러리, man 페이지, 문서 등이 놓여짐<br />
/etc &#8211; 설정파일이 놓여짐<br />
/var &#8211; 런타임에 생성되는 데이타가 놓여짐 (로그, 데이타베이스 파일, 메일 파일 등등)<br />
/tmp &#8211; 임시파일 저장장소
</p></blockquote>
<p>대강 위와 같은 정책을 사용하며 약간 부연하자면 /usr 과 / 에 대해 아래와 같은 디렉토리 구조가 더 사용된다.</p>
<blockquote><p>
/bin 실행파일<br />
/sbin 관리자한테만 필요한 실행파일<br />
/lib 프로그램이 실행될 때 사용하는 쉐어드 라이브러리등이 존재
</p></blockquote>
<p>이런 얘기를 왜 하냐면 배포판에서 제공하는 패키지를 사용할 경우 위의 정책대로 파일들이 놓여지며 설정파일을 찾기 위해선 /etc 밑을 뒤지면 되고, 실행은 /usr/local/apache/bin/apachectl start 와 같이 해야 하는게 아니라 apachectl start 와 같이 하면 된다. </p>
<p>그냥 소스를 가져다가 ./configure &#8211;prefix=/usr/local/apache 와 같이 설치할 경우 PATH 가 걸려있지 않아서 실행 파일의 full path 를 적어줘야 하는 불편함 외에도 man page 가 놓여있는 경로가 MANPATH 에 등록되질 않기 때문에 명령어 들의 man 페이지를 확인해볼 수도 없다. (사실 저렇게 설치하는 유져가 man 페이지를 참고할 거란 생각은 별로 들지 않지만) 거기다가 init 스크립트를 제공하지 않는 프로그램들도 많아서 프로그램의 실행 종료를 수동으로 해야하는 불편도 생긴다.</p>
<p>간단한 예로 mysql 을 패키지로 설치한 것과 소스로 /usr/local/mysql 에 설치한 것을 비교해보자.</p>
<table>
<tr>
<th></th>
<th>소스</th>
<th>패키지</th>
</tr>
<tr>
<th>실행</th>
<td>/usr/local/mysql/bin/mysql</td>
<td>mysql</td>
</tr>
<tr>
<th>man page</th>
<td>사용불가능</td>
<td>사용가능</td>
</tr>
<tr>
<th>데몬 시작</th>
<td>/usr/local/mysql/bin/mysqld_safe &#038;</td>
<td>/etc/init.d/mysqld start</td>
</tr>
<tr>
<th>데몬 종료</th>
<td>ps ax|grep mysql 후 kill 해당pid</td>
<td>/etc/init.d/mysqld stop</td>
</tr>
<tr>
<th>자동 실행</th>
<td>/etc/rc.local 에 /usr/local/mysql/mysqld_safe &#038; 추가</td>
<td>ntsysv 에서 mysql 체크</td>
</tr>
<tr>
<th>파일 변조 확인</th>
<td>불가능</td>
<td>rpm -Va mysql</td>
</tr>
<tr>
<th>제거</th>
<td>rm -rf /usr/local/mysql</td>
<td>rpm -e mysql</td>
</tr>
<tr>
<th>업데이트 체크</th>
<td>수동</td>
<td>yum check-update mysql</td>
</tr>
<tr>
<th>파일 리스트</th>
<td>find /usr/local/mysql</td>
<td>rpm -ql mysql</td>
</tr>
</table>
<p>이걸로 끝이 아니다. 만약 openssl 이 업데이트 되면서 소스로 가져다 설치한 mysql 이 실행되는데 필요한 libcrypto.so.4 란 파일이 제거되었다고 해보자. rpm 등을 사용하면 dependency check 과정이 있으므로 이런 황당 무계한 일이 벌어지지 않는다. 하지만 소스로 설치했다면 저 라이브러리를 찾을 수 없다는 에러를 만날 수밖에 없다.</p>
<p>그리고 실행파일 경로(PATH)나 man page 경로(MANPATH) 같은 건 ~/.bash_profile 이나 /etc/bashrc /etc/profile.d 등을 수정해주면 쉽게 등록해 줄 수 있다. 하지만 이런 것까지 설명하고 있는 문서는 본 적이 별로 없는 것 같다. (물론 이렇게 설치하는 유져가 man 페이지를 확인할 거란 생각은 하지 않는다.)</p>
<p>우선 패키지 관리자를 사용하면 업데이트가 나왔는지를 확인하는 작업과 업데이트를 수행하는 일이 아주 간단해진다. 또한 프로그램의 설치/제거 가 같은 인터페이스를 통해 이뤄지고, 데몬의 실행/종료도 비슷한 인터페이스를 통해 이뤄진다.</p>
<p>대부분의 데몬들은 /etc/init.d/데몬이름 start|stop 와 같이 시작/종료를 할 수 있으므로 뭔가를 새로 설치했을 때 어떤 식으로 실행해야할지, 어떤 식으로 종료시켜야할지 고민할 필요가 없다. 게다가 ntsysv 를 통해 gui 로 시동 스크립트들을 관리할 수도 있게 되고&#8230;</p>
<p>뭐 하튼 예전부터 주장하고 있는 바지만 괜히 a.p.m 을 구축하기 위해 이미 다 설치되어 있는 apache, php, mysql 등을 제거하고 libjpeg, libungif, libgd 등을 줏어다가 하나하나 빌드하는 방법을 설명한 문서는 다 사라졌음 좋겠다. </p>
<p>jpeg 헤더가 필요하면 yum install libjpeg-devel 을 설치하면 된다. gif 헤더는? yum install libungif-devel, gd 는 yum install gd-devel &#8230;</p>
<p>다들 삽질로 부터 해방되는 그 날까지! 꺄아악</p>
<p>p.s) 졸려서 날림 마무리</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F627&rdate=2008-02-18+04%3A19%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F627&rdate=2008-02-18+04%3A19%3A31&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>9/4/2006 -- <a href="http://b.mytears.org/2006/09/399" title="워드프레스를 https 와 함께 이용하는 방법!">워드프레스를 https 와 함께 이용하는 방법! (0)</a></li><li>8/13/2005 -- <a href="http://b.mytears.org/2005/08/227" title="php: mytrz-dviewer">php: mytrz-dviewer (36)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/02/627/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>요 며칠 삽질기 -_-! with Exim</title>
		<link>http://b.mytears.org/2008/02/626</link>
		<comments>http://b.mytears.org/2008/02/626#comments</comments>
		<pubDate>Sun, 17 Feb 2008 18:36:04 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[forward]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[spam filter]]></category>
		<category><![CDATA[spf]]></category>
		<category><![CDATA[srs]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/02/626</guid>
		<description><![CDATA[<p>어째 요새 관리해야할 서버가 늘어버렸네요. (전 언픽스 하나로 족한데 ㅠ.ㅠ) 하여튼!! 요 며칠 사이 gentoo + exim + procmail + spf + srs + clamav + bogofilter + dovecot 를 시도해봤습니다. </p>
<p>사실 계속 제가 맡아서 할 게 아니라 길어야 일 년 정도 만져줄 서버기 때문에 젠투가 아닌 다른 배포판을 생각했었는데, spf 와 srs 를 지원할 ...</p>
<p><a href='http://b.mytears.org/2008/02/626'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>4/9/2009 -- <a href="http://b.mytears.org/2009/04/1923" title="Gentoo: /etc/pam.d/smtp 와 exim, mailbase">Gentoo: /etc/pam.d/smtp 와 exim, mailbase (0)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F626&rdate=2008-02-18+03%3A36%3A04&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F626&rdate=2008-02-18+03%3A36%3A04&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>어째 요새 관리해야할 서버가 늘어버렸네요. (전 언픽스 하나로 족한데 ㅠ.ㅠ) 하여튼!! 요 며칠 사이 gentoo + exim + procmail + spf + srs + clamav + bogofilter + dovecot 를 시도해봤습니다. </p>
<p>사실 계속 제가 맡아서 할 게 아니라 길어야 일 년 정도 만져줄 서버기 때문에 젠투가 아닌 다른 배포판을 생각했었는데, spf 와 srs 를 지원할 수 있도록 하면서 기본으로 제공되는 패키지를 이용할 수 있는 조합이 몇 가지 되질 않더군요. exim 에서 spf 와 srs 는 experimental 로 되어 있기 때문에 바이너리 배포판에선 기본으로 적용이 되어 있질 않고, postfix + milter 조합에서는 srs 를 제공할 수 없기 때문에 남은 선택은 sendmail + milter 조합 밖에 없는데 sendmail 을 사용하기는 싫었거든요.</p>
<p>하여튼! exim 에 procmail 을 붙이는 방법은 아래와 같습니다.</p>
<p><code>procmail:
  driver = accept
  transport = procmail
  domains = +local_domains
  check_local_user
  # emulate OR with "if exists"-expansion
  require_files = /usr/bin/procmail
  no_verify
  no_expn</code></p>
<p>router 파트의 localuser: 룰 앞에 위와 같은 코드를 추가하고</p>
<p><code>procmail:
  driver = pipe
  path = "/bin:/usr/bin:/usr/local/bin"
  command = "/usr/bin/procmail"
  return_path_add
  delivery_date_add
  envelope_to_add</code></p>
<p>transpotes 에 router 에서 정의한 procmail transpote 를 정의해 주면 되죠. procmail 을 이용한 스팸 필터야 예전부터 잘 사용해오던 게 있으니 그걸 사용하면 됐구요.</p>
<p>그 다음은 smtp 설정!! 기본으로 /etc/exim/auth_conf.sub 란 파일이 있길래 그냥 자동으로 smtp 인증 설정이 되어있는줄 알았는데 smtp 인증을 사용하려면 저 안에 있는 내용을 /etc/exim/exim.conf 에 추가해줘야합니다.</p>
<p><code>plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "${if pam{$2:$3}{1}{0}}"
&nbsp;
login:
  driver = plaintext
  public_name = LOGIN
  server_prompts = "Username:: : Password::"
  server_condition = "${if pam{$1:${sg{$2}{:}{::}}}{1}{0}}"

</code></p>
<p>그 내용은 위와 같았구요. 하지만 여기서 또 문제가 발생! 예전 시스템이 오래 전에 설치된 것이었는지 비밀번호 암호화를 md5 로 사용하질 않고 있었는데, /etc/pam.d/system-auth 에서 md5 를 제거함으로써 다른 데몬들에선 문제가 해결됐지만 exim 의 stmp 에서만 인증 실패가 나오는겁니다. -_-! </p>
<p>참고로 smtp auth 가 어떤 과정으로 이뤄지는지는 아래 인용된 내용을 참고하세요. 테스트할 때 알아두면 편합니다.</p>
<blockquote><p>$ telnet localhost 25<br />
EHLO localhost<br />
AUTH LOGIN<br />
base64로인코딩한아이디<br />
base64로인코딩한비밀번호</p></blockquote>
<p>여담이지만 smtps 나 pop3, imaps 를 꼭 사용하세요. 위에서 처럼 비밀번호가 그냥 넘어갑니다. 패킷이 악의적인 라우터를 지날 경우 아이디/비밀번호가 줄줄 셀 수 있습니다.</p>
<p>하여튼 비굴하게 saslauthd 를 사용해서 우회시켜봤지만 요놈도 마찬가지로 인증 실패 -_-! 아예 다 안되면 모르겠는데 우리 사랑스런 dovecot 은 로그인이 아주! 잘 됩니다. exim 만 나쁜 놈이란 거죠.</p>
<p>saslauthd 라거나 pwcheck 같이 다른 곳에서 잘 사용도 안되는 데몬을 띄우는 게 좀 꺼림찍했는데 잘됐다 싶어서 dovecot-auth 를 활용해봤습니다. dovecot-auth 를 활용하려면 아래와 같이 dovecot.conf 파일을 수정해줘야 합니다.</p>
<p><code>auth default {
  mechanisms = plain login
  passdb pam {
    args = "*"
  }
  userdb passwd {
  }
  user = root
&nbsp;
  socket listen {
    client {
      path = /var/run/dovecot/auth-client
      mode = 0666
    }
  }
}

</code></p>
<p>그리고 위에 써있는 auth-client 소켓을 이용해서 로그인하도록 exim.conf 를 고쳐줍시다.</p>
<p><code>login:
  driver = dovecot
  public_name = LOGIN
  server_socket = /var/run/dovecot/auth-client</code></p>
<p>이제 끝!! 드디어 smtp 인증이 정상적으로 되기 시작합니다. 휴;;</p>
<p>뭐 대강 다 됐는데, 한 가지 아쉬운 점이라면 .forward 나 alias 를 이용할 경우 procmail 을 거치지 않기 떄문에 스팸 필터링이 안되는 것 정도? 이건 어떻게 해야할 지 별로 답이 안나오네요. </p>
<p>그렇다고 bogofilter, clamav 등이 다 procmail 에서 호출되는데 이걸 spamassassin + clamd 조합으로 새로 설정하긴 완전 귀찮고 (사실 어떻게 하는지도 모르고) 약간 쀍입니다.</p>
<p>그 외에 mailman 과 관련된 삽질이 조금 더 있었고, seliunx 가 적용되어 있는 CentOS 랑 관련된 것도 있었는데 또 언제 시간날 때 관련된 것들을 포스팅해봐야겠습니다.</p>
<p>사실 요새 포스팅 하고 싶은 내용은 많은데 내용이 길어져서 귀차니즘이 발동해버렸네요.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F626&rdate=2008-02-18+03%3A36%3A04&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F626&rdate=2008-02-18+03%3A36%3A04&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>4/9/2009 -- <a href="http://b.mytears.org/2009/04/1923" title="Gentoo: /etc/pam.d/smtp 와 exim, mailbase">Gentoo: /etc/pam.d/smtp 와 exim, mailbase (0)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/02/626/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>exim 에 spf, srs 적용하기</title>
		<link>http://b.mytears.org/2008/02/625</link>
		<comments>http://b.mytears.org/2008/02/625#comments</comments>
		<pubDate>Sat, 16 Feb 2008 07:34:30 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[sender policy framework]]></category>
		<category><![CDATA[sender rewrite scheme]]></category>
		<category><![CDATA[spam filter]]></category>
		<category><![CDATA[spf]]></category>
		<category><![CDATA[srs]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/02/625</guid>
		<description><![CDATA[<p>unfix 서버를 구축할 땐 postfix 를 사용했지만 postfix 에선 srs 를 사용할 수가 없었기 때문에 새로 설치하게 된 서버들에선 exim 을 시도 중이다.</p>
<p>그런데 exim 을 사용하려고 하니 문제가 하나 있는데, 구글에서 검색을 해도 원하는 결과가 잘 나오질 않는다는 점이 바로 그것! exim 에는 spf 와 srs 등을 사용하기 위해서는 따로 패치가 필요 없이 그저 EXPERIMENTAL_SPF=yes ...</p>
<p><a href='http://b.mytears.org/2008/02/625'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>11/26/2007 -- <a href="http://b.mytears.org/2007/11/619" title="Sender Rewrite Scheme">Sender Rewrite Scheme (0)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F625&rdate=2008-02-16+16%3A34%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F625&rdate=2008-02-16+16%3A34%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>unfix 서버를 구축할 땐 postfix 를 사용했지만 postfix 에선 srs 를 사용할 수가 없었기 때문에 새로 설치하게 된 서버들에선 exim 을 시도 중이다.</p>
<p>그런데 exim 을 사용하려고 하니 문제가 하나 있는데, 구글에서 검색을 해도 원하는 결과가 잘 나오질 않는다는 점이 바로 그것! exim 에는 spf 와 srs 등을 사용하기 위해서는 따로 패치가 필요 없이 그저 EXPERIMENTAL_SPF=yes EXPERIMENTAL_SRS=yes 이 두 가지 환경변수를 세팅한 채로 빌드를 진행하면  된다.</p>
<p>그 이후 어떻게 해야하는 지에 대한 설명이 없어서 한참 헤맸는데 exim 과 함께 설치되는 문서를 확인해야하는 것이었다. -_-; 보면 domain key 등도 위에서와 같이 환경변수만 세팅해주면 사용이 가능해진다.</p>
<p>doc/exim-4.68/experimental-spec.txt.bz2</p>
<p>문서를 확인해보니 이제 해야할 일은 spf 와 srs 설정을 추가해주는 것 뿐 후훗!</p>
<p>SPF 는 global 섹션에서 acl_smtp_rcpt 로 등록되어 있는 것에 다음과 같은 설정을 넣어주면 된다.</p>
<p><code># Query the SPF information for the sender address domain, if any,
  # to see if the sending host is authorized to deliver its mail.
  # If not, reject the mail.
  #
  deny
    message     = [SPF] $sender_host_address is not allowed to send mail \
                  from $sender_address_domain
    log_message = SPF check failed.
    spf         = fail
&nbsp;
  # Add a SPF-Received: header to the message
  warn
    message     = $spf_received</code></p>
<p>젠투에선 acl_smtp_rcpt = acl_check_rcpt 와 같이 되어 있기 떄문에 acl_check_rcpt 에 위와같은 설정을 추가해줬다. 만약 아래 warn message = $spf_received 를 넣어주지 않으면 spf 결과를 헤더에 추가해주지 않게된다. 생색을 내기 위해선 뭔가 출력될 필요가 있으므로 -_-! 난 헤더를 추가하도록 설정해줬다.</p>
<p>하지만 위에 대로만 할 경우 내가 메일을 보낼 경우에도 SPF-Received 헤더가 붙는 문제가 생긴다. smtp auth 를 설정해놓은 상황에서 이 서버를 통해 메일을 보낼려면 인증이 되어있어야 할테니 아래와 같이 수정해서 이런 문제를 피해주자.</p>
<p><code>
  # Add a SPF-Received: header to the message
  warn
    message     = $spf_received
    !authenticated = *</code></p>
<p>그리고 그 담은 SRS 복잡하게 하려면 복잡하겠지만 다 귀찮아서 hash 용 secretkey 하나만 넣어서 설정해버렸다. 아래 설정은 global 섹션에 들어가면 된다. (domainlist 같은게 들어가는 곳) 실제로 somesecretkey 를 적어주는건아니고 그냥 원하는 단어 하나를 적어주면 된다.</p>
<p><code>srs_config = somesecretkey</code></p>
<p>그 다음엔 userforward 트랜스포트에 srs 를 적용하도록 해주자 srs = forward 만이 내가 추가해준 부분;;</p>
<p><code>userforward:
  driver = redirect
  srs = forward
  check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
  file = $home/.forward
# allow_filter
  no_verify
  no_expn
  check_ancestor
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply</code></p>
<p>이제 끝!!!</p>
<p>얼마 받지도 못하는 웍스테이션 조굔지 뭔지 때문에 지난 며칠간 고생한걸 생각하면 흑흑 ㅠ.ㅠ</p>
<p>p.s) exim 에 spf 적용하기와 관련해서 따라하기 편한 문서가 있는데 페이지 랭크가 낮은거 같아서 링크</p>
<p><a href='http://slett.net/spam-filtering-for-mx/exim-spf.html'>http://slett.net/spam-fil...ring-for-mx/exim-spf.html</a></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F625&rdate=2008-02-16+16%3A34%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F02%2F625&rdate=2008-02-16+16%3A34%3A30&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>11/26/2007 -- <a href="http://b.mytears.org/2007/11/619" title="Sender Rewrite Scheme">Sender Rewrite Scheme (0)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/629" title="spam filtering with transport/router of exim">spam filtering with transport/router of exim (0)</a></li><li>2/26/2008 -- <a href="http://b.mytears.org/2008/02/628" title="exim 의 transport, router 를 이용한 스팸 필터링">exim 의 transport, router 를 이용한 스팸 필터링 (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/02/625/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>problem in fastcgi with apache</title>
		<link>http://b.mytears.org/2008/01/623</link>
		<comments>http://b.mytears.org/2008/01/623#comments</comments>
		<pubDate>Thu, 31 Jan 2008 04:46:34 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Unfix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[mod_fcgid]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2008/01/623</guid>
		<description><![CDATA[<p>현재 unfix 서버에는 apache + mod_fcgid 환경에서 fastcgi 를 지원하고 있다. 그런데 fastcgi 를 적용시킨 후 가끔 apache 가 먹통이 되는 현상이 생겨버렸다.</p>
<p>대부분의 apache 프로세스가 D state 를 가지게 되면서 더 이상 프로세스를 만들어내지 못하게 되서 요청을 처리하지 못하게 되는 것 같은데, D state 는 Uninterruptible sleep 을 의미하므로 fastcgi 프로세스에서 interrupt 를 disable 시킨채로 ...</p>
<p><a href='http://b.mytears.org/2008/01/623'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/2/2007 -- <a href="http://b.mytears.org/2007/01/477" title="아파치 안전 장치&#8230;">아파치 안전 장치&#8230; (1)</a></li><li>10/19/2006 -- <a href="http://b.mytears.org/2006/10/442" title="새 백업 스크립트&#8230;">새 백업 스크립트&#8230; (1)</a></li><li>4/23/2006 -- <a href="http://b.mytears.org/2006/04/345" title="backup script 도 작성 완료 -_-v">backup script 도 작성 완료 -_-v (2)</a></li><li>8/26/2006 -- <a href="http://b.mytears.org/2006/08/379" title="ErrorDocument 수정">ErrorDocument 수정 (0)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F01%2F623&rdate=2008-01-31+13%3A46%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F01%2F623&rdate=2008-01-31+13%3A46%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>현재 unfix 서버에는 apache + mod_fcgid 환경에서 fastcgi 를 지원하고 있다. 그런데 fastcgi 를 적용시킨 후 가끔 apache 가 먹통이 되는 현상이 생겨버렸다.</p>
<p>대부분의 apache 프로세스가 D state 를 가지게 되면서 더 이상 프로세스를 만들어내지 못하게 되서 요청을 처리하지 못하게 되는 것 같은데, D state 는 Uninterruptible sleep 을 의미하므로 fastcgi 프로세스에서 interrupt 를 disable 시킨채로 sleep 상태에 들어가서 이런 문제가 생기는 것으로 보인다.</p>
<p>그렇다고 하루종일 아파치가 정상적으로 동작하고 있나를 확인할 수는 없기에 스크립트를 하나 작성해봤다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p623code36'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p62336"><td class="code" id="p623code36"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">cnt</span>=<span style="color: #000000;">0</span>;
<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-C</span> apache2 <span style="color: #660033;">-o</span> <span style="color: #c20cb9; font-weight: bold;">stat</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> D<span style="color: #000000; font-weight: bold;">`</span>;<span style="color: #000000; font-weight: bold;">do</span> 
    <span style="color: #7a0874; font-weight: bold;">let</span> cnt++;
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$cnt</span> <span style="color: #660033;">-ge</span> <span style="color: #000000;">10</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;<span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #660033;">-HUP</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>apache2.pid<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>sort 와 uniq 를 이용해서 숫자를 셀 수도 있지만 정상적인 경우에 D stat 를 가지는 프로세스가 존재하지 않으므로 for 를 이용하기로 했다. 꺄아! 과연 효과는 -_-! 두둥!</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F01%2F623&rdate=2008-01-31+13%3A46%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2008%2F01%2F623&rdate=2008-01-31+13%3A46%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/2/2007 -- <a href="http://b.mytears.org/2007/01/477" title="아파치 안전 장치&#8230;">아파치 안전 장치&#8230; (1)</a></li><li>10/19/2006 -- <a href="http://b.mytears.org/2006/10/442" title="새 백업 스크립트&#8230;">새 백업 스크립트&#8230; (1)</a></li><li>4/23/2006 -- <a href="http://b.mytears.org/2006/04/345" title="backup script 도 작성 완료 -_-v">backup script 도 작성 완료 -_-v (2)</a></li><li>8/26/2006 -- <a href="http://b.mytears.org/2006/08/379" title="ErrorDocument 수정">ErrorDocument 수정 (0)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2008/01/623/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sender Rewrite Scheme</title>
		<link>http://b.mytears.org/2007/11/619</link>
		<comments>http://b.mytears.org/2007/11/619#comments</comments>
		<pubDate>Mon, 26 Nov 2007 01:47:01 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[Unfix]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[forward]]></category>
		<category><![CDATA[sender policy framework]]></category>
		<category><![CDATA[sender rewriting scheme]]></category>
		<category><![CDATA[spam filter]]></category>
		<category><![CDATA[spf]]></category>
		<category><![CDATA[srs]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/11/619</guid>
		<description><![CDATA[<p>spf 는 예전에 써놨던 글에서 충분히 설명해놨듯이 메일의 도메인값과 발송지 값을 이용해 스팸을 필터링해내기 위한 기술입니다. 예를 들어 From address 에 nospam@mytears.org 가 있을 경우 mytears.org 도메인의 txt 정보를 읽어오고, 거기에 적혀있는 61.109.245.78 에서 온 메일만을 정상적인 메일로 판단하게 되는데, 이렇게 spf 가 적용되어 있는 경우 .forward 나 alias 등을 이용해서 메일을 포워딩 시킬 경우 ...</p>
<p><a href='http://b.mytears.org/2007/11/619'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/24/2006 -- <a href="http://b.mytears.org/2006/09/422" title="postfix 에서 spf 사용하기">postfix 에서 spf 사용하기 (0)</a></li><li>7/31/2005 -- <a href="http://b.mytears.org/2005/07/226" title="Sender Policy Framework">Sender Policy Framework (6)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F619&rdate=2007-11-26+10%3A47%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F619&rdate=2007-11-26+10%3A47%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>spf 는 <a href='/http://b.mytears.org/2005/07/226'>예전에 써놨던 글</a>에서 충분히 설명해놨듯이 메일의 도메인값과 발송지 값을 이용해 스팸을 필터링해내기 위한 기술입니다. 예를 들어 From address 에 <a href="mailto:nospam@mytears.org">nospam@mytears.org</a> 가 있을 경우 mytears.org 도메인의 txt 정보를 읽어오고, 거기에 적혀있는 61.109.245.78 에서 온 메일만을 정상적인 메일로 판단하게 되는데, 이렇게 spf 가 적용되어 있는 경우 .forward 나 alias 등을 이용해서 메일을 포워딩 시킬 경우 문제가 있을 수 있습니다.</p>
<p>.forwards 를 통해 <a href="mailto:nospam@mytears.org">nospam@mytears.org</a> 를 <a href="mailto:nospam@gmail.com">nospam@gmail.com</a> 으로 리다이렉션을 시킨 경우를 생각해봅시다. </p>
<blockquote><ol>
<li>sender@somedomain 에서 <a href="mailto:nospam@mytears.org">nospam@mytears.org</a> 로 메일을 보냄</li>
<li>mytears 메일 서버에서 <a href="mailto:nospam@mytears.org">nospam@mytears.org</a> 사용자에 대한 .forward 파일을 읽어서 거기 적혀있는 <a href="mailto:nospam@gmail.com">nospam@gmail.com</a> 으로 메일을 포워딩 시킴</li>
<li>gmail 메일 서버에서 from address 인 somedomain 의 txt 에서 spf 정보를 읽어옴</li>
<li>spf 로 지정된 아이피와 메일을 포워딩시킨 서버의 아이피가 동일하지 않으므로 spf 정보가 맞지 않다고 판단함</li>
<li>spf 정책에 따라 다르겠지만 대부분 스팸이라고 판단하게 됨</li>
<li>결국 제대로 메일이 전해지지 않음</li>
</ol>
</blockquote>
<p>이걸 해결하기 위한 방법으로 <a href='http://www.openspf.org/SRS'>srs</a> 라는 게 있습니다. 이걸 적극적으로 적용한 예로는 구글이 있습니다. </p>
<p>exim 의 경우 기본적으로 spf, srs 를 지원하기 때문에 빌드할 때 옵션을 잘 조절해주면 쉽게 적용할 수 있습니다. sendmail 의 경우 milter 를 이용하면 srs 를 적용할 수 있구요. 하지만 postfix 에서는 이를 사용할 수 없는 방법이 없습니다. (구버젼의 postfix 라면 패치를 통해 사용할 수 있지만 이 패치가 계속 유지되질 않고 있습니다.)</p>
<p>참고<br />
spf: <a href='http://www.openspf.org/'>http://www.openspf.org/</a><br />
srs: <a href='http://www.openspf.org/SRS'>http://www.openspf.org/SRS</a></p>
<p>p.s) 그나저나 spf 가 나온지 꽤 오랜 시간이 흘렀음에도 대학 메일 서버들 중에 spf 를 지원하는 곳은 별로 없군요.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F619&rdate=2007-11-26+10%3A47%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F619&rdate=2007-11-26+10%3A47%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/18/2008 -- <a href="http://b.mytears.org/2008/02/626" title="요 며칠 삽질기 -_-! with Exim">요 며칠 삽질기 -_-! with Exim (1)</a></li><li>2/16/2008 -- <a href="http://b.mytears.org/2008/02/625" title="exim 에 spf, srs 적용하기">exim 에 spf, srs 적용하기 (0)</a></li><li>9/24/2006 -- <a href="http://b.mytears.org/2006/09/422" title="postfix 에서 spf 사용하기">postfix 에서 spf 사용하기 (0)</a></li><li>7/31/2005 -- <a href="http://b.mytears.org/2005/07/226" title="Sender Policy Framework">Sender Policy Framework (6)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/11/619/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CG: auto stitch</title>
		<link>http://b.mytears.org/2007/11/615</link>
		<comments>http://b.mytears.org/2007/11/615#comments</comments>
		<pubDate>Mon, 12 Nov 2007 19:32:27 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[mosaik]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[SIFT]]></category>
		<category><![CDATA[stitch]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/11/615</guid>
		<description><![CDATA[<p>요새 찾아보는 내용 중에 Feature Extraction / Matching 과 관련된 SIFT 라는 게 있는데, 관련해서 재밌는 페이지를 발견했다.</p>
<p>David G. Lowe 라는 캐나다 쪽 교수가 자신이 연구하는 SIFT (Scale Invariant Feature Transform: 크기변환에 영향을 받지 않는 피쳐를 뽑아내기 위한 방법) 를 이용해서 자동으로 이미지 모자이크를 수행하는 것이 바로 그것인데&#8230;</p>
<p>관심있는 분은 아래 페이지를 참고해보시길~</p>
<p>http://www.cs.ubc.ca/~mbr...utostitch/autostitch.html</p>
<p>p.s) SIFT 는 다 ...</p>
<p><a href='http://b.mytears.org/2007/11/615'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>3/5/2009 -- <a href="http://b.mytears.org/2009/03/1714" title="논문 준비 중&#8230;">논문 준비 중&#8230; (3)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>10/29/2007 -- <a href="http://b.mytears.org/2007/10/612" title="CG: gaussian blur">CG: gaussian blur (0)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F615&rdate=2007-11-13+04%3A32%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F615&rdate=2007-11-13+04%3A32%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>요새 찾아보는 내용 중에 Feature Extraction / Matching 과 관련된 SIFT 라는 게 있는데, 관련해서 재밌는 페이지를 발견했다.</p>
<p>David G. Lowe 라는 캐나다 쪽 교수가 자신이 연구하는 SIFT (Scale Invariant Feature Transform: 크기변환에 영향을 받지 않는 피쳐를 뽑아내기 위한 방법) 를 이용해서 자동으로 이미지 모자이크를 수행하는 것이 바로 그것인데&#8230;</p>
<p>관심있는 분은 아래 페이지를 참고해보시길~</p>
<p><a href='http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html'>http://www.cs.ubc.ca/~mbr...utostitch/autostitch.html</a></p>
<p>p.s) SIFT 는 다 좋은데 특허가 걸려있어서 OTL</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F615&rdate=2007-11-13+04%3A32%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F11%2F615&rdate=2007-11-13+04%3A32%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>3/5/2009 -- <a href="http://b.mytears.org/2009/03/1714" title="논문 준비 중&#8230;">논문 준비 중&#8230; (3)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>10/29/2007 -- <a href="http://b.mytears.org/2007/10/612" title="CG: gaussian blur">CG: gaussian blur (0)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/11/615/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CG: gaussian blur</title>
		<link>http://b.mytears.org/2007/10/612</link>
		<comments>http://b.mytears.org/2007/10/612#comments</comments>
		<pubDate>Mon, 29 Oct 2007 13:49:53 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[gaussian blur]]></category>
		<category><![CDATA[graphic]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/10/612</guid>
		<description><![CDATA[<p>gaussian blur 는 간단하게 아래와 같은 gaussian function 을 이미지에 convolution 해주는 것을 통해 쉽게 구현할 수 있다.</p>
<p></p>
<p>시그마값을 0, 2, 4 로 변경시켜가며 가우시안 블러를 적용해보면 아래와 같은 결과를 얻을 수 있음.</p>
<p></p>
<p>코드:</p>
<p>http://trac.unfix.net/bro...ser/snippet/gaussian_blur</p>
<p>p.s) 이걸 이용해서 구현해보려는 게 있는데, 막상 gaussian blur 와 difference of gaussian 모두 구현했지만 이상하게 관련된 실험은 손에 잡히질 않고 있다. -_-; 아악;;</p>
<p> ...</p>
<p><a href='http://b.mytears.org/2007/10/612'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F612&rdate=2007-10-29+22%3A49%3A53&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F612&rdate=2007-10-29+22%3A49%3A53&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>gaussian blur 는 간단하게 아래와 같은 gaussian function 을 이미지에 convolution 해주는 것을 통해 쉽게 구현할 수 있다.</p>
<p><img src='/wp-content/upload/gaussian_func.png' /></p>
<p>시그마값을 0, 2, 4 로 변경시켜가며 가우시안 블러를 적용해보면 아래와 같은 결과를 얻을 수 있음.</p>
<p><img src='/wp-content/upload/gaussian_blur_result.png' /></p>
<p>코드:</p>
<p><a href='http://trac.unfix.net/browser/snippet/gaussian_blur'>http://trac.unfix.net/bro...ser/snippet/gaussian_blur</a></p>
<p>p.s) 이걸 이용해서 구현해보려는 게 있는데, 막상 gaussian blur 와 difference of gaussian 모두 구현했지만 이상하게 관련된 실험은 손에 잡히질 않고 있다. -_-; 아악;;</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F612&rdate=2007-10-29+22%3A49%3A53&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F612&rdate=2007-10-29+22%3A49%3A53&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/10/612/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>웹기반 수식 입력기</title>
		<link>http://b.mytears.org/2007/10/611</link>
		<comments>http://b.mytears.org/2007/10/611#comments</comments>
		<pubDate>Thu, 25 Oct 2007 16:24:13 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[equation]]></category>
		<category><![CDATA[java script]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[SITMO]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/10/611</guid>
		<description><![CDATA[<p>요 근래 외계어 수식들로 블로그를 알아볼 수 없게 만들곤 했었는데, 그런 수식을 쉽게 만들어낼 수 있는 웹기반 무료 에디터를 하나 소개해보려 합니다.</p>
<p>SITMO 가 바로 이 녀석이고, 아래와 같이 자신의 홈페이지에 STIMO 를 삽입하는 것도 가능합니다.</p>
<p></p>
<p>DHTML 입력기이기 때문에 클릭을 통해 수식을 만들어내는 것도 가능합니다만 단축 아이콘으로 등록되어 있지 않은 수식들은 직접 손으로 타이핑해야 합니다.</p>
<p></p>
<p>?View Code LATEX\begin ...</p>
<p><a href='http://b.mytears.org/2007/10/611'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>8/26/2006 -- <a href="http://b.mytears.org/2006/08/379" title="ErrorDocument 수정">ErrorDocument 수정 (0)</a></li><li>3/7/2005 -- <a href="http://b.mytears.org/2005/03/136" title="웹서비스와 utf-8">웹서비스와 utf-8 (1)</a></li><li>6/18/2010 -- <a href="http://b.mytears.org/2010/06/2237" title="HTML5 웹을 넘어 플랫폼으로&#8230;">HTML5 웹을 넘어 플랫폼으로&#8230; (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F611&rdate=2007-10-26+01%3A24%3A13&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F611&rdate=2007-10-26+01%3A24%3A13&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>요 근래 외계어 수식들로 블로그를 알아볼 수 없게 만들곤 했었는데, 그런 수식을 쉽게 만들어낼 수 있는 웹기반 무료 에디터를 하나 소개해보려 합니다.</p>
<p><a href='http://www.sitmo.com/latex/'>SITMO</a> 가 바로 이 녀석이고, 아래와 같이 자신의 홈페이지에 STIMO 를 삽입하는 것도 가능합니다.</p>
<p><script src="http://gmodules.com/ig/ifr?url=http://www.sitmo.com/gg/latex/latex.xml&amp;up_eq=&amp;synd=open&amp;w=650&amp;h=400&amp;title=Equation+Editor&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script></p>
<p>DHTML 입력기이기 때문에 클릭을 통해 수식을 만들어내는 것도 가능합니다만 단축 아이콘으로 등록되어 있지 않은 수식들은 직접 손으로 타이핑해야 합니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p611code38'); return false;">View Code</a> LATEX</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p61138"><td class="code" id="p611code38"><pre class="latex" style="font-family:monospace;"><span style="color: #C00000; font-weight: normal;">\begin</span> <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">bmatrix</span><span style="color: #0000D0; ">}</span> a <span style="color: #0000D0; ">&amp;</span> b <span style="color: #0000D0; ">&amp;</span> c <span style="color: #0000D0; ">\\</span> d <span style="color: #0000D0; ">&amp;</span> e <span style="color: #0000D0; ">&amp;</span> f <span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">bmatrix</span></span><span style="color: #0000D0; ">}</span></pre></td></tr></table></div>

<p>위와 같이 간단한 형식으로 쉽게 매트릭스를 그릴 수도 있습니다. latex 의 수식 문법을 잘 모르신다면 아래 페이지를 참고하심 될 것 같습니다.</p>
<p><a href='http://www.artofproblemsolving.com/LaTeX/AoPS_L_GuideCommands.php'>http://www.artofproblemso.../AoPS_L_GuideCommands.php</a></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F611&rdate=2007-10-26+01%3A24%3A13&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F611&rdate=2007-10-26+01%3A24%3A13&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>8/26/2006 -- <a href="http://b.mytears.org/2006/08/379" title="ErrorDocument 수정">ErrorDocument 수정 (0)</a></li><li>3/7/2005 -- <a href="http://b.mytears.org/2005/03/136" title="웹서비스와 utf-8">웹서비스와 utf-8 (1)</a></li><li>6/18/2010 -- <a href="http://b.mytears.org/2010/06/2237" title="HTML5 웹을 넘어 플랫폼으로&#8230;">HTML5 웹을 넘어 플랫폼으로&#8230; (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/10/611/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>오픈웹과 관련해서…</title>
		<link>http://b.mytears.org/2007/10/610</link>
		<comments>http://b.mytears.org/2007/10/610#comments</comments>
		<pubDate>Wed, 24 Oct 2007 15:19:11 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[activeX]]></category>
		<category><![CDATA[banking]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[공인인증서]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/10/610</guid>
		<description><![CDATA[<p>요 며칠동안 현재 인터넷 뱅킹과 관련된 이슈들을 정리해서 하나의 포스트를 작성하고 있다. </p>
<p>현재 문제점은 보안 채널을 제공하는데 INISafeWeb/XecureWeb 등의 activeX[1] 를 사용한다는 것과 공인인증서(비밀키)를 이용한 서명을 activeX 로만 구현해 놓았다는 것이 아닐까 싶다.</p>
<p>https 를 통해 128bit secure channel 을 구성할 경우 지저분한 프로그램이 깔릴 필요가 없고, 현재 사용 중인 대부분의 브라우져에서 웹페이지를 안전하게 접근하는 것이 ...</p>
<p><a href='http://b.mytears.org/2007/10/610'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>2/7/2010 -- <a href="http://b.mytears.org/2010/02/2165" title="인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가?">인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가? (3)</a></li><li>4/6/2009 -- <a href="http://b.mytears.org/2009/04/1888" title="오픈웹 관련해서 시끄러운 하루하루&#8230;">오픈웹 관련해서 시끄러운 하루하루&#8230; (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F610&rdate=2007-10-25+00%3A19%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F610&rdate=2007-10-25+00%3A19%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>요 며칠동안 현재 인터넷 뱅킹과 관련된 이슈들을 정리해서 하나의 포스트를 작성하고 있다. </p>
<p>현재 문제점은 보안 채널을 제공하는데 INISafeWeb/XecureWeb 등의 activeX[1] 를 사용한다는 것과 공인인증서(비밀키)를 이용한 서명을 activeX 로만 구현해 놓았다는 것이 아닐까 싶다.</p>
<p>https 를 통해 128bit secure channel 을 구성할 경우 지저분한 프로그램이 깔릴 필요가 없고, 현재 사용 중인 대부분의 브라우져에서 웹페이지를 안전하게 접근하는 것이 가능해진다. 또한 보안채널을 이용할 때와 이용하지 않을 때 모두 동일한 방법을 통해 웹페이지를 코딩하는 것이 가능하기 때문에 웹 개발자/코더 입장에서도 훨씬 편하게 작업할 수 있을 것이다.  게다가 비싼 플러그인도 라이센스할 필요가 없으므로 원가 절감 효과까지 누릴 수 있다.</p>
<p>공인인증서를 이용한 서명의 경우의 경우는 여전히 activeX/plugin 인터페이스가 필요하겠지만 &#8216;공인인증서를 사용한 전자서명 인터페이스(api)&#8217; 를 표준화 하게 되면, 공인인증서를 사용하는 사이트들을 이용하게 되더라도 각각에 대해 다른 플러그인을 설치할 필요가 없기 때문에 사용자 입장에서 더욱 편리하게 이용할 수 있을 것이다. 또한 플러그인이 할 일은 대폭 줄어들어 비밀키를 읽어 전자서명 하는 용도 정도로만 사용될 뿐이므로 구현 또한 쉬워질 것이라고 생각된다.</p>
<p>SEED 등 전자 서명에 필요한 모든 알고리즘은 openSSL 에 이미 구현되어 있고, 이를 이용하면 UI 정도의 작업만이 필요하게 된다. API 가 표준화 되고, 구현체가 opensource 로도 나오게 되면 멀티 플랫폼을 지원하는 건 시간 문제일 뿐이다.</p>
<blockquote><p>개발자의 생산성을 비약적으로 향상시킬 방안이 있어도, 그 기술을 쓰는 개발자의 단가가 비싸다는 이유로 기각되곤 한다. 이는 혁신의 상실일뿐더러 기회의 상실이다. ‘보이지 않는 손’의 위업이라 해버리면 그만이지만, 정책이란 이러한 상실을 지키기 위한 것 아니었던가. </p>
<p>from: zdnet &#8211; 대한민국 개발자의 우울, 자기 책임론에서 구조 개혁론으로</p>
<p><a href='http://www.zdnet.co.kr/itbiz/column/anchor/goodhyun/0,39030292,39161841,00.htm'>http://www.zdnet.co.kr/it...,39030292,39161841,00.htm</a></p>
</blockquote>
<p>공인인증서를 이용하기 위한 API 표준화, 그리고 보안 채널을 제공하기 위한 방법으로 https 를 이용하도록 마이그레이션 하는 것 이 두 가지 모두 생산성을 비약적으로 향상시킬 수 있는 방법이고, 더불어 최소한의 비용으로 드라마틱한 접근성 향상을 가져올 수 있는 방법이 될 것이다.</p>
<p>언제까지 이런 &#8216;혁신의 상실&#8217; 을 반복하고만 있을 것인지 이를 보고 있는 난 너무나 답답하다.</p>
<p>[1] activeX 는 Microsoft Internet Explorer 를 확장시키기 위한 기술로 특정 프로그램을 설치한 뒤 jscript 를 통해 그 프로그램을 조작할 수 있는 방법을 제공하게 된다. 단 Microsoft Windows 에서만 사용이 가능하다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F610&rdate=2007-10-25+00%3A19%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F610&rdate=2007-10-25+00%3A19%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>2/7/2010 -- <a href="http://b.mytears.org/2010/02/2165" title="인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가?">인터넷 결제 시스템을 언제까지 익스플로러에 가둬놓을 셈인가? (3)</a></li><li>4/6/2009 -- <a href="http://b.mytears.org/2009/04/1888" title="오픈웹 관련해서 시끄러운 하루하루&#8230;">오픈웹 관련해서 시끄러운 하루하루&#8230; (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/10/610/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>sql injection 을 피하기위한 간단한 방법…</title>
		<link>http://b.mytears.org/2007/10/609</link>
		<comments>http://b.mytears.org/2007/10/609#comments</comments>
		<pubDate>Wed, 24 Oct 2007 13:48:43 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[array_map]]></category>
		<category><![CDATA[avoid]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql_real_escape_string]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/10/609</guid>
		<description><![CDATA[<p>sql injection 을 피하기 위해 single quote 를 escape 시켜주는 코드를 작성해야할 필요가 있었는데, 매번 하나하나에 대해 mysql_real_escape_string 을 호출해주는 건 너무나도 번거로웠다. 뭔가 간단하게 처리할 방법이 없을까 하고 찾아봤더니 왠걸! array_map 이라는 마법의 함수를 발견할 수 있었다.</p>
<p></p>
<p>?View Code PHPfunction stripslashes_deep&#40;$var&#41;&#123;</p>
<p>    $var = is_array&#40;$var&#41;?</p>
<p>         ...</p>
<p><a href='http://b.mytears.org/2007/10/609'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>11/15/2005 -- <a href="http://b.mytears.org/2005/11/293" title="나는 제로보드가 싫어요!!">나는 제로보드가 싫어요!! (5)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>1/31/2008 -- <a href="http://b.mytears.org/2008/01/623" title="problem in fastcgi with apache">problem in fastcgi with apache (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F609&rdate=2007-10-24+22%3A48%3A43&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F609&rdate=2007-10-24+22%3A48%3A43&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>sql injection 을 피하기 위해 single quote 를 escape 시켜주는 코드를 작성해야할 필요가 있었는데, 매번 하나하나에 대해 mysql_real_escape_string 을 호출해주는 건 너무나도 번거로웠다. 뭔가 간단하게 처리할 방법이 없을까 하고 찾아봤더니 왠걸! array_map 이라는 마법의 함수를 발견할 수 있었다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p609code40'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p60940"><td class="code" id="p609code40"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> stripslashes_deep<span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$var</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span>?
                  <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'stripslashes_deep'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
                  <a href="http://www.php.net/stripslashes"><span style="color: #990000;">stripslashes</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$var</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mysql_real_escape_string_deep<span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$var</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span>?
                  <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mysql_real_escape_string_deep'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
                  <a href="http://www.php.net/mysql_real_escape_string"><span style="color: #990000;">mysql_real_escape_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$var</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/get_magic_quotes_gpc"><span style="color: #990000;">get_magic_quotes_gpc</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
        <span style="color: #000088;">$_POST</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'stripslashes_deep'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
        <span style="color: #000088;">$_GET</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'stripslashes_deep'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_GET</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #000088;">$_POST</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'mysql_real_escape_string_deep'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
    <span style="color: #000088;">$_GET</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_map"><span style="color: #990000;">array_map</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'mysql_real_escape_string_deep'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>common function 들을 정의해놓은 파일 맨 아래 저 코드를 삽입해버리니 sql injection 따위 이제 두려워할 필요가 없어졌다. 움하하핫!!</p>
<p>p.s) 그냥 array_map 에 stripslashes 나 mysql_real_escape_string 을 사용하게 되면 array 가 넘어온 경우 문제가 생길 수 있어서 약간 수정을 했습니다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F609&rdate=2007-10-24+22%3A48%3A43&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F609&rdate=2007-10-24+22%3A48%3A43&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>11/15/2005 -- <a href="http://b.mytears.org/2005/11/293" title="나는 제로보드가 싫어요!!">나는 제로보드가 싫어요!! (5)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1192" title="Punbb update">Punbb update (0)</a></li><li>1/31/2008 -- <a href="http://b.mytears.org/2008/01/623" title="problem in fastcgi with apache">problem in fastcgi with apache (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/10/609/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CG: 3D Image Rotation</title>
		<link>http://b.mytears.org/2007/10/600</link>
		<comments>http://b.mytears.org/2007/10/600#comments</comments>
		<pubDate>Mon, 15 Oct 2007 15:25:51 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[inverse]]></category>
		<category><![CDATA[lena]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[transpose]]></category>
		<category><![CDATA[unitary]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/10/600</guid>
		<description><![CDATA[<p>며칠 전 Perspective Projection 을 정리해놓은 김에 3D Image Rotation 도 정리를 해볼까 싶습니다.</p>
<p>Rotation Matrix</p>
<p>3D 이미지 회전은 아래와 같은 행렬을 통해 새로운 좌표를 계산할 수 있습니다. 또한 이 행렬들은 모두 unitary matrix 이기 때문에 Transpose 를 취해줌으로 역행렬을 쉽게 구할 수 있습니다.</p>
<p>z축 기준: (xy 평면에서의 회전)</p>
<p></p>
<p>y축 기준: (zx 평면에서의 회전)</p>
<p></p>
<p>x축 기준: (yz 평면에서의 회전)</p>
<p></p>
<p>Implementation of ...</p>
<p><a href='http://b.mytears.org/2007/10/600'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F600&rdate=2007-10-16+00%3A25%3A51&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F600&rdate=2007-10-16+00%3A25%3A51&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>며칠 전 <a href='/2007/10/599'>Perspective Projection</a> 을 정리해놓은 김에 3D Image Rotation 도 정리를 해볼까 싶습니다.</p>
<h3 id="toc-rotation-matrix">Rotation Matrix</h3>
<p>3D 이미지 회전은 아래와 같은 행렬을 통해 새로운 좌표를 계산할 수 있습니다. 또한 이 행렬들은 모두 unitary matrix 이기 때문에 Transpose 를 취해줌으로 역행렬을 쉽게 구할 수 있습니다.</p>
<p>z축 기준: (xy 평면에서의 회전)</p>
<div style='width: 200px;' class='calign'><img src='/wp-content/upload/rotation_mtx_z.gif' /></div>
<p>y축 기준: (zx 평면에서의 회전)</p>
<div style='width: 200px;' class='calign'><img src='/wp-content/upload/rotation_mtx_y.gif' /></div>
<p>x축 기준: (yz 평면에서의 회전)</p>
<div style='width: 200px;' class='calign'><img src='/wp-content/upload/rotation_mtx_x.gif' /></div>
<h3 id="toc-implementation-of-image-rotation">Implementation of Image Rotation</h3>
<p>처음에는 3차원 공간을 3차원 배열을 사용하여 모델링한 뒤 실제 3차원 좌표를 모두 뒤지며 forward/backward mapping 하는 방법을 통해 3D image rotation 을 구현해보았습니다. 3차원 배열을 이용 512&#215;512 사이즈의 lena image 를 회전시키려면 (512*1.414)^3 만큼의 공간이 필요하게 되고, 저 공간을 모두 뒤지려면 계산 복잡도가 엄청나더군요. </p>
<p>실제 이 방법을 통해 이미지를 회전 시키는 데 &#8216;분&#8217; 단위 시간이 필요했던 것으로 기억합니다. 게다가 변환을 반복할 수록 이미지의 디그라데이션이 심해졌기 때문에 이건 아니라는 생각이 들더군요. 이런 경우 이미 잘 설계되어 있는 그래픽 라이브러리를 참고하는 것이 좋기 때문에 OpenGL 의 인터페이스를 살펴보며 어떤 식으로 구현하면 좋을 지 생각하기 시작했습니다.</p>
<p>뭐 어짜피 화면이나 이미지로 보여주기 위해선 2D 평면에 projection 하는 것이 필요하므로 매 번 이미지 자체를 돌리기 보다 축을 회전시키고, 마지막에 그 축을 이용해서 원래 이미지를 새로운 좌표 공간으로 매핑시켜주면 되겠다는 결론을 얻었습니다.</p>
<p>우선 x, y, z 좌표를 identity matrix 로 표현한 뒤 R^T * AXIS 를 통해 새로운 축 AXIS&#8217; 를 구할 수 있고, 회전을 시키고 싶은 만큼 위 연산을 반복해준 뒤 forward mapping 을 해주는 것으로  빠르고 훌륭한 품질을 보여주도록 구현하는걸 성공했습니다.</p>
<p><a href='/wp-content/upload/lena512_z30.jpg'><img src='/wp-content/upload/thumb_lena512_z30.jpg' /></a></p>
<p>위 이미지는 512&#215;512 사이즈의 lena 이미지를 z축을 기준으로 45도만큼 회전시킨 결과입니다. 왼 쪽은 단순히 forward mapping 을 해준 것이고 오른쪽은 weighted sum 을 이용해서  forward mapping 을 개선해준 것입니다. </p>
<p>결과적으로 Photoshop 등을 이용한 만큼 훌륭한 이미지를 얻어낼 수 있는 것을 확인할 수 있습니다.</p>
<h3 id="toc-other-results">Other Results</h3>
<p>아래 이미지는 x 축, y축, z축을 기준으로 순서대로 30도씩 회전시킨 이미지입니다. 이런 식으로 계산을 하려면 순서를 뒤집어서 z축, y축, x 축 기준으로 30도씩 회전을 시켜주면 됩니다.</p>
<p><a href='/wp-content/upload/lena512_x30_y30_z30.jpg'><img src='/wp-content/upload/thumb_lena512_x30_y30_z30.jpg' /></a></p>
<p>다음은 x축으로 30도, y축으로 60도 만큼 돌린 결과</p>
<p><a href='/wp-content/upload/lena512_x30_y60.jpg'><img src='/wp-content/upload/thumb_lena512_x30_y60.jpg' /></a></p>
<p>실제 구현 코드에 관심이 있으신 분들은 아래 링크를 방문하시면 되겠습니다. 이런 걸 하나하나 구현해볼 때마다 느끼는 거지만 openGL 같은 라이브러리를 설계하신 분들은 상상하기 힘들 정도로 똑똑한 것 같아요.</p>
<p>소스:</p>
<p><a href='http://trac.unfix.net/browser/snippet/rotation_3d'>http://trac.unfix.net/browser/snippet/rotation_3d</a></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F600&rdate=2007-10-16+00%3A25%3A51&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F600&rdate=2007-10-16+00%3A25%3A51&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/10/600/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CG: Perspective Projection</title>
		<link>http://b.mytears.org/2007/10/599</link>
		<comments>http://b.mytears.org/2007/10/599#comments</comments>
		<pubDate>Sat, 13 Oct 2007 17:40:06 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[cg]]></category>
		<category><![CDATA[coordinate]]></category>
		<category><![CDATA[gauss elimination]]></category>
		<category><![CDATA[graphic]]></category>
		<category><![CDATA[HCI]]></category>
		<category><![CDATA[hw]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[perspective]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[projection]]></category>
		<category><![CDATA[theory]]></category>
		<category><![CDATA[warping]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/10/599</guid>
		<description><![CDATA[<p>HCI 과제 덕에 심심찮게 프로그래밍을 하게 되네요. 첫 과제 였던 3D rotation 관련을 구현하는 것도 상당히 흥미로웠지만, 두번째 과제인 Perspective Projection 를 구현하는 것은 정말 멋진 경험이었다고 생각합니다.</p>
<p>지난 며칠간 꽤나 재밌게 프로그래밍을 했던 관계로 블로그에도 살짝 정리해보는게 어떨까 하는 생각이 들었는데, 막상 쓸려니 내용이 잘 전해질지 의문이네요.</p>
<p>What is the Perspective Projection?</p>
<p>Perspective Projection 이란 아래의 왼쪽 ...</p>
<p><a href='http://b.mytears.org/2007/10/599'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>10/29/2007 -- <a href="http://b.mytears.org/2007/10/612" title="CG: gaussian blur">CG: gaussian blur (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F599&rdate=2007-10-14+02%3A40%3A06&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F599&rdate=2007-10-14+02%3A40%3A06&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>HCI 과제 덕에 심심찮게 프로그래밍을 하게 되네요. 첫 과제 였던 3D rotation 관련을 구현하는 것도 상당히 흥미로웠지만, 두번째 과제인 Perspective Projection 를 구현하는 것은 정말 멋진 경험이었다고 생각합니다.</p>
<p>지난 며칠간 꽤나 재밌게 프로그래밍을 했던 관계로 블로그에도 살짝 정리해보는게 어떨까 하는 생각이 들었는데, 막상 쓸려니 내용이 잘 전해질지 의문이네요.</p>
<h3 id="toc-what-is-the-perspective-projection">What is the Perspective Projection?</h3>
<p>Perspective Projection 이란 아래의 왼쪽 이미지를 오른쪽 이미지 처럼 변화시키는 것을 얘기합니다. 꼭 저렇게 비뚜러진 이미지를 바로잡는것은 아니고, 이미지가 투영되는 면을 변화시키는 것이라고 생각하시면 됩니다.</p>
<p><img src='/wp-content/upload/perspective_ex.png' /></p>
<p>이해를 돕기 위해 wikipedia 에서 이미지를 하나 가져왔습니다. 아래 이미지의 연보라색 면이 상이 맺히는 곳이라고 할 때, perspective transform 은 그 보라색 면을 이동시킨 것 같은 효과를 주기 위해 사용합니다.</p>
<div style='width: 300px;' class='calign'><img src='/wp-content/upload/perspective_ex.jpg' /></div>
<h3 id="toc-how-to-get-a-projection-matrix">How to get a projection matrix.</h3>
<p>기본 적으로 Perspective Transform 을 위한 식은 다음과 같습니다.</p>
<div style='width: 193px;' class='calign'><img src='/wp-content/upload/perspective_mtx1.gif'  class='calign'/></div>
<p>homogenious coordinate 를 사용하고 있으니 x&#8217; 와 y&#8217; 에 관한 식은 아래와 같이 바꿔쓸 수 있습니다.</p>
<div style='width: 281px;' class='calign'><img src='/wp-content/upload/perspective_mtx2.gif' /></div>
<p>이를 정리하면 다음과 같은 꼴로 만들 수 있고,</p>
<div style='width: 233px;' class='calign'><img src='/wp-content/upload/perspective_mtx3.gif'  /></div>
<p>우리가 값을 알고 싶은 변수들은 a, b, c, d, e, f, g, h 이렇게 8 개이므로, (x, y) 와 그에 대응되는 (x&#8217;, y&#8217;) 쌍을 4개만 알고 있으면 projection matrix 를 구할 수 있습니다. 이를 구하기 위한 매트릭스는 아래와 같습니다.</p>
<div style='width: 428px;' class='calign'><img src='/wp-content/upload/perspective_mtx4.gif'  /></div>
<p>남은 건 8&#215;8 matrix 의 inverse matrix 를 구한 뒤 뒤 쪽의 매트릭스에 곱해주는 것 뿐이군요.</p>
<h3 id="toc-implementation-of-perspective-projection">Implementation of Perspective projection</h3>
<p>이제까지 Perspective Transform 을 위한 매트릭스에 대해 알아봤습니다. 이제는 실제 구현을 해보는 것만 남았네요. 위에서 알아봤듯이 Perspective matrix 를 구하려면 matrix multiplication 과 inverse 를 위한 인터페이스가 필요합니다.</p>
<p>matrix multiplication 의 경우 서로 곱할 수 있는 형식인지를 체크한 뒤 단순한 계산을 하면 되고, inverse 는 gauss elimination 을 이용 reduced row echelon form 으로 만들어주는 것을 통해 쉽게(?) 구해낼 수 있습니다.</p>
<p>위의 두 가지까지 구현했다면, 이제 warping 만을 구현하면 되겠습니다. 이 warping 은 크게 두가지 방법을 통해 구현할 수 있습니다.</p>
<h4 id="toc-forward-mapping">forward mapping</h4>
<p>forward mapping 은 말 그대로 src 의 x, y 좌표에 대하 dst 의 x&#8217;, y&#8217; 를 계산 한 뒤 값을 채워주는 방식입니다. 간단히 pseudo code 로 표현하면 다음과 같이 표현할 수 있겠네요.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p599code43'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p59943"><td class="code" id="p599code43"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> y <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> y <span style="color: #339933;">&lt;</span> height <span style="color: #339933;">;</span> y<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> x <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> x <span style="color: #339933;">&lt;</span> width <span style="color: #339933;">;</span> x<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        x<span style="color: #ff0000;">' = (ax+by+c) / (gx+hy+1);
        y'</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>dx<span style="color: #339933;">+</span>ey<span style="color: #339933;">+</span>f<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span>gx<span style="color: #339933;">+</span>hy<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        dst<span style="color: #009900;">&#91;</span>y<span style="color: #ff0000;">'][x'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>y<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>근데 막상 구현을 해놓고 보면 pixel 이 정수단위이기 때문에 아래와 같이 hole 이 발생하는 것을 확인할 수 있습니다.</p>
<p><img src='/wp-content/upload/test1_fwarping.png' /></p>
<h4 id="toc-backward-mapping">backward mapping</h4>
<p>위에서 얘기한 hole 을 방지하기 위한 방법 중 하나로 backward warping 이란 것이 있습니다. forward warping 에서 src 의 좌표를 기준으로 dst 의 좌표를 계산했다면, backward warping 에서는 dst 의 좌표를 기준으로 src 의 좌표를 계산하게 됩니다. </p>
<p>간단하게 pseudo code 로 표현하면 아래와 같이 되겠습니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p599code44'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p59944"><td class="code" id="p599code44"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> y<span style="color: #ff0000;">' = 0 ; y'</span> <span style="color: #339933;">&lt;</span> height <span style="color: #339933;">;</span> y<span style="color: #ff0000;">'++ ){
    for( x'</span> <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> x<span style="color: #ff0000;">' &lt; width ; x'</span><span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        x <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>ax<span style="color: #ff0000;">'+by'</span><span style="color: #339933;">+</span>c<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span>gx<span style="color: #ff0000;">'+hy'</span><span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        y <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>dx<span style="color: #ff0000;">'+ey'</span><span style="color: #339933;">+</span>f<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span>gx<span style="color: #ff0000;">'+hy'</span><span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        dst<span style="color: #009900;">&#91;</span>y<span style="color: #ff0000;">'][x'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> src<span style="color: #009900;">&#91;</span>y<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>간단히 코드만 봐도 예상할 수 있겠지만 backward_warping 을 해주게 되면 hole 은 확실하게 없앨 수 있습니다. 결과 이미지는 아래와 같은데, 아주 깔끔한 결과가 나오지는 않았습니다.</p>
<p><img src='/wp-content/upload/test1_bwarping.png' /></p>
<h4 id="toc-forward-or-backward-warping-with-interpolation">forward (or backward) warping with interpolation</h4>
<p>forward warping 을 하게 되면 hole 이 생기게 되고, 단순한 backward warping 을 하게 되면 이미지의 화질 저하가 발생하게 되는데, interpolation 을 사용하게 되면 이를 조금 더 개선할 수 있습니다.</p>
<p>전 linear-interpolation 을 사용해보았는데, 설명하기는 복잡하니 관심있으신 분은 저 아래 첨부할 소스를 참고해보시면 좋겠습니다. 결과는 아래와 같이 나옵니다.</p>
<p>우선 interpolation 을 이용한 forward warping 입니다. 복잡하게 하기는 귀찮고 해서 대강 구현했더니, hole 이 줄기는 했지만 여전히 존재하고 있습니다.</p>
<p><img src='/wp-content/upload/test1_fwarping_i.png' /></p>
<p>다음은 backward warping 에 linear interpolation 을 적용한 결과입니다. hole 도 없고, 보기에 상당히 괜찮아진 것을 확인할 수 있습니다.</p>
<p><img src='/wp-content/upload/test1_bwarping_i.png' /></p>
<p>소스코드:</p>
<p><a href='http://trac.unfix.net/browser/snippet/image_projection/'>http://trac.unfix.net/bro...snippet/image_projection/</a></p>
<p>참고자료:</p>
<p><a href='http://en.wikipedia.org/wiki/Perspective_%28graphical%29'>http://en.wikipedia.org/w...rspective_%28graphical%29</a></p>
<p><a href='http://en.wikipedia.org/wiki/Gaussian_elimination'>http://en.wikipedia.org/wiki/Gaussian_elimination</a></p>
<p>p.s) 부동 소숫점 연산에서 x &#8211; x/x*x = 0 이라는 것이 보장되질 않더군요. 코드 한 줄 줄일려다가 디버깅을 30분동안 해야했습니다. -_ㅜ</code></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F599&rdate=2007-10-14+02%3A40%3A06&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F10%2F599&rdate=2007-10-14+02%3A40%3A06&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li><li>11/21/2008 -- <a href="http://b.mytears.org/2008/11/731" title="CG: dithering">CG: dithering (2)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>10/29/2007 -- <a href="http://b.mytears.org/2007/10/612" title="CG: gaussian blur">CG: gaussian blur (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/10/599/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>64bit Windows Vista 와 신한은행…</title>
		<link>http://b.mytears.org/2007/09/591</link>
		<comments>http://b.mytears.org/2007/09/591#comments</comments>
		<pubDate>Sat, 15 Sep 2007 06:26:34 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[bank]]></category>
		<category><![CDATA[banking]]></category>
		<category><![CDATA[inisafeweb]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[keyboard protection]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[seed]]></category>
		<category><![CDATA[Shinhan]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xecureweb]]></category>
		<category><![CDATA[xp]]></category>
		<category><![CDATA[신한은행]]></category>
		<category><![CDATA[의견]]></category>
		<category><![CDATA[인터넷뱅킹]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/09/591</guid>
		<description><![CDATA[<p>Microsoft Windows Vista Home Premium 64bit edition 을 구입하다.</p>
<p>조금 더 나은 환경을 경험해보고자 며칠 전 Microsoft Windows Vista Home Premium 64bit Edition 을 구입했다. 예전에 사용하던 프로그램 중 몇 가지는 제대로 동작하지 않았지만 그래도 새로운 인터페이스에 어느정도 익숙해진 것 같다. 평소에도 ActiveX 설치를 강요하는 사이트들은 별로 이용하지 않는 관계로 아직까진 별 불편함을 느끼지 못하고 있었지만, ...</p>
<p><a href='http://b.mytears.org/2007/09/591'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/589" title="Microsoft Windows Vista Home Premium 64bit edition">Microsoft Windows Vista Home Premium 64bit edition (2)</a></li><li>2/10/2009 -- <a href="http://b.mytears.org/2009/02/1460" title="PC를 다운시키는 2090 바이러스?">PC를 다운시키는 2090 바이러스? (3)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F591&rdate=2007-09-15+15%3A26%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F591&rdate=2007-09-15+15%3A26%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<h3 id="toc-microsoft-windows-vista-home-premium-64bit-edition--">Microsoft Windows Vista Home Premium 64bit edition 을 구입하다.</h3>
<p>조금 더 나은 환경을 경험해보고자 며칠 전 Microsoft Windows Vista Home Premium 64bit Edition 을 구입했다. 예전에 사용하던 프로그램 중 몇 가지는 제대로 동작하지 않았지만 그래도 새로운 인터페이스에 어느정도 익숙해진 것 같다. 평소에도 ActiveX 설치를 강요하는 사이트들은 별로 이용하지 않는 관계로 아직까진 별 불편함을 느끼지 못하고 있었지만, 인터넷 뱅킹을 위해 신한은행 사이트에 접근하면서부터 엄청난 스트레스를 받기 시작했다.</p>
<h3 id="toc-ezplus------">Ezplus 를 다운 받는 페이지는 어디서 찾아야하지?</h3>
<p>신한은행은 EzPlus 라는 별도의 인터넷 뱅킹용 소프트웨어를 제공한다. 본인은 맥에서도 EzPlus for Mac 을 이용하고 있고, 인터페이스도 그런데로 편리하며 무엇보다 익스플로러에 ActiveX 를 덕지덕지 설치할 필요가 없는 장점 때문에 윈도우에서도 EzPlus 를 사용하기로 결심했다.</p>
<p>하지만 신한은행 홈페이지(http://shinhan.com/) 에서 EzPlus 다운로드를 받기 위한 페이지를 찾는 것은 하늘의 별따기였다. &#8216;은행소개&#8217;, &#8216;영업점 안내&#8217;, &#8216;고객 센터&#8217;, &#8216;펀드몰&#8217; 등등 어떤 메뉴를 눌러도 EzPlus 에 대한 언급이 없다. 결국 구글(http://www.google.co.kr/) 에서 EzPlus 를 검색한 뒤에야 겨우 다운을 받을 수 있었다.</p>
<h3 id="toc----64bit-vista---">키보드 보안 모듈은 64bit Vista 에선 작동하지 않습니다?</h3>
<p>EzPlus 를 다운 받는 것으로 문제는 해결된 게 아니었다. dotnet Framework 1.1 을 설치했고, Ezplus 업데이트까지 정상적으로 이루어졌지만 뜬금없이 &#8216;키보드 보안 모듈은 64bit Vista 에선 작동하지 않습니다.&#8217; 라는 에러&#8230; 그리고 키보드 보안 모듈이 작동하지 않는다는 이유를 들어 아무 것도 할 수 없게 만들었다.</p>
<h3 id="toc-------">인터넷 뱅킹을 이용하기 위해 관리자 권한이 도대체 왜 필요한거지?</h3>
<p>결국 EzPlus 를 포기하고 신한은행 홈페이지로 접속했다. 이전에 하던대로 ActiveX 를 설치하려 했으나 신한은행 홈페이지는 뭔가 더 많은 것을 바란다. 결국 신한은행 홈페이지를 접속할 땐 관리자 권한의 IE 를 실행시키도록 하는 프로그램을 설치하도록 강요했다. 그것만 설치되고 끝이 아니라 iniSafeWeb, 키보드 보안 모듈 등등 수 많은 프로그램을 추가로 설치됐다.</p>
<p>사용자가 알지도 못하는 사이에 키보드 후킹 프로그램이 설치된다거나 백도어 등이 설치되는 것은 관리자모드로 실행되는 IE 의 문제점 중 하나였고, 그런 이유로 (물론 그것만이 이유는 아니었겠지만) 사용자 권한으로 실행되도록 만들어놓은 IE 를 억지로 관리자 권한으로 실행되도록 만들려 한다. 인터넷 뱅킹을 이용하기 위해 관리자 권한이 도대체 왜 필요한거지?</p>
<h3 id="toc-----">키보드 보안 프로그램 이용 안내?</h3>
<p>결국 그 수많은 activeX 를 깔고, 관리자 권한으로 상승된 IE 를 통해 신한은행 홈페이지를 접속했다. 이제는 인터넷 뱅킹을 사용할 수 있을거라는 기대와 함께&#8230; </p>
<p>하지만 내가 만난 메시지는 아래와 같다.</p>
<blockquote><p>윈도우 Vista/XP/2003 64비트 컴퓨터의 인터넷 뱅킹 이용안내</p>
<p>고객님이 사용하는 컴퓨터는 Windows Vista / Windows XP / Windows 2003 64bit 컴퓨터로서 인터넷 뱅킹 이용시 필요한 키보드 보안 프로그램이 정상적으로 작동되지 못합니다.</p>
<p>키보드 보안 프로그램 은 컴퓨터의 OS 가 Windows Vista 32bit, Windows XP, Windows 2000 등에서 정상적으로 작동되므로 인터넷뱅킹은 이러한 OS 에서 이용하시기 바랍니다.</p>
<p>! 키보드 보안프로그램이 설치되지 않으면, 인터넷 뱅킹 시 입력하는 주민등록번호, 계좌번호, 각종 비밀번호 등이 바이러스 감염이나 해킹 등에 의해 외부로 유출될 수 있습니다.</p></blockquote>
<p>큰 맘먹고 10만원이 넘는 돈을 주고 Vista 64bit edition 을 샀는데 다른 PC 에서 이용하란다. 64bit edition 을 이용하고 싶다면 PC 를 한 대 다 만들어놓고 32bit Windows 를 하나 더 구입해서 사용하란 얘기인가보다.</p>
<p>그리고 그 아래에 &#8216;위 이용 약관에 동의합니다.&#8217; 란 메시지와 함께 체크박스가 존재한다. 그니까 &#8216;다른 PC 랑 새 32bit Windows OS 를 사서 사용하겠다.&#8217;라고 동의해달란 얘기? 도대체 뭘 하잔건지 모르겠다.</p>
<h3 id="toc---seed----">키보드 보안 / Seed / 공인 인증서가 나쁘다는게 아니다!</h3>
<p>Seed 를 이용한 128 bit 통신, 공인 인증서를 이용한 본인 확인, 키보드 보안 모듈을 통해 사용자의 피해 방지 뭐 다 좋다. 다만 조금 더 보편적인 방법들을 이용해주면 안될까 하는 생각 뿐&#8230;</p>
<p>키보드 보안 / 바이러스 체크 등의 서비스는 원하는 사람에 한해 제한적으로 제공하면 큰일나나?</p>
<h3 id="toc-https---">https 를 이용하게 되면&#8230;</h3>
<p>현재 인터넷 뱅킹 서비스들을 보면 암호화 플러그인 (IniSafeWeb / XecureWeb) 을 이용한 보안 채널 통신이 핵심인 것 같은데, 이 경우 html 은 암호화 플러그인을 통해 디코딩된 뒤 javascript 로 뿌려지게 된다.  여기까지는 본인의 공인인증서 등이 필요 없으니 서버측의 인증서를 사용하는 https 와 다를게 별로 없는 듯 하다. 다른 점이 있다면 https 는 널리 쓰이고 있는 웹서버(apache 등등)와 클라이언트(Internet Explorer, Firefox, Opera, Safari, etc)에 이미 구현이 되어 있기 때문에 activeX 등을 설치할 필요가 없으며 복잡하게 javascript 를 통해 뿌려줄 필요가 없다는 거&#8230;</p>
<p>XecureWeb / IniSafeWeb 을 이용하는 대신 https 를 이용하게 된다면 페이지를 만드는 사람 입장에서도, 이용하는 사람 입장에서도 모두 편해진다는 얘기이고, 공인인증서를 사용하는 부분이 있다면 그 부분만을 activeX 혹은 plugin 등을 이용하도록 만들면 여러모로 환경이 좋아질 거 같은데 왜 이렇게 복잡하게들 구현하려고 하는지 모르겠다.</p>
<p>위에서 얘기한 바대로 https 를 이용하게 되면, 공인인증서가 필요한 계좌 이체 등의 서비스는 모르겠지만 적어도 내 잔액이 얼마인지 등의 간단한 정보는 browser 나 OS 에 상관없이 확인 가능해질텐데&#8230; </p>
<p>꼭 필요한 곳에까지 activeX 나 plugin 같은 기술을 사용하지 말자는 것은 아니다. 단지 필요가 없는 곳까지 저런 것들을 적용함으로 인해 별 의미 없는 프로그램들이 덕지덕지 설치되는 것은 피해야 하지 않을까 싶다. &#8216;장치나 사용자의 능력에 상관없이 쉽고 편리하게 접근할 수 있는 그런 웹&#8217; 을 만날 수 있는 날이 하루라도 빨리 왔음 좋겠다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F591&rdate=2007-09-15+15%3A26%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F591&rdate=2007-09-15+15%3A26%3A34&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/589" title="Microsoft Windows Vista Home Premium 64bit edition">Microsoft Windows Vista Home Premium 64bit edition (2)</a></li><li>2/10/2009 -- <a href="http://b.mytears.org/2009/02/1460" title="PC를 다운시키는 2090 바이러스?">PC를 다운시키는 2090 바이러스? (3)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/09/591/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Microsoft Windows Vista Home Premium 64bit edition</title>
		<link>http://b.mytears.org/2007/09/589</link>
		<comments>http://b.mytears.org/2007/09/589#comments</comments>
		<pubDate>Sat, 15 Sep 2007 03:49:24 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[7-zip]]></category>
		<category><![CDATA[compatibility]]></category>
		<category><![CDATA[context menu]]></category>
		<category><![CDATA[file association]]></category>
		<category><![CDATA[fusion hdtv]]></category>
		<category><![CDATA[home premium]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[빵집]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/09/589</guid>
		<description><![CDATA[<p>며칠 전 포스트에서 밝혔듯이 Microsoft Windows Vista Home Premium 64bit edition 을 구매했고, 드디어 vista 의 세계로 퐁당 뛰어들었다. 64bit 하드웨어를 가지고 있기 때문에 64bit 를 활용해보자란 생각도 있었고, 32bit 프로그램들이 문제 없이 실행된다는 사실을 들었기에 64bit edition 을 구매했는데, 현재까지 약간의 문제가 보이고 있다.</p>
<p>우선 내 눈에 보이는 문제점들은 아래와 같다.</p>
<p></p>
<p></p>
<p>iTunes 의 에러창 문제</p>
<p>Fusion HDTV5 ...</p>
<p><a href='http://b.mytears.org/2007/09/589'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>6/11/2007 -- <a href="http://b.mytears.org/2007/06/548" title="Trojan: VBS/Autorun.B">Trojan: VBS/Autorun.B (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F589&rdate=2007-09-15+12%3A49%3A24&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F589&rdate=2007-09-15+12%3A49%3A24&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>며칠 전 포스트에서 밝혔듯이 Microsoft Windows Vista Home Premium 64bit edition 을 구매했고, 드디어 vista 의 세계로 퐁당 뛰어들었다. 64bit 하드웨어를 가지고 있기 때문에 64bit 를 활용해보자란 생각도 있었고, 32bit 프로그램들이 문제 없이 실행된다는 사실을 들었기에 64bit edition 을 구매했는데, 현재까지 약간의 문제가 보이고 있다.</p>
<p>우선 내 눈에 보이는 문제점들은 아래와 같다.</p>
<blockquote>
<ol>
<li>iTunes 의 에러창 문제</li>
<li>Fusion HDTV5 RT lite 의 64bit driver 부재</li>
<li>빵집과 context menu 관련된 문제</li>
<li>7-zip 의 icon 연결 실패</li>
<li>Tag &#038; Renamer 작동 X</li>
<li>64bit Explorer 용 Flash plugin 부재</li>
<li>Starcraft 에서 생기는 IME 버그</li>
</ol>
</blockquote>
<p>1. iTunes 를 실행시킬 때마다 &#8220;iTunes 가 제대로 설치되지 않았습니다. CD 에서 가져오거나 굽기 위해선 iTunes 를 다시 설치하셔야 합니다.&#8221; 라는 에러창이 뜬다. 검색을 해보니 나만의 문제는 아닌 것 같고, apple discussion 에 관련된 쓰레드도 열려있다.</p>
<p>그냥 경고창이 뜨는 것 외에 불편한 점은 없지만, 경고창을 더 이상 보고 싶지 않다면 <a href='http://www.gearsoftware.com/support/drivers.cfm'>gears software</a> 를 설치하면 된다. 단지 저게 뭐하는 건지 정확히는 모르겠음 -_-;</p>
<p><a href='http://discussions.apple.com/thread.jspa?messageID=5301862&#038;tstart=0'>http://discussions.apple....eID=5301862&#038;tstart=0</a></p>
<p>2. 내가 사용하고 있는 Fusion HDTV5 RT Lite 버젼의 64bit 드라이버가 아직 제공되고 있지 않다! Silver 버젼 드라이버는 제공하고 있는데 Lite 버젼 드라이버는 지원을 안하는 건 좀 아이러니가 아닌가 싶다. 같은 칩셋이면 드라이버도 대동소이할텐데&#8230;</p>
<p>게시판에 질문을 해봤더니 RT Lite 에는 상위 버젼과 다른 칩셋이 들어가 있고, 칩셋 제조사에서 드라이버를 제공하지 않고 있기 때문에 64비트를 지원할 계획이 없다고 한다. 보상 판매등도 불가능하다고 하고, 기분이 좀 상한다.</p>
<p>3. 빵집을 설치하고 zip 파일에서 마우스 오른쪽 버튼을 누르면, &#8216;알아서 풀기&#8217;, &#8216;여기에 풀기&#8217; 등의 context menu 가 나타나야 하는데 64bit vista 에선 이게 동작을 하지 않는다. 그 외에 file association 이라거나 압축을 푸는 등엔 아무 문제가 없지만, 그래도 context menu 가 동작하질 않으니 약간 불편&#8230;</p>
<p>검색해본 바에 따르면 32bit vista 에서는 context menu 가 동작하지만 &#8216;알아서 풀기&#8217; 와 관련해서 문제가 있는 듯 싶다.</p>
<p>4. 빵집에서 context menu 가 동작하지 않는 관계로 7-zip 을 깔았다. 오픈소스니까 사용하는데 라이센스상의 문제도 없고, context menu 도 동작한다. 단 file association 이 동작하질 않는다. -_-; 그런 관계로 압축파일들에 아이콘들이 하나도 안붙어 나오는데 이거 미적으로 좀 안좋다.</p>
<p>아쉬운데로 빵집이랑 아이콘 연결을 해놓고, 7-zip 의 context menu 를 활용하기로 했다.</p>
<p>5. Tag&#038;Renamer 라는 id3 태그 정리 유틸이 동작하질 않는다. 헉헉! 이건 개발이 더이상 진행되지 않은지 좀 된 거 같은데, 이거 살짝 타격이다. -_-; id3 태그 정리용 소프트웨어를 새로 찾아봐야겠다.</p>
<p>6. 64bit IE7 용 flash plugin 이 없다. 하..하핫; 뭐 이건 좋아할 사람도 좀 있을 듯 -_-;; 비굴하게 32bit IE7 을 사용해야겠다. -_-;</p>
<p>7. 스타크래프트는 거의 정상적으로 동작하지만, 한글을 입력할 때 &#8216;preedit string&#8217; 관련된 버그가 있다. 한글을 입력하다가 특수문자나 숫자, 영어등을 입력하게 되면 마지막 글자가 복사되는 버그인데, 예를 들면 &#8216;원p쓰리 z&#8217; 를 입력했을 때 &#8216;원원쓰리리z&#8217; 와 같이 입력되는 버그&#8230; </p>
<p>오피스 2007 을 설치하면 거기에 딸려오는 입력기가 설치되면서 문제가 해결된다. 날개셋 입력기를 설치해도 같은 효과를 낼 수 있을지는 테스트해보지 않았음. (아마도 되지 않을까 싶은데&#8230;)</p>
<p>그 외에도 베틀넷 채팅 창에서 글자를 입력하는 박스에 흰색 테두리가 생기는데 실제 플레이 시에는 별 상관 없으니 패스</p>
<p>Program Files 등의 폴더에 있는 파일을 변경한다거나, 뭘 설치하려고 할 때마다 뭔가 확인을 요구하는 창이 뜨는데, 이런 걸 보면 보안상으로 좀 신경을 쓴 거 같기는 하다. 하지만 조금 귀찮은 것도 사실&#8230;</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F589&rdate=2007-09-15+12%3A49%3A24&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F589&rdate=2007-09-15+12%3A49%3A24&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>6/11/2007 -- <a href="http://b.mytears.org/2007/06/548" title="Trojan: VBS/Autorun.B">Trojan: VBS/Autorun.B (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/09/589/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mail.app: apple 다운 배려…</title>
		<link>http://b.mytears.org/2007/09/586</link>
		<comments>http://b.mytears.org/2007/09/586#comments</comments>
		<pubDate>Mon, 10 Sep 2007 15:35:36 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mail.app]]></category>
		<category><![CDATA[quote]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/09/586</guid>
		<description><![CDATA[<p></p>
<p>오늘 받은 이메일 중 답장을 보내드려야할만한 내용이 있어서 &#8216;답장&#8217; 버튼을 클릭했다. 흠? 근데 이상하게 메일의 일부만이 인용되어 있는 모습?</p>
<p>확인을 해보니 메일의 일부 내용을 선택한 뒤 &#8216;답장&#8217; 버튼을 누르게 되면 내가 선택한 텍스트만이 인용된 상태로 답장을 작성할 수 있는 기능이 탑재되 있는 것이었다!! 지금까진 그냥 &#8216;답장&#8217; 버튼을 누르고 일부 내용을 제외한 나머지는 수동으로 지워왔는데 이젠 그럴 ...</p>
<p><a href='http://b.mytears.org/2007/09/586'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>6/25/2006 -- <a href="http://b.mytears.org/2006/06/355" title="mail.app plugin: letterbox">mail.app plugin: letterbox (3)</a></li><li>2/12/2007 -- <a href="http://b.mytears.org/2007/02/494" title="photobooth 놀이&#8230;">photobooth 놀이&#8230; (5)</a></li><li>8/20/2006 -- <a href="http://b.mytears.org/2006/08/374" title="Apple FontTools">Apple FontTools (2)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F586&rdate=2007-09-11+00%3A35%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F586&rdate=2007-09-11+00%3A35%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p><img src='/wp-content/upload/applemail.png' /></p>
<p>오늘 받은 이메일 중 답장을 보내드려야할만한 내용이 있어서 &#8216;답장&#8217; 버튼을 클릭했다. 흠? 근데 이상하게 메일의 일부만이 인용되어 있는 모습?</p>
<p>확인을 해보니 메일의 일부 내용을 선택한 뒤 &#8216;답장&#8217; 버튼을 누르게 되면 내가 선택한 텍스트만이 인용된 상태로 답장을 작성할 수 있는 기능이 탑재되 있는 것이었다!! 지금까진 그냥 &#8216;답장&#8217; 버튼을 누르고 일부 내용을 제외한 나머지는 수동으로 지워왔는데 이젠 그럴 필요가 없을 듯&#8230;</p>
<p>아웃룩이나 썬더버드 등에도 있는 기능일지 모르겠지만, 하여튼 apple 제품을 사용하다보면 이런 작은 것들에 감동을 받을 때가&#8230;</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F586&rdate=2007-09-11+00%3A35%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F09%2F586&rdate=2007-09-11+00%3A35%3A36&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>6/25/2006 -- <a href="http://b.mytears.org/2006/06/355" title="mail.app plugin: letterbox">mail.app plugin: letterbox (3)</a></li><li>2/12/2007 -- <a href="http://b.mytears.org/2007/02/494" title="photobooth 놀이&#8230;">photobooth 놀이&#8230; (5)</a></li><li>8/20/2006 -- <a href="http://b.mytears.org/2006/08/374" title="Apple FontTools">Apple FontTools (2)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>3/20/2008 -- <a href="http://b.mytears.org/2008/03/639" title="exim 으로 메일 서버 구성하기&#8230;">exim 으로 메일 서버 구성하기&#8230; (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/09/586/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>소스 공개: yuvplayer</title>
		<link>http://b.mytears.org/2007/07/560</link>
		<comments>http://b.mytears.org/2007/07/560#comments</comments>
		<pubDate>Sun, 15 Jul 2007 13:29:23 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[mfc]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[visual studio 2005]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[yuv420]]></category>
		<category><![CDATA[yuv422]]></category>
		<category><![CDATA[yuv444]]></category>
		<category><![CDATA[yuvplayer]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/07/560</guid>
		<description><![CDATA[<p>예전 포스트에서 얘기한 적이 있던 제 yuvplayer 를 svn repository 에 추가했습니다. 관심이 있으신 분은 아래 링크를 따라가보시면 되겠네요.</p>
<p>http://trac.unfix.net/browser/yuvplayer</p>
<p>사실 한 달쯤 전에 올려뒀는데, 제 svn repository 는 저조차 잘 가보질 않기 때문에 아무도 몰랐을거라 생각합니다;; 흐흣~ Mac 용 버젼도 있는데, 이건 아직 넣고 싶은 기능들 중 구현을 안한 것들이 많아서 추가해두지 않았습니다. </p>
<p>visual studio 2005 ...</p>
<p><a href='http://b.mytears.org/2007/07/560'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>6/9/2007 -- <a href="http://b.mytears.org/2007/06/544" title="YUVplayer for MS Windows">YUVplayer for MS Windows (6)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F560&rdate=2007-07-15+22%3A29%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F560&rdate=2007-07-15+22%3A29%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>예전 포스트에서 얘기한 적이 있던 제 yuvplayer 를 svn repository 에 추가했습니다. 관심이 있으신 분은 아래 링크를 따라가보시면 되겠네요.</p>
<p><a href='http://trac.unfix.net/browser/yuvplayer'>http://trac.unfix.net/browser/yuvplayer</a></p>
<p>사실 한 달쯤 전에 올려뒀는데, 제 svn repository 는 저조차 잘 가보질 않기 때문에 아무도 몰랐을거라 생각합니다;; 흐흣~ Mac 용 버젼도 있는데, 이건 아직 넣고 싶은 기능들 중 구현을 안한 것들이 많아서 추가해두지 않았습니다. </p>
<p>visual studio 2005 기반으로 작업하다보니 프로젝트 파일등이 모두 vs2005 용이네요. 하여튼 uyuv, yuv444, yuv422, yuv420 등으로 된 파일을 플레이할 수 있고, 마우스 오른쪽 버튼을 누른 후 현재 프레임을 다른 포멧으로 저장하는 것도 가능합니다.</p>
<p>관련 포스트:<br />
mac 버젼 &#8211; <a href='http://b.mytears.org/2007/06/541'>http://b.mytears.org/2007/06/541</a><br />
windows 버젼 &#8211; <a href='http://b.mytears.org/2007/06/544'>http://b.mytears.org/2007/06/544</a></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F560&rdate=2007-07-15+22%3A29%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F560&rdate=2007-07-15+22%3A29%3A23&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>6/9/2007 -- <a href="http://b.mytears.org/2007/06/544" title="YUVplayer for MS Windows">YUVplayer for MS Windows (6)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/07/560/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AMD cool’n quiet</title>
		<link>http://b.mytears.org/2007/07/556</link>
		<comments>http://b.mytears.org/2007/07/556#comments</comments>
		<pubDate>Tue, 03 Jul 2007 16:10:01 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[athlon64 X2]]></category>
		<category><![CDATA[cool\'n quiet]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[energy]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[scaling]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/07/556</guid>
		<description><![CDATA[<p>제가 사용하는 AMD Athlon64X2 의 경우 cool&#8217;n quiet 가 지원되는 것으로 알고 있는데, cpu 사용량이 적을 경우 자동으로 cpu clock 이 떨어지는 지를 확인해보고 싶어졌습니다. 그래서 AMD 사이트에서 power monitor 를 받은 후 확인해보니 이게 왠 일 -_-! 아래 스크린샷에서처럼 2.5Ghz 로 고정되어 전혀 변동이 없더군요. </p>
<p></p>
<p>이래저래 테스트를 해보고 안 사실이지만 제어판의 전력관리 옵션에서 &#8216;가정용/사무실용&#8217; ...</p>
<p><a href='http://b.mytears.org/2007/07/556'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F556&rdate=2007-07-04+01%3A10%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F556&rdate=2007-07-04+01%3A10%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>제가 사용하는 AMD Athlon64X2 의 경우 cool&#8217;n quiet 가 지원되는 것으로 알고 있는데, cpu 사용량이 적을 경우 자동으로 cpu clock 이 떨어지는 지를 확인해보고 싶어졌습니다. 그래서 AMD 사이트에서 power monitor 를 받은 후 확인해보니 이게 왠 일 -_-! 아래 스크린샷에서처럼 2.5Ghz 로 고정되어 전혀 변동이 없더군요. </p>
<p><img src='/wp-content/upload/pmonitor_home.png' /></p>
<p>이래저래 테스트를 해보고 안 사실이지만 제어판의 전력관리 옵션에서 &#8216;가정용/사무실용&#8217; 으로 해놓은 경우 cpu 사용량에 따라 clock 이 자동으로 조절이 되지 않습니다. 노트북이 아니더라도 전력관리 옵션을 &#8216;휴대용/랩탑&#8217; 으로 바꿔줘야지만이 cool&#8217;n quiet 가 적용되게 되네요.</p>
<p><img src='/wp-content/upload/pmonitor_laptop.png' /></p>
<p>TV (HDTV 도 마찬가지) 를 볼 때나 동영상을 틀어놨을 때는 cpu 사용량이 많지 않다보니 거의 1Ghz 로 고정되어 있습니다. 웹서핑을 할 때도 페이지가 로딩되는 시점 정도에서만 잠깐잠깐 클럭이 높아지고 평소에는 거의 최저 클럭으로 고정됩니다. 아무래도 전압이 작게 걸리는 만큼 열도 덜 나고, 전기도 덜 먹지 않을까 싶네요. 흐흐</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F556&rdate=2007-07-04+01%3A10%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F07%2F556&rdate=2007-07-04+01%3A10%3A01&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1222" title="블로그 업데이트 완료!">블로그 업데이트 완료! (11)</a></li><li>1/24/2009 -- <a href="http://b.mytears.org/2009/01/1211" title="Cairo test&#8230;">Cairo test&#8230; (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/07/556/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Trojan: VBS/Autorun.B</title>
		<link>http://b.mytears.org/2007/06/548</link>
		<comments>http://b.mytears.org/2007/06/548#comments</comments>
		<pubDate>Mon, 11 Jun 2007 03:40:22 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[autorun]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[trojan]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/06/548</guid>
		<description><![CDATA[<p>평소와 다름 없이 Filezilla 를 실행시키고, 몇 가지 작업을 하려고 보니 이게 왠걸&#8230; 모든 드라이브 루트에 autorun 으로 시작되는 수 많은 파일들이 있는게 아닙니까! filezilla server 를 띄워놓았기 때문에 ftp 를 통해서 누군가 접근한게 아닌가 싶었지만 ftp 로 접근할 수 없는 드라이브에도 똑같은 파일들이 존재하는 것으로 보아 바이러스/트로이목마 에 감염된게 아닌가 의심이 들더군요. 검색을 해보니 ...</p>
<p><a href='http://b.mytears.org/2007/06/548'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/10/2009 -- <a href="http://b.mytears.org/2009/02/1460" title="PC를 다운시키는 2090 바이러스?">PC를 다운시키는 2090 바이러스? (3)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/589" title="Microsoft Windows Vista Home Premium 64bit edition">Microsoft Windows Vista Home Premium 64bit edition (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F548&rdate=2007-06-11+12%3A40%3A22&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F548&rdate=2007-06-11+12%3A40%3A22&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>평소와 다름 없이 Filezilla 를 실행시키고, 몇 가지 작업을 하려고 보니 이게 왠걸&#8230; 모든 드라이브 루트에 autorun 으로 시작되는 수 많은 파일들이 있는게 아닙니까! filezilla server 를 띄워놓았기 때문에 ftp 를 통해서 누군가 접근한게 아닌가 싶었지만 ftp 로 접근할 수 없는 드라이브에도 똑같은 파일들이 존재하는 것으로 보아 바이러스/트로이목마 에 감염된게 아닌가 의심이 들더군요. 검색을 해보니 역시나 트로이목마 였습니다.</p>
<p>이 바이러스에 걸리게 될 경우 주기적으로 모든 드라이브의 루트에 autorun 과 관련된 파일을 생성시키게 되는데, 요새는 usb 드라이브를 이용해서 파일을 주고 받는 일이 많다보니 usb 드라이브를 통해 이 트로이목마에 감염될 확률이 굉장히 높습니다.</p>
<p>v3 2007 에서는 잡아내지를 못하는 것 같고. 캐스퍼나 f-prot 에서는 잘 찾아내네요. 백신 혐오증이 있으신 분들이라면 c:\windows\system32 폴더에서 autorun 으로 시작하는 모든 파일을 제거하시고, (거기 그런 파일이 있을 이유가 없으니 다 지워도 될 것 같습니다.) 다른 드라이브 루트에 있는 autorun.* 파일도 제거하시면 됩니다. </p>
<p>단 내 컴퓨터에서 c:, d: 같은 드라이브를 더블클릭해서 열 경우 autorun 이 실행되기 때문에 system32 폴더에 있는 파일을 지운 후라도 다시 감염이 될 수 있습니다. -_-; 꼭 마우스 오른쪽 버튼을 누르신 후 &#8216;탐색&#8217; 을 선택하시기 바랍니다. </p>
<p>또 이 트로이목마에 감염되어 있을 경우 &#8216;숨김파일 표시&#8217; 옵션을 키더라도 autorun 파일이 보이질 않습니다. Filezilla 의 탐색기나 Nero 의 탐색기 등을 이용할 경우에는 파일이 제대로 표시되므로 이런 프로그램들을 이용하시면 간단히 트로이목마에 감염되었는지 여부를 알 수 있겠네요.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F548&rdate=2007-06-11+12%3A40%3A22&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F548&rdate=2007-06-11+12%3A40%3A22&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>2/10/2009 -- <a href="http://b.mytears.org/2009/02/1460" title="PC를 다운시키는 2090 바이러스?">PC를 다운시키는 2090 바이러스? (3)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/589" title="Microsoft Windows Vista Home Premium 64bit edition">Microsoft Windows Vista Home Premium 64bit edition (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/06/548/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>이쁜 아이콘 배포 사이트~</title>
		<link>http://b.mytears.org/2007/06/547</link>
		<comments>http://b.mytears.org/2007/06/547#comments</comments>
		<pubDate>Sun, 10 Jun 2007 04:41:03 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[open]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/06/547</guid>
		<description><![CDATA[<p></p>
<p>Silk Icons: http://www.famfamfam.com/lab/icons/silk/ </p>
<p>Intefrace Lift: http://interfacelift.com/ </p>
<p></p>
<p>Silk Icon 은 Creative Commons Attribution 2.5 License 로 배포되고 있는 16&#215;16 아이콘으로 애플리케이션의 툴바라거나 웹페이지 버튼으로 쓰기 적당한 아이콘들 이다. 사용료는 $0.0 지만 굉장히 높은 퀄리티를 가지고 있기 때문에 활용도는 상당히 높을 것 같다.</p>
<p>그리고 Interface Lift 는 Mac OS X 와 MS Windows 용 고품질 아이콘들을 구할 수 ...</p>
<p><a href='http://b.mytears.org/2007/06/547'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>6/10/2007 -- <a href="http://b.mytears.org/2007/06/545" title="더 멋져진 Visual Studio 2005!!">더 멋져진 Visual Studio 2005!! (4)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F547&rdate=2007-06-10+13%3A41%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F547&rdate=2007-06-10+13%3A41%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<ol>
<li>Silk Icons: <a href='http://www.famfamfam.com/lab/icons/silk/'>http://www.famfamfam.com/lab/icons/silk/</a> </li>
<li>Intefrace Lift: <a href='http://interfacelift.com/'>http://interfacelift.com/</a> </li>
</ol>
<p><a href='http://www.famfamfam.com/lab/icons/silk/'>Silk Icon</a> 은 <a href='http://creativecommons.org/licenses/by/2.5/'>Creative Commons Attribution 2.5 License</a> 로 배포되고 있는 16&#215;16 아이콘으로 애플리케이션의 툴바라거나 웹페이지 버튼으로 쓰기 적당한 아이콘들 이다. 사용료는 $0.0 지만 굉장히 높은 퀄리티를 가지고 있기 때문에 활용도는 상당히 높을 것 같다.</p>
<p>그리고 Interface Lift 는 Mac OS X 와 MS Windows 용 고품질 아이콘들을 구할 수 있는 곳! Mac 용 <a href='http://interfacelift.com/icons-mac/details.php?id=1612'>VLC 아이콘</a>이나 <a href='http://interfacelift.com/icons-mac/details.php?id=1725'>Mplayer 아이콘</a>을 인터페이스 리프트에서 구한 아이콘으로 대체해버렸는데 굉장히 만족스럽다. 히힛</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F547&rdate=2007-06-10+13%3A41%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F547&rdate=2007-06-10+13%3A41%3A03&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/23/2009 -- <a href="http://b.mytears.org/2009/01/1181" title="공개 서체: 네이버 나눔고딕_코딩">공개 서체: 네이버 나눔고딕_코딩 (0)</a></li><li>1/16/2009 -- <a href="http://b.mytears.org/2009/01/1151" title="공개 서체들 소개&#8230;">공개 서체들 소개&#8230; (4)</a></li><li>9/13/2008 -- <a href="http://b.mytears.org/2008/09/673" title="공개 서체: 다음체">공개 서체: 다음체 (2)</a></li><li>11/13/2007 -- <a href="http://b.mytears.org/2007/11/615" title="CG: auto stitch">CG: auto stitch (1)</a></li><li>6/10/2007 -- <a href="http://b.mytears.org/2007/06/545" title="더 멋져진 Visual Studio 2005!!">더 멋져진 Visual Studio 2005!! (4)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/06/547/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>더 멋져진 Visual Studio 2005!!</title>
		<link>http://b.mytears.org/2007/06/545</link>
		<comments>http://b.mytears.org/2007/06/545#comments</comments>
		<pubDate>Sat, 09 Jun 2007 16:21:14 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/06/545</guid>
		<description><![CDATA[<p>YUVplayer 관련 글 에서 살짝 얘기를 했지만 Visual Studio 2005 를 잠시 사용해보니 개발자들의 편의를 위한 여러가지 기능들이 추가된 것 같다.</p>
<p>우선 IDE 에서 코드를 수정하게 되면 수정된 부분들은 아래와 같이 노란색으로 표시가 되는 기능이 추가되었다. 노란 표시는 파일을 Ctrl+S 등을 눌러 저장하기 전까지 유지 된다.</p>
<p></p>
<p></p>
<p>또한 파이어폭스 등의 웹브라우져로 인해 그 편리함을 입증한 탭 인터페이스도 추가가 ...</p>
<p><a href='http://b.mytears.org/2007/06/545'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/589" title="Microsoft Windows Vista Home Premium 64bit edition">Microsoft Windows Vista Home Premium 64bit edition (2)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F545&rdate=2007-06-10+01%3A21%3A14&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F545&rdate=2007-06-10+01%3A21%3A14&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>YUVplayer 관련 글 에서 살짝 얘기를 했지만 Visual Studio 2005 를 잠시 사용해보니 개발자들의 편의를 위한 여러가지 기능들이 추가된 것 같다.</p>
<p>우선 IDE 에서 코드를 수정하게 되면 수정된 부분들은 아래와 같이 노란색으로 표시가 되는 기능이 추가되었다. 노란 표시는 파일을 Ctrl+S 등을 눌러 저장하기 전까지 유지 된다.</p>
<p><img src='/wp-content/upload/vs2005_changed.jpg' /></p>
<p><span id="more-545"></span></p>
<p>또한 파이어폭스 등의 웹브라우져로 인해 그 편리함을 입증한 탭 인터페이스도 추가가 되었다. 좀 전에 수정하던 파일을 다시 열기 위해 Window 메뉴를 뒤적거린다거나 File Browser 를 선택하는 일은 이제 없을 듯 싶다.</p>
<p><img src='/wp-content/upload/vs2005_tab.jpg' /></p>
<p>게다가 vi 에서처럼 세로나 가로 방향 윈도우 분할 기능까지! 난 학교에서 와이드 모니터를 사용하고 있기 때문에 윈도우 분할 기능은 정말 축복이 아닐 수 없다. 다른 탭 그룹으로의 이동은 드래그 앤 드롭을 통해 가능하다.</p>
<p><img src='/wp-content/upload/vs2005_vsplit.jpg' /></p>
<p>남의 소스를 본다거나 오래 전에 손을 놨던 소스를 다시 볼 경우 유용하게 사용할 수 있는 caller graph 와 code definition window 또한 정말 멋진 기능들이 아닐 수 없다. code definition window 를 띄워놓게 될 경우 현재 캐럿이 가리키고 있는 function, macro, variable 등의 정의를 바로바로 확인할 수 있으므로 프로그램을 짜는 입장에선 정말 도움이 많이 되는 것 같다. (특히 남의 코드를 이용하는 경우)</p>
<p><img src='/wp-content/upload/vs2005_code_def.jpg' /></p>
<p>또 Caller graph, Call graph 를 이용하게 되면 누가 이 함수를 호출하는지 혹은 이 함수에서 어떤 함수들이 호출되는 지에 대한 그래프를 얻을 수 있기 때문에 전체적인 계층 구조를 파악하는데 상당한 도움을 얻을 수 있다.</p>
<p><img src='/wp-content/upload/vs2005_call_graph.jpg' /></p>
<p>아래 스크린샷은 개선된 Class view!! VS6.0 에서는 클래스의 멤버 변수/함수들이 트리구조로 표시되었던 데 반해 VS2005 에선 어떤 Class 를 상속해서 이 클래스가 만들어져있는지에 대한 구조를 표시하고, 특정 클래스를 선택하게 되면 그 멤버 변수/함수 들을 표시하는 뷰가 나타나게 된다.</p>
<p><img src='/wp-content/upload/vs2005_class_view.jpg' /></p>
<p>다음은 ctrl+w 를 눌러도 나타나지 않아 당황스러웠던 Class Wizard 와 관련된 것들을 살펴보자. VS6.0 에서 어떤 메시지에 대한 핸들러를 추가하기 위해서는 Class Wizard 를 띄운뒤 원하는 메시지를 찾아서 Add Function 을 해줘야 했지만 이제는 Class view 에서 메시지 핸들러를 추가할 클래스를 선택하고 오른쪽에 있는 Properties 를 통해 메시지 핸들러를 추가하면 된다.</p>
<p><img src='/wp-content/upload/vs2005_property.jpg' /></p>
<p>다이알로그와 관련된 속성을 조정할 때도 마찬가지&#8230; </p>
<p><img src='/wp-content/upload/vs2005_dialog_property.jpg'  /></p>
<p>마지막으로 나같은 결벽증이 있는 사람을 위한 인덴트 조절용 아이콘까지~!</p>
<p><img src='/wp-content/upload/vs2005_toolbar.jpg' /></p>
<p>예전에 Microsoft 에서 Bolland C++ Builder 의 핵심 개발자들을 Visual Studio 팀으로 데려갔다는 얘기를 들은 것 같은데, 확실히 C++ Builder 와 비슷한 것 같기도 하지만 하여튼 개발자들의 편의를 위한 기능들이 대거 추가된 것 같다.</p>
<p>아래는 이런 저런 기능들을 켜둔 전체 스크린 샷~!!</p>
<p><a href='/wp-content/upload/vs2005.jpg'><img src='/wp-content/upload/thumb-vs2005.jpg' /></a></p>
<p>문제는 내가 집에서 쓰고 있는 밥통2500+ 에서 반응들이 살짝 살짝 느리다는거&#8230; 이거이거 이쁘고 편리하긴 한데 몇 가지 기능들은 상당히 무겁다. ㅠ_ㅠ</p>
<p>그래도 손에 익고 나니 버릴 수 없는 기능이 너무 많다.</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F545&rdate=2007-06-10+01%3A21%3A14&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F545&rdate=2007-06-10+01%3A21%3A14&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1228" title="번역: 한국의 홈브류 인터넷">번역: 한국의 홈브류 인터넷 (0)</a></li><li>10/25/2007 -- <a href="http://b.mytears.org/2007/10/610" title="오픈웹과 관련해서&#8230;">오픈웹과 관련해서&#8230; (4)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/591" title="64bit Windows Vista 와 신한은행&#8230;">64bit Windows Vista 와 신한은행&#8230; (13)</a></li><li>9/15/2007 -- <a href="http://b.mytears.org/2007/09/589" title="Microsoft Windows Vista Home Premium 64bit edition">Microsoft Windows Vista Home Premium 64bit edition (2)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/06/545/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>YUVplayer for MS Windows</title>
		<link>http://b.mytears.org/2007/06/544</link>
		<comments>http://b.mytears.org/2007/06/544#comments</comments>
		<pubDate>Sat, 09 Jun 2007 14:29:55 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[mfc]]></category>
		<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[uyuv]]></category>
		<category><![CDATA[yuv]]></category>
		<category><![CDATA[yuv420]]></category>
		<category><![CDATA[yuv422]]></category>
		<category><![CDATA[yuv444]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/06/544</guid>
		<description><![CDATA[<p>지난 이틀간 작업한 내 YUVPlayer for windows~! MFC + OpenGL 기반으로 작성되었고, 정말 아무 문제 없이 사용할 수 있을만큼 완성도 높게 작업해보기는 처음이 아닐까 싶다. (CUI 기반으로는 공개를 하고 있지는 않았지만 혼자 유용하게 쓰는게 몇 가지 있는데&#8230; GUI 기반으로는 정말 처음인 것 같다.)</p>
<p>단축키를 통해 모든 액션을 취할 수 있고, 드래그앤 드롭을 통한 파일 오픈 또한 ...</p>
<p><a href='http://b.mytears.org/2007/06/544'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li><li>9/4/2006 -- <a href="http://b.mytears.org/2006/09/396" title="wordpress: korean trackback!">wordpress: korean trackback! (22)</a></li><li>1/6/2006 -- <a href="http://b.mytears.org/2006/01/312" title="php: mytrz-Gallery">php: mytrz-Gallery (5)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F544&rdate=2007-06-09+23%3A29%3A55&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F544&rdate=2007-06-09+23%3A29%3A55&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>지난 이틀간 작업한 내 YUVPlayer for windows~! MFC + OpenGL 기반으로 작성되었고, 정말 아무 문제 없이 사용할 수 있을만큼 완성도 높게 작업해보기는 처음이 아닐까 싶다. (CUI 기반으로는 공개를 하고 있지는 않았지만 혼자 유용하게 쓰는게 몇 가지 있는데&#8230; GUI 기반으로는 정말 처음인 것 같다.)</p>
<p>단축키를 통해 모든 액션을 취할 수 있고, 드래그앤 드롭을 통한 파일 오픈 또한 가능하다. 게다가 _lseeki64 같이 64bit offset 을 사용하는 시스템 콜을 사용하고 있기 때문에 2GB 를 넘어가는 파일들도 문제 없이 플레이가 가능하다. (31GB 짜리 파일도 문제 없이 플레이가 가능한 것을 확인했음.)</p>
<p><img src='/wp-content/upload/yuvplayer.jpg' /></p>
<p>위 스크린 샷은 기본적인 플레이 화면! CBitmapButton 을 통해 이쁜 플레이어 버튼을 만들었고, 여러가지 편법을 통해 &#8211;;; 사이즈가 조절되더라도 저 레이아웃이 그대로 유지되도록 만들었다.</p>
<p><span id="more-544"></span></p>
<p><img src='/wp-content/upload/yuvplayer_open.jpg' /></p>
<p>File 메뉴에서는 YUV file 을 열거나 원하는 프레임으로 가는 등의 동작이 가능하다.</p>
<p><img src='/wp-content/upload/yuvplayer_go.jpg' /></p>
<p>File 메뉴에 있는 Go 버튼을 누르거나 단축키 &#8216;g&#8217; 를 누르게 되면 위와 같은 창이 뜨게 되는데&#8230; frame no 필드에는 기본적으로 현재 플레이되고 있는 프레임 번호가 입력되어 있도록 만들었고, 저기에 원하는 프레임 번호를 입력하게 되면 바로 점프가 가능하다.</p>
<p><img src='/wp-content/upload/yuvplayer_cmenu.jpg' /></p>
<p>이건 마우스 오른쪽 버튼을 누르면 나오게 되는 컨텍스트 메뉴! 현재 보고 있는 프레임을 파일로 저장할 수 있는 메뉴들을 제공하고 있다. Luminance 성분은 raw 포멧, YUV* 은 YUV 포멧, RGB 는 32bit BMP 포멧으로 저장된다. </p>
<p><img src='/wp-content/upload/yuvplayer_size.jpg' /></p>
<p>yuv file 은 header 가 없이 데이타만 주루룩 들어가 있는 형태이기 때문에 size 를 알 수가 없으므로 직접 사이즈를 지정해줘야 하는데, 기본 사이즈는 내가 제일 많이 사용하게 될 듯한 CIF (352&#215;288) 사이즈로 지정해두었고, s(SD: 720&#215;480), h(HD: 1920&#215;1080), c(CIF: 352&#215;288), q(QCIF: 176&#215;144), u(Custum) 등의 단축키를 통해 다른 사이즈로도 쉽게 변경할 수 있도록 만들었다.</p>
<p><img src='/wp-content/upload/yuvplayer_custum.jpg' /></p>
<p>위에 나열해놓은 기본 사이즈가 아니더라도 Custum Size 를 입력할 수 있는 메뉴 또한 준비되어 있다.</p>
<p><img src='/wp-content/upload/yuvplayer_color.jpg' /></p>
<p>color format 또한 yuv444, yuv422, yuv420, y(luminance only) 등의 포멧을 지원한다. -_-v</p>
<p><img src='/wp-content/upload/yuvplayer_zoom.jpg' /></p>
<p>2배 확대, 1/2 축소 등의 기능까지도 제공 -_-v</p>
<p>학부 시절 &#8216;게임 프로그래밍&#8217; 과목 수강 이후 오랫만에 MFC + openGL 프로그래밍이다보니 가끔 헤매기도 했지만, 잘 설계된 openGL 덕에 기능을 추가하는 것이 쉽게 쉽게 이루어지지 않았나 싶다.</p>
<p>툴도 Visual Studio 2005 로 갈아탔는데, 확실히 여러 면으로 IDE 가 진보했음을 느낄 수 있었다. 다만 Visual Stuido 2005 이거이거 꽤 무거운거 같다. Class Wizard 가 없어졌기 때문에 조금 혼란스럽기도 하지만 뭐 Code Definition Window 등 새로 추가된 기능들은 이런 점을 보완해주고도 남는 듯&#8230;</p>
<p>MFC 는 (지금도 잘 모르지만) 거의 초보였는데 요번 프로그램을 통해 좀 자신감이 붙는 것 같다. 원하는 기능을 구현하기 위해 어떤 검색어를 넣으면 될 지에 대한 노하우도 좀 생기는 것 같고, 하여튼 지난 이틀간 이 프로그램을 만들면서 참 재밌었던 것 같다.</p>
<p>이제 남은건 히스토그램을 그려주는 기능 뿐인가!!</p>
<p>다운로드:<br />
* <a href='http://trac.unfix.net/browser/yuvplayer'>http://trac.unfix.net/browser/yuvplayer</a></p>
<p>Change Log:<br />
2007년 7월 15일</p>
<ol>
<li>uyuv 포멧 지원 추가</li>
<li>소스 공개</li>
</ol>
<p>2008년 8월 2일</p>
<ol>
<li>::GetDC(hWnd) 후 ::ReleaseDC(hWnd,dc) 를 호출 하지 않아서 생기는 메모리 릭 제거</li>
<li>gdTexImage2D 를 반복 호출해서 생기게 되는 메모리 릭 제거</li>
</ol>
<p>p.s) Visual Studio 에서 만든 프로젝트는 버젼 관리 시스템등에 어떻게 넣어야할지 모르겠다. 하여튼 코드를 조금 더 정리하고, sourceforge 등에 오픈소스 프로젝트로 올려볼 생각!!</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F544&rdate=2007-06-09+23%3A29%3A55&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F544&rdate=2007-06-09+23%3A29%3A55&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li><li>9/4/2006 -- <a href="http://b.mytears.org/2006/09/396" title="wordpress: korean trackback!">wordpress: korean trackback! (22)</a></li><li>1/6/2006 -- <a href="http://b.mytears.org/2006/01/312" title="php: mytrz-Gallery">php: mytrz-Gallery (5)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/06/544/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>OpenGL: texture vs glDrawPixels</title>
		<link>http://b.mytears.org/2007/06/542</link>
		<comments>http://b.mytears.org/2007/06/542#comments</comments>
		<pubDate>Mon, 04 Jun 2007 12:53:19 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[glDrawPixels]]></category>
		<category><![CDATA[glPixelZoom]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[texture]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/06/542</guid>
		<description><![CDATA[<p>openGL 을 사용해서 2D 이미지 데이타를 화면에 뿌려주는 방법은 대강 다음과 같이 세가지로 분류할 수 있는 것 같다.</p>
<p></p>
<p>glBegin(GL_POINTS); glColor3i(&#8230;);glVertex3d(x0,y0,0); &#8230;반복; glEnd();</p>
<p>texture 로 올려주고, 해당 texture 가 입혀진 quad 을 그려줌</p>
<p>glDrawPixels 를 이용</p>
<p></p>
<p>첫번째 방법이야 그냥 저렇게도 가능하다는거지 실제 저렇게 사용할 일은 없다고 생각되고, 실제 빠르게 화면에 2D 이미지를 그려주기 위해서는 2번째 방법이나 3번째 방법을 사용해야할텐데, 저 ...</p>
<p><a href='http://b.mytears.org/2007/06/542'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li><li>10/24/2007 -- <a href="http://b.mytears.org/2007/10/609" title="sql injection 을 피하기위한 간단한 방법&#8230;">sql injection 을 피하기위한 간단한 방법&#8230; (2)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F542&rdate=2007-06-04+21%3A53%3A19&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F542&rdate=2007-06-04+21%3A53%3A19&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>openGL 을 사용해서 2D 이미지 데이타를 화면에 뿌려주는 방법은 대강 다음과 같이 세가지로 분류할 수 있는 것 같다.</p>
<ol>
<li>glBegin(GL_POINTS); glColor3i(&#8230;);glVertex3d(x0,y0,0); &#8230;반복; glEnd();</li>
<li>texture 로 올려주고, 해당 texture 가 입혀진 quad 을 그려줌</li>
<li>glDrawPixels 를 이용</li>
</ol>
<p>첫번째 방법이야 그냥 저렇게도 가능하다는거지 실제 저렇게 사용할 일은 없다고 생각되고, 실제 빠르게 화면에 2D 이미지를 그려주기 위해서는 2번째 방법이나 3번째 방법을 사용해야할텐데, 저 중에 어떤 걸 사용하는게 더 좋은 방법인지 확신이 들질 않는다.</p>
<p>우선 화면이 확대되었을 때 texture 를 사용할 경우 GL_LINEAR 등의 기본으로 제공되는 interpolation method 들이 있기 때문에 (약간 Blur 된 결과일지는 모르지만) 더 좋은 품질의 이미지를 얻을 수 있겠고, 화면이 다시 그려질 일이 있을 때 texture 데이타가 다시 전송될 필요가 없다는 장점이 있는 듯 싶지만, (texture 로 등록할 때 이미지 데이타는 비디오 메모리로 옮겨진다.) width 나 height 가 2^x 형태로 표현되어야 한다는 제약이 있다. 이게 만약 이미지가 크지 않다면 큰 문제가 되지 않겠지만 만약 HD Sequence 라면? 1920&#215;1080 을 표현하기 위해 2048&#215;2048 = 4MB 를 사용해야 하므로 반 정도의 공간이  낭비될 수밖에 없다. </p>
<p>glDrawPixels 는 다시 화면을 그려줘야할 때마다 이미지 데이타를 메인메모리->비디오메모리 로 복사해줘야 하는 문제가 있지만 만약 동영상 플레이어등을 만들 때 처럼 빠르게 화면이 전환되는 경우라면 이는 큰 문제가 되지 않을 듯 싶기는 하다. 물론 화면이 멈춰있는 상태라면 얘기가 다를 지 모르겠다. 또 이미지를 실제 크기보다 더 크게 표현할 경우 glPixelZoom 을 이용해 간단히 구현할 수 있지만 실제로는 픽셀 크기만 커지는 효과이지 interpolation 은 일어나지 않으므로 화질은 texture 를 사용할 때에 비해 떨어진다고 할 수 있을 듯&#8230; </p>
<p>뭐 하튼 뭘 사용하는게 더 좋은건지 인터넷을 열심히 찾아봤지만 뭐가 더 좋은지에 대한 정확한 답은 찾을 수가 없다. -_-!</p>
<p>p.s) yuv2rgb 변환 같은 것은 cg 를 이용해서 처리할 수 있는 것 같은데&#8230; 이 경우 texture 를 사용해야지만 가능 한 듯&#8230; </p>
<p>openGL 에 이미 4&#215;4 matrix multiplication 은 구현되어 있으므로 color_matrix 를 사용해서 yuv2rgb 변환을 빨리할 수 있지 않을까 하는 생각도 해봤지만 실제 결과는 참담&#8230;</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F542&rdate=2007-06-04+21%3A53%3A19&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F542&rdate=2007-06-04+21%3A53%3A19&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li><li>10/24/2007 -- <a href="http://b.mytears.org/2007/10/609" title="sql injection 을 피하기위한 간단한 방법&#8230;">sql injection 을 피하기위한 간단한 방법&#8230; (2)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/06/542/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>내 첫 cocoa application: yuv player</title>
		<link>http://b.mytears.org/2007/06/541</link>
		<comments>http://b.mytears.org/2007/06/541#comments</comments>
		<pubDate>Mon, 04 Jun 2007 11:13:27 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[macintosh]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[yuv]]></category>
		<category><![CDATA[yuvplayer]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/06/541</guid>
		<description><![CDATA[<p>저번 주에 개인적으로 de-interlacing 관련된 발표를 준비하느라 논문에 있는 de-interlacing 기법들을 구현해서 실험을 했었는데, 맥에서 돌아가는 yuv player 를 못찾는 바람에 결과는 윈도우로 옮겨서 확인해야하는 불편이 있었다.</p>
<p>랩에 이미 충분히 쓸만한 yuvplayer 가 있기는 하지만 윈도우 전용이고, 내가 예전 신입생 과제를 하면서 만들었던 플레이어 역시 윈도우용;; 뭐 하튼 플레이어를 구현하는데 필요한 기반 테크닉은 다 갖추고 있었기 ...</p>
<p><a href='http://b.mytears.org/2007/06/541'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>6/9/2007 -- <a href="http://b.mytears.org/2007/06/544" title="YUVplayer for MS Windows">YUVplayer for MS Windows (6)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/542" title="OpenGL: texture vs glDrawPixels">OpenGL: texture vs glDrawPixels (2)</a></li><li>4/9/2009 -- <a href="http://b.mytears.org/2009/04/1912" title="제로보드 XE 관련 약간의 해명&#8230;">제로보드 XE 관련 약간의 해명&#8230; (1)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F541&rdate=2007-06-04+20%3A13%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F541&rdate=2007-06-04+20%3A13%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>저번 주에 개인적으로 de-interlacing 관련된 발표를 준비하느라 논문에 있는 de-interlacing 기법들을 구현해서 실험을 했었는데, 맥에서 돌아가는 yuv player 를 못찾는 바람에 결과는 윈도우로 옮겨서 확인해야하는 불편이 있었다.</p>
<p>랩에 이미 충분히 쓸만한 yuvplayer 가 있기는 하지만 윈도우 전용이고, 내가 예전 신입생 과제를 하면서 만들었던 플레이어 역시 윈도우용;; 뭐 하튼 플레이어를 구현하는데 필요한 기반 테크닉은 다 갖추고 있었기 때문에 MFC + OpenGL 로 구현해봤던 것을 똑같이 Cocoa+OpenGL 로 구현해봤다.</p>
<p><img src='/wp-content/upload/yuvplayer_mac.png' /></p>
<p>메뉴를 이용해서 size 와 color format, frame rate 등을 준비할 수 있도록 만들었는데, size 와 frame rate 를 사용자가 직접 입력하는 것은 귀찮은 관계로 나중에 -_-;;</p>
<p>뭐 하튼 Zoom 하고 Drag And Drop 과 관련된 코드만 추가하고 나면 내가 구현하고 싶었던 모든 기능이 다 들어가는 거 같다. (Zoom 이야 glPixelZoom 을 사용하면 한방에 오케이니 흐흣)</p>
<p>XCode + Interface Builder 를 이용한 첫 결과물인데, 굉장히 오래전에 이미 나와있던 프로그래밍 인터페이스인데도 불구하고 굉장히 편리하게 프로그래밍이 가능해서 감탄을 해버렸다. 물론 MS 진영도 Visual Studio 2005 로 오면서 편리한 기능들이 꽤 많이 추가되긴 했지만, GUI Application 을 만들기 위한 IDE 로는 XCode + 인터페이스 빌더 쪽이 한 수 위인 듯&#8230; </p>
<p>MFC 나 Cocoa 나 진입 장벽이 꽤 높지만&#8230; 기본적인 테크닉을 익히고 나면 굉장히 강력하게 사용이 가능한 것 같다. 그리고 C 에 능숙하다면 다른 언어를 접하는 데도 그리 큰 어려움을 느끼지 않는 것 같다. 학부 시절 C++, Java 등에 눈길을 뺐기지 않고 주력 언어로 C 를 선택했던 게 탁월한 선택이었던 듯&#8230;</p>
<p>p.s) 코드를 좀 정리하고 sourceforge 등에 자리를 틀어볼까 싶네요. :)</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F541&rdate=2007-06-04+20%3A13%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F06%2F541&rdate=2007-06-04+20%3A13%3A27&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>8/2/2008 -- <a href="http://b.mytears.org/2008/08/662" title="YUVPlayer 업데이트&#8230;">YUVPlayer 업데이트&#8230; (0)</a></li><li>6/9/2007 -- <a href="http://b.mytears.org/2007/06/544" title="YUVplayer for MS Windows">YUVplayer for MS Windows (6)</a></li><li>7/15/2007 -- <a href="http://b.mytears.org/2007/07/560" title="소스 공개: yuvplayer">소스 공개: yuvplayer (4)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/542" title="OpenGL: texture vs glDrawPixels">OpenGL: texture vs glDrawPixels (2)</a></li><li>4/9/2009 -- <a href="http://b.mytears.org/2009/04/1912" title="제로보드 XE 관련 약간의 해명&#8230;">제로보드 XE 관련 약간의 해명&#8230; (1)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/06/541/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>처음 짜본 wavelet transform…</title>
		<link>http://b.mytears.org/2007/05/537</link>
		<comments>http://b.mytears.org/2007/05/537#comments</comments>
		<pubDate>Mon, 28 May 2007 14:06:28 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[energy compaction]]></category>
		<category><![CDATA[histogram]]></category>
		<category><![CDATA[lena]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[wavelet]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/05/537</guid>
		<description><![CDATA[<p>화상처리기초 수업 과제 때문에 처음으로 wavelet transform 을 구현해보았습니다. 아래 이미지는 wavelet 으로 변환된 512&#215;512 사이즈의 lena</p>
<p></p>
<p>histogram 을 보면, 값들이 낮은 값들로 집중되어 있는걸 확인할 수 있습니다. 역시 이미지 압축을 위해 사용할만 하네요. ;) </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p> ...</p>
<p><a href='http://b.mytears.org/2007/05/537'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>10/24/2007 -- <a href="http://b.mytears.org/2007/10/609" title="sql injection 을 피하기위한 간단한 방법&#8230;">sql injection 을 피하기위한 간단한 방법&#8230; (2)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/542" title="OpenGL: texture vs glDrawPixels">OpenGL: texture vs glDrawPixels (2)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F537&rdate=2007-05-28+23%3A06%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F537&rdate=2007-05-28+23%3A06%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>화상처리기초 수업 과제 때문에 처음으로 wavelet transform 을 구현해보았습니다. 아래 이미지는 wavelet 으로 변환된 512&#215;512 사이즈의 lena</p>
<p><img src='/wp-content/upload/w_lena.jpg' /></p>
<p>histogram 을 보면, 값들이 낮은 값들로 집중되어 있는걸 확인할 수 있습니다. 역시 이미지 압축을 위해 사용할만 하네요. ;) </p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F537&rdate=2007-05-28+23%3A06%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F537&rdate=2007-05-28+23%3A06%3A28&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>10/24/2007 -- <a href="http://b.mytears.org/2007/10/609" title="sql injection 을 피하기위한 간단한 방법&#8230;">sql injection 을 피하기위한 간단한 방법&#8230; (2)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li><li>10/14/2007 -- <a href="http://b.mytears.org/2007/10/599" title="CG: Perspective Projection">CG: Perspective Projection (6)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/542" title="OpenGL: texture vs glDrawPixels">OpenGL: texture vs glDrawPixels (2)</a></li><li>6/4/2007 -- <a href="http://b.mytears.org/2007/06/541" title="내 첫 cocoa application: yuv player">내 첫 cocoa application: yuv player (5)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/05/537/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>재밌는 플래쉬 게임</title>
		<link>http://b.mytears.org/2007/05/524</link>
		<comments>http://b.mytears.org/2007/05/524#comments</comments>
		<pubDate>Fri, 04 May 2007 17:16:52 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/05/524</guid>
		<description><![CDATA[<p>플래쉬로 되어있는 간단한 게임입니다. 사자를 쓰러뜨리는게 최종 목표인데, 이래저래 좀 까다롭긴 하지만 재밌네요. 한시간동안 플레이해서 겨우 엔딩을 봤습니다. 캬캬캬캬</p>
<p>http://www.kotarogame.com/archives/53702998.html</p>
<p></p>
<p></p>
<p>스크린샷은 두가지 엔딩의 인증샷 ;) 흠 근데 두번째의 경우엔 사자한테 졌으니까 엔딩이라고 하기는 좀 그렇겠네요. &#8211;;;</p>
<p></p>
<p></p>
<p>두더지 클릭</p>
<p>코끼리 아래에 있는 상자 클릭</p>
<p>코끼리 클릭</p>
<p>아기 클릭</p>
<p>아기 클릭</p>
<p>줄이 끊어질 때까지 코끼리 클릭</p>
<p>코끼리 앞에 있는 동굴 입구랑 원숭이 아래있는 동굴 입구 클릭</p>
<p>코끼리 ...</p>
<p><a href='http://b.mytears.org/2007/05/524'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>11/25/2008 -- <a href="http://b.mytears.org/2008/11/748" title="Flash game: Light-bot">Flash game: Light-bot (0)</a></li><li>3/31/2009 -- <a href="http://b.mytears.org/2009/03/1871" title="재밌는 매쉬업 아이디어&#8230;">재밌는 매쉬업 아이디어&#8230; (4)</a></li><li>3/4/2009 -- <a href="http://b.mytears.org/2009/03/1678" title="NDSL용 동영상 인코딩하기!">NDSL용 동영상 인코딩하기! (1)</a></li><li>2/9/2009 -- <a href="http://b.mytears.org/2009/02/1438" title="곰티비 니네 이럴거야!?">곰티비 니네 이럴거야!? (0)</a></li><li>2/4/2009 -- <a href="http://b.mytears.org/2009/02/1375" title="컬투쇼 하일라이트&#8230;">컬투쇼 하일라이트&#8230; (0)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F524&rdate=2007-05-05+02%3A16%3A52&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F524&rdate=2007-05-05+02%3A16%3A52&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>플래쉬로 되어있는 간단한 게임입니다. 사자를 쓰러뜨리는게 최종 목표인데, 이래저래 좀 까다롭긴 하지만 재밌네요. 한시간동안 플레이해서 겨우 엔딩을 봤습니다. 캬캬캬캬</p>
<p><a href='http://www.kotarogame.com/archives/53702998.html'>http://www.kotarogame.com/archives/53702998.html</a></p>
<p><a href='/wp-content/upload/ending1.png'><img src='/wp-content/upload/thumb-ending1.png'  class='cimg' /></a><br />
<a href='/wp-content/upload/ending2.png'><img src='/wp-content/upload/thumb-ending2.png'  class='cimg' /></a></p>
<p>스크린샷은 두가지 엔딩의 인증샷 ;) 흠 근데 두번째의 경우엔 사자한테 졌으니까 엔딩이라고 하기는 좀 그렇겠네요. &#8211;;;<br />
<span id="more-524"></span></p>
<ol>
<li>두더지 클릭</li>
<li>코끼리 아래에 있는 상자 클릭</li>
<li>코끼리 클릭</li>
<li>아기 클릭</li>
<li>아기 클릭</li>
<li>줄이 끊어질 때까지 코끼리 클릭</li>
<li>코끼리 앞에 있는 동굴 입구랑 원숭이 아래있는 동굴 입구 클릭</li>
<li>코끼리 아래 움푹 파진 곳의 하얀 파이프 클릭</li>
<li>구름 위치에 맞춰서 맨 윗쪽 가운데 있는 하얀 파이프 클릭</li>
<li>곰 위쪽으로 나무에 가려진 하얀 파이프를 구름 위치에 맞춰서 클릭</li>
<li>회색 구름이 사자 머리를 지날 때 클릭</li>
<li>회색 구름이 해 옆에 높은 곳에 있는 시멘트 비스무리한거 위에 있을 때 클릭</li>
<li>곰 클릭</li>
<li>오른쪽 사과 클릭</li>
<li>곰 클릭</li>
<li>게 클릭</li>
<li>게 클릭</li>
<li>게 클릭</li>
<li>아기 클릭</li>
<li>아기 클릭</li>
<li>아기가 사과를 들고 있을때 재빨리 원숭이 클릭</li>
<li>아기 클릭</li>
<li>아기 공갈젖꼭지 클릭</li>
<li>두더지 클릭</li>
<li>아기 클릭</li>
<li>아기가 두더지 머리위에 있을때 아기 클릭</li>
<li>두더지 클릭</li>
<li>아기 클릭</li>
<li>코끼리 클릭</li>
<li>무지개가 사라지기 전에 아기 클릭</li>
<li>손 &#8211; 입 &#8211; 신발 순서로 아이템 선택</li>
<li>용 클릭</li>
<li>용이 아기 아래 있을 때 아기 클릭</li>
<li>천사의 손에 있는 검은색 공과 흰색 공 중에 맘에 드는거 클릭</li>
</ol><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F524&rdate=2007-05-05+02%3A16%3A52&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F05%2F524&rdate=2007-05-05+02%3A16%3A52&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>11/25/2008 -- <a href="http://b.mytears.org/2008/11/748" title="Flash game: Light-bot">Flash game: Light-bot (0)</a></li><li>3/31/2009 -- <a href="http://b.mytears.org/2009/03/1871" title="재밌는 매쉬업 아이디어&#8230;">재밌는 매쉬업 아이디어&#8230; (4)</a></li><li>3/4/2009 -- <a href="http://b.mytears.org/2009/03/1678" title="NDSL용 동영상 인코딩하기!">NDSL용 동영상 인코딩하기! (1)</a></li><li>2/9/2009 -- <a href="http://b.mytears.org/2009/02/1438" title="곰티비 니네 이럴거야!?">곰티비 니네 이럴거야!? (0)</a></li><li>2/4/2009 -- <a href="http://b.mytears.org/2009/02/1375" title="컬투쇼 하일라이트&#8230;">컬투쇼 하일라이트&#8230; (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/05/524/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>photobooth 놀이…</title>
		<link>http://b.mytears.org/2007/02/494</link>
		<comments>http://b.mytears.org/2007/02/494#comments</comments>
		<pubDate>Mon, 12 Feb 2007 04:06:54 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[photobooth]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/02/494</guid>
		<description><![CDATA[<p></p>
<p>얼마 전에 홍대 앞에서 듀트씨 맥북으로 찍은 사진입니다. 요새 유행하는 좌우대칭 놀이를 해봤는데 빛이 모잘라서 좀 노이즈가 끼긴 했지만 이거이거 생각보다 재밌네요~</p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>    </p>
<p>		Related Posts9/11/2007 -- mail.app: apple 다운 ...</p>
<p><a href='http://b.mytears.org/2007/02/494'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>9/11/2007 -- <a href="http://b.mytears.org/2007/09/586" title="mail.app: apple 다운 배려&#8230;">mail.app: apple 다운 배려&#8230; (1)</a></li><li>8/20/2006 -- <a href="http://b.mytears.org/2006/08/374" title="Apple FontTools">Apple FontTools (2)</a></li><li>6/25/2006 -- <a href="http://b.mytears.org/2006/06/355" title="mail.app plugin: letterbox">mail.app plugin: letterbox (3)</a></li><li>2/16/2009 -- <a href="http://b.mytears.org/2009/02/1536" title="유니바디 맥북 사용기&#8230;">유니바디 맥북 사용기&#8230; (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F02%2F494&rdate=2007-02-12+13%3A06%3A54&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F02%2F494&rdate=2007-02-12+13%3A06%3A54&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p><a href='/wp-content/upload/photobooth.jpg'><img src='/wp-content/upload/thumb-photobooth.jpg' class='cimg' /></a></p>
<p>얼마 전에 홍대 앞에서 <a href='http://mydeute.com'>듀트씨</a> 맥북으로 찍은 사진입니다. 요새 유행하는 좌우대칭 놀이를 해봤는데 빛이 모잘라서 좀 노이즈가 끼긴 했지만 이거이거 생각보다 재밌네요~</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F02%2F494&rdate=2007-02-12+13%3A06%3A54&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F02%2F494&rdate=2007-02-12+13%3A06%3A54&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>9/11/2007 -- <a href="http://b.mytears.org/2007/09/586" title="mail.app: apple 다운 배려&#8230;">mail.app: apple 다운 배려&#8230; (1)</a></li><li>8/20/2006 -- <a href="http://b.mytears.org/2006/08/374" title="Apple FontTools">Apple FontTools (2)</a></li><li>6/25/2006 -- <a href="http://b.mytears.org/2006/06/355" title="mail.app plugin: letterbox">mail.app plugin: letterbox (3)</a></li><li>2/16/2009 -- <a href="http://b.mytears.org/2009/02/1536" title="유니바디 맥북 사용기&#8230;">유니바디 맥북 사용기&#8230; (0)</a></li><li>1/28/2009 -- <a href="http://b.mytears.org/2009/01/1224" title="인터넷 뱅킹과 크로스 브라우징">인터넷 뱅킹과 크로스 브라우징 (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/02/494/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>matrix multiply with mmx #2</title>
		<link>http://b.mytears.org/2007/01/482</link>
		<comments>http://b.mytears.org/2007/01/482#comments</comments>
		<pubDate>Sat, 13 Jan 2007 15:49:11 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[mmx]]></category>
		<category><![CDATA[multiply]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[simd]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/01/482</guid>
		<description><![CDATA[<p></p>
<p>대강 생각을 해보니 정말 mmx 를 이용해서 빠르게 연산을 하려면 위와 같이 하는게 가장 빠르겠군요. 다만 레지스터를 많이 쓰고 완전히 asm 코딩을 해야한다는 게 조금 귀찮겠군요. ;)</p>
<p>위의 다이아그램에 있는 과정을 통해 4&#215;4 matrix * 4&#215;4 matrix 의 한 row 씩을 계산해낼 수 있습니다. 대강 계산했을 때 3배 이상의 속도 향상이 있을거라고 예상되던데 과연~</p>
<p></p>
<p>?View Code C#include ...</p>
<p><a href='http://b.mytears.org/2007/01/482'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/13/2007 -- <a href="http://b.mytears.org/2007/01/481" title="matrix multiply with mmx #1">matrix multiply with mmx #1 (3)</a></li><li>1/11/2007 -- <a href="http://b.mytears.org/2007/01/480" title="mmx">mmx (24)</a></li><li>8/30/2008 -- <a href="http://b.mytears.org/2008/08/666" title="메모리 복사 코드 최적화&#8230;">메모리 복사 코드 최적화&#8230; (1)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F01%2F482&rdate=2007-01-14+00%3A49%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F01%2F482&rdate=2007-01-14+00%3A49%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p><img src='/wp-content/upload/mmx_matrix_multiply.png' title='diagram for multiplying matrix with mmx' class='cimg' /></p>
<p>대강 생각을 해보니 정말 mmx 를 이용해서 빠르게 연산을 하려면 위와 같이 하는게 가장 빠르겠군요. 다만 레지스터를 많이 쓰고 완전히 asm 코딩을 해야한다는 게 조금 귀찮겠군요. ;)</p>
<p>위의 다이아그램에 있는 과정을 통해 4&#215;4 matrix * 4&#215;4 matrix 의 한 row 씩을 계산해낼 수 있습니다. 대강 계산했을 때 3배 이상의 속도 향상이 있을거라고 예상되던데 과연~</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p482code46'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p48246"><td class="code" id="p482code46"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;stdio .h&gt;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// A matrix</span>
<span style="color: #993333;">short</span> s1<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">2</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">3</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">4</span><span style="color: #339933;">,</span>
     <span style="color: #0000dd;">5</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">6</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">7</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">8</span><span style="color: #339933;">,</span>
     <span style="color: #0000dd;">9</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">10</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">11</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">12</span><span style="color: #339933;">,</span>
    <span style="color: #0000dd;">13</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">14</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">15</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">16</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Transpose(B matrix)</span>
<span style="color: #993333;">short</span> s2<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000dd;">17</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">21</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">25</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">29</span><span style="color: #339933;">,</span>
    <span style="color: #0000dd;">18</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">22</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">26</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">30</span><span style="color: #339933;">,</span>
    <span style="color: #0000dd;">19</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">23</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">27</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">31</span><span style="color: #339933;">,</span>
    <span style="color: #0000dd;">20</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">24</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">28</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">32</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">// Destination matrix</span>
<span style="color: #993333;">short</span> d<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">int</span> j<span style="color: #339933;">,</span> i<span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span> <span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">char</span><span style="color: #339933;">**</span> argv <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq (s1), %mm0&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm0, %mm1&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm0, %mm2&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;punpckhdq %mm2, %mm0&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;punpckldq %mm2, %mm1&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm0, %mm6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm1, %mm7&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq (s2), %mm2&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;mov $1, %eax&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq s2(,%eax,8), %mm4&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm2, %mm3&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;punpckhdq %mm4, %mm2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;punpckldq %mm4, %mm3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;pmaddwd %mm2, %mm0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;pmaddwd %mm3, %mm1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;paddw  %mm1, %mm0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm6, %mm1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm7, %mm2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;mov $2, %eax&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq s2(,%eax,8), %mm3&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;mov $3, %eax&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq s2(,%eax,8), %mm5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm3, %mm4&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;punpckhdq %mm5, %mm3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;punpckldq %mm5, %mm4&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;pmaddwd %mm3, %mm1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;pmaddwd %mm4, %mm2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;paddw %mm2, %mm1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;packssdw %mm1, %mm0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    __asm__<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;movq %mm0, (d)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> j <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">4</span> <span style="color: #339933;">;</span> j<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #0000dd;">4</span> <span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            fprintf<span style="color: #009900;">&#40;</span> stderr<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>%3d&quot;</span><span style="color: #339933;">,</span> d<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">*</span><span style="color: #0000dd;">4</span><span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        fprintf<span style="color: #009900;">&#40;</span> stderr<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>코드로 옮기니 위와 같군요. 중간에 실수로 바이트오더를 헷갈려서 연산 결과가 뒤집혔었습니다. 정상적인 결과는 250 260 270 280 이 나와야 하는데 280 270 260 250 이 나와버리더군요. 아아 이거 다시 하고 싶은 작업이 아니네요; </p>
<p>흐흣 그래도 오랫만에 어셈블리 관련된 것들을 생각하고 있는데, 이것도 가끔 하니까 재밌네요. 근데 길어지면 할만하지 않다는거 -_-!</p>
<p>p.s) 전체 연산 코드를 보고 싶으시면 <a href='http://mytears.org/resources/mysrc/c/mmx.c'>http://mytears.org/resources/mysrc/c/mmx.c</a> 를 보시길 ;)</p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F01%2F482&rdate=2007-01-14+00%3A49%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F01%2F482&rdate=2007-01-14+00%3A49%3A11&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/13/2007 -- <a href="http://b.mytears.org/2007/01/481" title="matrix multiply with mmx #1">matrix multiply with mmx #1 (3)</a></li><li>1/11/2007 -- <a href="http://b.mytears.org/2007/01/480" title="mmx">mmx (24)</a></li><li>8/30/2008 -- <a href="http://b.mytears.org/2008/08/666" title="메모리 복사 코드 최적화&#8230;">메모리 복사 코드 최적화&#8230; (1)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://b.mytears.org/2007/01/482/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>matrix multiply with mmx #1</title>
		<link>http://b.mytears.org/2007/01/481</link>
		<comments>http://b.mytears.org/2007/01/481#comments</comments>
		<pubDate>Sat, 13 Jan 2007 09:56:17 +0000</pubDate>
		<dc:creator>정태영</dc:creator>
				<category><![CDATA[Tae-young]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[mmx]]></category>
		<category><![CDATA[movq]]></category>
		<category><![CDATA[multiply]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[simd]]></category>

		<guid isPermaLink="false">http://b.mytears.org/2007/01/481</guid>
		<description><![CDATA[<p>몇 일 전에 썼던 글에서 테스트를 해본 내용을 바탕으로 4&#215;4 matrix multiply 연산을 mmx 를 이용해서 구현해봤습니다.</p>
<p></p>
<p>?View Code C#include &#60;stdio .h&#62;</p>
<p>&#160;</p>
<p>// A matrix</p>
<p>short s1&#91;16&#93; = &#123;</p>
<p>     1,  2,  3,  4,</p>
<p>     5,  6,  7,  8,</p>
<p>     9, 10, 11, ...</p>
<p><a href='http://b.mytears.org/2007/01/481'>Read the rest of this entry...</a></p>
<p><h3 style="clear:both;">Related Posts</h3><ul class="related_post"><li>1/14/2007 -- <a href="http://b.mytears.org/2007/01/482" title="matrix multiply with mmx #2">matrix multiply with mmx #2 (3)</a></li><li>1/11/2007 -- <a href="http://b.mytears.org/2007/01/480" title="mmx">mmx (24)</a></li><li>8/30/2008 -- <a href="http://b.mytears.org/2008/08/666" title="메모리 복사 코드 최적화&#8230;">메모리 복사 코드 최적화&#8230; (1)</a></li><li>1/29/2009 -- <a href="http://b.mytears.org/2009/01/1236" title="wp-codebox, wp-openid 버그 패치">wp-codebox, wp-openid 버그 패치 (4)</a></li><li>10/16/2007 -- <a href="http://b.mytears.org/2007/10/600" title="CG: 3D Image Rotation">CG: 3D Image Rotation (2)</a></li></ul></p><div style="width: 180px; margin-left: auto; margin-right: auto; margin-bottom: 30px; margin-top: 30px; ">
    <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='73' height='79' align='left' style="border-bottom: 1px solid #CFD4DA; border-right: 1px solid #CFD4DA;">
    <param name='allowScriptAccess' value='always'/>
    <param name='movie' value='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F01%2F481&rdate=2007-01-13+18%3A56%3A17&rawhtml=&skin=1&showhitcnt=1&platform=5'/>
    <param name='quality' value='high'/>
    <param name='wmode' value='window'/>
    <embed src='http://www.mixsh.com/widget/mixup/loader.html?muid=52225&guid=http%3A%2F%2Fb.mytears.org%2F2007%2F01%2F481&rdate=2007-01-13+18%3A56%3A17&rawhtml=&skin=1&showhitcnt=1&platform=5' quality='high' wmode='window' width='73' height='79' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>
    </object>
		</div>]]></description>
			<content:encoded><![CDATA[<p>몇 일 전에 썼던 글에서 테스트를 해본 내용을 바탕으로 4&#215;4 matrix multiply 연산을 mmx 를 이용해서 구현해봤습니다.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p481code49'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p48149"><td class="code" id="p481code49"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;stdio .h&gt;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// A matrix</span>
<span style="color: #993333;">short</span> s1<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">2</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">3</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">4</span><span style="color: #339933;">,</span>
     <span style="color: #0000dd;">5</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">6</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">7</span><span style="color: #339933;">,</span>  <span style="color: #0000dd;">8</span><span style="color: #339933;">,</span>
     <span style="color: #0000dd;">9</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">10</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">11</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">12</span><span style="color: #339933;">,</span>
    <span style="color: #0000dd;">13</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">14</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">15</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">16</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Transpose(B matrix)</span>
<span style="color: #993333;">short</span> s2<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">16</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #0000dd;">17</span><span style="color