IT 취미생활.  
Front Page
Tag | Location | Media | Guestbook | Admin   
 
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
알고리즘 DirectShow 군대 ISDB-T DVB-T 티스토리 초대장 isdbt Java Windows Mobile6.0 음식 Error Case Dshow 벨소리 변경 1seg 서태지 Wince5.0 개발자 Linux 출장 미라지폰 project english email 영어 이메일 티스토리초대 warning English DVB C VC++ Brazil 퇴사 C++ MP3 Debug debugging M480 Algorithm spam mail It
 Calendar
«   2024/05   »
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 31
 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