IT 취미생활.  
Front Page
Tag | Location | Media | Guestbook | Admin   
 
'big-endian'에 해당하는 글(1)
2008.08.18   Little-Endian to Big-Endian


Little-Endian to Big-Endian

MP4 Decoder에 Video Fream을 넘겨 줄때 앞에 4byte에 Length를 넣으라는
양키의 말에 급조해서 만들긴 했습니다.
더 좋은 코드가 있다면 언제든지 리플과 수정 부탁 드립니다.

UINT my_htonl( UINT nSource )
{
 if( 0 == nSource )
  return 0;

 UINT nResult = 0;
 nResult =  (nSource <<24);
 nResult  =  nResult  | ( 0x00ff0000 & (( nSource << 16) >>8) );
 nResult  =  nResult  | ( 0x0000ff00 & (( nSource << 8) >>16) );
 nResult  =  nResult | ( 0x000000ff & ( nSource >>24 ) );

 return nResult
}




자세히 설명이 나와 있습니다.
아래 링크를 참고 하세요.

http://ssulsamo.egloos.com/3150581


BLOG main image
취미생활
 Notice
 Category
분류 전체보기 (191)
매일매일갱생 (83)
서버개발 (1)
임베디드개발 (12)
Programming (80)
Personal Projects (6)
유용한 프로그램 (0)
 TAGS
english email DirectShow VC++ Dshow 영어 이메일 DVB-T Debug Algorithm 군대 C 티스토리초대 isdbt spam mail Linux 퇴사 C++ Java Error Case 서태지 미라지폰 DVB Windows Mobile6.0 출장 English MP3 debugging 1seg 음식 It 개발자 ISDB-T 알고리즘 warning 벨소리 변경 M480 project Brazil Wince5.0 티스토리 초대장
 Calendar
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
 Recent Entries
 Recent Comments
 Recent Trackbacks
 Archive
 Link Site
zextor
괴짜 프로그래머의 일상사~@@
Gag & Peace, and more..
Kazakhstan Almaty.......
Min-A
Sadgarret
Steve Yoon's log
가슴 뛰는 삶을 살아라
오스틴 파워
GUI sin
melanie parker_Lady
제레미의 TV 2.0 이야기..
 Visitor Statistics
Total :
Today :
Yesterday :
rss