亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mpa_crc.s

?? samsung 9908DVD源代碼,
?? S
?? 第 1 頁 / 共 2 頁
字號:
/*
 *  mpa_crc.s
 *
 *  MPEG/audio multichannel decoder.
 *	Copyright (C) 2003 Optical Player P/J, Samsung Electronics.
 *
 *===================================================================
 *
 * If the protection bit in the header equals '0', a CRC-check word 
 * has been inserted in the bitstream just after the header. 
 * The error detection method used is 'CRC-16' whose generator 
 * polynomial is:
 *
 *          G(X)  =  X16 + X15 + X2 + 1
 *
 * The bits included into the CRC-check are:
 *	-	16 bits of header(), bitrate_index ~ emphasis
 *	-	a number of bits of audio_data(), starting with the first bit. 
 *	    This number is given by	3-AnnexB,Table 3-B.5 "NUMBER OF 
 *	    PROTECTED AUDIO_DATA BITS". 
 *
 * The method is depicted in 3-Annex A, Figure 3-A.9 "CRC-CHECK DIAGRAM" 
 * The initial state of the shift register is '1111 1111 1111 1111'. 
 * Then all the bits included into the CRC-check are input to the 
 * circuit shown in 3-Annex A, Figure 3-A.9 "CRC-CHECK DIAGRAM". 
 * The outputs b15...b0 constitute a word to be compared with the 
 * CRC-check word in the bitstream. If the words are not identical, 
 * a transmission error has occured in the protected field of the 
 * bitstream. To avoid annoying distortions, application of a 
 * concealment technique, such as muting of the actual frame or 
 * repetition of the previous frame, is recommended.
 *
 */

.include	"mpa.h"

.secFILE_mpa_crc


/********************************************************************

 Function:		update_CRC

 Description:	Update CRC value.
				
				update_CRC (d, b, c) {
				  masking = 1 << length;
				  while((masking >>= 1)) {
				  	carry = *crc & 0x8000;
				  	*crc <<= 1;
				  	if (!carry ^ !(data & masking))
				  		*crc ^= 0x8005;
				  }
				  *crc &= 0xffff;
				}

 Arguments:		b: length
				c: CRC
				d: data
				
				return: c (calculated CRC value)
				
********************************************************************/
update_CRC:
				eld			a, #24
				esub		a, b
				eld			sr, d
				esft		sr, a
				eld			d, sr
				eld			a, #1
				ecld		r0, c
				ld			r2, #0x8005
%1
				ecp			b, #0
				ebra		ec0, return_CRC

				esla		d
				etst		c, ec3
				brad		ec3, %f2
				ld			r1, #1
				ld			r1, #0
%2
				sl			r0				; carry
				adc			r1, #0
				cmp			eq, r1, #1
				brfd		%b1
				esub		b, a
				brad		%b1
				xor			r0, r2
return_CRC
				retd
				ecld		c, r0

		
/********************************************************************

 Function:		MPG_I_CRC_calc

 Description:	Check CRC of base stream of layer I.
					
 Check item:	
				1. bits 16 ... 31 of header
				  update_CRC (bitrate_index, 4, crc);
				  update_CRC (sampling_frequency, 2, crc);
				  update_CRC (padding, 1, crc);
				  update_CRC (extension, 1, crc);
				  update_CRC (mode, 2, crc);
				  update_CRC (mode_ext, 2, crc);
				  update_CRC (copyright, 1, crc);
				  update_CRC (original, 1, crc);
				  update_CRC (emphasis, 2, crc);
                  
				2. bit allocation
				  for (i=0; i<SBLIMIT; i++)
				    for (k=0; k<((i<jsbound)?stereo:1); k++)
				  	  update_CRC (bit_alloc[k][i], 4, crc);
						
********************************************************************/
MPG_I_CRC_calc::
				push		a14
				eld			si, sr						; backup bit_buffer

; 1. bits 16 ... 31 of header
				eld			c, #-1
				efz8		c

				eld			d, rpd0.bitrate_index
				bsrd		update_CRC
				eld			b, #4

				eld			d, rpd0.sampling_frequency
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.padding_bit	
                bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.private_bit
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.mode
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.mode_extension
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.copyright
                bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.original
                bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.emphasis
                bsrd		update_CRC
				eld			b, #2

; 2. bit allocation
;				index registers 
;				@bank1
;						d1		d0		s1		s0
;				---------------------------------------
;				sd1: 	 x		 x		 2   	 1
; 
				er			xsd
				ebk			#0010b
; 				eld			rp1, #bit_alloc		//from layer12.s
				eld			sd1, #0x0021
				
				eld			a, rpd1.stereo
				eld			b, rpd1.jsbound
				ecld		r6, a
				ecld		r7, b
				mul			uu, r6, r7
				sub			r6, #1
				eld			b, #4
%1
				bsrd		update_CRC
				eld			d, @rp1+s0
				bnzd		r6, %b1
				eld			b, #4
				
				cmp			eq, r7, #SBLIMIT
				brt			%f3
				ld			r6, #SBLIMIT
				sub			r6, r7
				sub			r6, #1
%2
				bsrd		update_CRC
				eld			d, @rp1+s1
				bnzd		r6, %b2
				eld			b, #4
%3
				ebk			#0000b
				eld			sr, si						; restore bit_buffer				
				pop			a14
                ret

                
/********************************************************************

 Function:		MPG_II_CRC_calc

 Description:	check CRC of base stream of layer II.
 
 Check item:	
				1. bits 16 ... 31 of header
				  update_CRC (bitrate_index, 4, crc);
				  update_CRC (sampling_frequency, 2, crc);
				  update_CRC (padding, 1, crc);
				  update_CRC (extension, 1, crc);
				  update_CRC (mode, 2, crc);
				  update_CRC (mode_ext, 2, crc);
				  update_CRC (copyright, 1, crc);
				  update_CRC (original, 1, crc);
				  update_CRC (emphasis, 2, crc);
				
				2. bit allocation
				  for (i=0; i<sblimit; i++)
				    for (k=0; k<((i<jsbound)?stereo:1); k++)
				  	  update_CRC (bit_alloc[k][i], (*alloc)[i][0].bits, crc);
				
				3. scalefactor selection information
				  for (i=0; i<sblimit; i++)
				    for (k=0; k<stereo; k++)
				      if (bit_alloc[k][i])
				        update_CRC (scfsi[k][i], 2, crc);
					
********************************************************************/
MPG_II_CRC_calc::	
				push		a14
				eld			si, sr						; backup bit_buffer

; 1. bits 16 ... 31 of header
				eld			c, #-1
				efz8		c

				eld			d, rpd0.bitrate_index
				bsrd		update_CRC
				eld			b, #4

				eld			d, rpd0.sampling_frequency
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.padding_bit
                bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.private_bit
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.mode
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.mode_extension
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.copyright
                bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.original
                bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.emphasis
                bsrd		update_CRC
				eld			b, #2
			
; 2. bit allocation
;				index registers 
;				@bank0
;						d1		d0		s1		s0
;				---------------------------------------
;				sd0: 	 x		 x	     0  	 1
;				sd1: 	 x		 x		 2   	 1
; 
				er			xsd
				ebk			#0000b
				eld			sd0, #0x0001
				eld			sd1, #0x0021
				  
				eld			a, rpd1.tbl_num				; select nbal table
				eld			rp0, #nbal_table
				ecp			a, #1						; table number 0/1 or 2/3
				ebra		ec2, 4
				erpn		rp0, #9
				eld			rp1, #bit_alloc
				
				eld			a, rpd1.stereo
				eld			b, rpd1.jsbound
				ecld		r6, a
				ecld		r7, b
				sub			r6, #1
				sub			r7, #1
				ld			r5, r6

%0				eld			b, @rp0+s1				
%1				bsrd		update_CRC
				eld			d, @rp1+s0
				bnzd		r6, %b1
				eld			b, @rp0+s1				

				erps		rp0+s0
				bnzd		r7, %b0
				ld			r6, r5
				
				eld			a, rpd1.jsbound
				eld			b, rpd1.sblimit
				ecp			a, b
				ebrad		ec0, %f3
				ecld		r7, b
				esub		b, a
				ecld		r6, b
				sub			r6, #1
				eld			b, @rp0+s0
%2
				bsrd		update_CRC
				eld			d, @rp1+s1
				bnzd		r6, %b2
				eld			b, @rp0+s0

; 3. scalefactor selection information
%3
				eld			rp0, #scfsi
				eld			rp1, #bit_alloc
				add			r5, #1
				mul			uu, r7, r5
				sub			r7, #1
%4
				eld			a, @rp1+s0
				ecp			a, #0
				ebra		ec0, %f5
				eld			d, @rp0+s1
				bsrd		update_CRC
				eld			b, #2
%5				bnzd		r7, %b4
				erps		rp0+s0
				eld			sr, si						; restore bit_buffer				
				pop			a14
				ret


				
/********************************************************************

 Function:		MC_error_check

 Description:	Check CRC of multichannel stream. This is mandatory
 				option.

 Check item:	
				1. bits of MC header
				2. composite status information
				3. lfe information
				4. bit allocation
				5. scalefactor selection information
 
********************************************************************/
.if( _DECODER_TYPE != MPEG_1_AUDIO )
MC_error_check::
				push		a14
				eld			si, sr						; backup bit_buffer

; 1. bits 0 ... 23 of MC header
				eld			c, #-1
				efz8		c

				eld			d, rpd0.ext_stream_present
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.ext_stream_present
				ecp			d, #TRUE
				ebra		ec1, %f1
				eld			d, rpd0.n_ad_bytes
				bsrd		update_CRC
				eld			b, #8

%1				eld			d, rpd0.center
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.surround
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.lfe
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.audio_mix
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.dematrix_procedure
				bsrd		update_CRC
				eld			b, #2

				eld			d, rpd0.no_of_multi_lingual_ch
				bsrd		update_CRC
				eld			b, #3

				eld			d, rpd0.multi_lingual_fs
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.multi_lingual_layer
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.copyright_ident_bit
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd0.copyright_ident_start
				bsrd		update_CRC
				eld			b, #1

; 2. bits of composite status information
				eld			d, rpd1.tc_sbgr_select
				ecld		r5, d
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd1.dyn_cross_on
				ecld		r6, d
				bsrd		update_CRC
				eld			b, #1

				eld			d, rpd1.mc_prediction_on
				ecld		r7, d
				bsrd		update_CRC
				eld			b, #1

				eld			rp0, #tc_alloc
				ld			r8, #GRANULES
				cmp			eq, r5, #TRUE
				brfd		%f2
				eld			b, rpd1.tc_alloc_bits
				eld			rp0, #layer_info+tc_allocation
				ld			r8, #1
%2				bsrd		update_CRC
				eld			d, @rp0+s0
				dt			r8
				brfd		%b2
				eld			b, rpd1.tc_alloc_bits

				cmp			eq, r6, #TRUE
				brf			%f5
				eld			d, rpd1.dyn_cross_LR
				bsrd		update_CRC
				eld			b, #1
				eld			rp0, #dyn_cross_mode
				eld			rp1, #dyn_second_stereo
				ld			r8, #GRANULES
				eld			b, rpd0.surround
				ecld		r5, b
%3				eld			d, @rp0+s0
				bsrd		update_CRC
				eld			b, rpd1.dyn_cross_bits
				cmp			eq, r5, #3
				brf			%f4
				eld			d, @rp1+s0
				bsrd		update_CRC
				eld			b, #1
%4				dt			r8
				brf			%b3

%5				cmp			eq, r7, #TRUE
				brf			%f6
; CRC for prediction mode
;		for(i = 0; i < 8; i++)
;		{ 	/* new sbgr < 8 */
;			update_CRC(info->mc_prediction[i], 1, crc);
;			if( info->mc_prediction[i] == 1 )
;			{
;			   for(pci=0; pci< pred_coef_table[fr_ps->pred_mode][info->dyn_cross_mode[i]]; pci++)
;				update_CRC(info->mc_predsi[i][pci], 2, crc);
;			}
;		}
				
; 3. bits of lfe information
%6
				eld			a, rpd0.lfe
				ecp			a, #TRUE
				ebra		ec1, %f7
				eld			d, rpd1.lfe_allocation
				bsrd		update_CRC
				eld			b, #4				

; 4. bit allocation
%7
				eld			rp0, #bit_alloc+64
				eld			rp1, #nbal_table				
				eld			a, rpd0.center
				eld			b, rpd0.surround
				ecld		r0, a
				ecld		r1, b
				ld			r9, r0
				ld			r11, r1
				eld			a, rpd1.sblimit_mc
				eld			b, rpd1.mc_channel
				eld			d, rpd1.stereo

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区在线| 国产大陆a不卡| 在线免费观看视频一区| 亚洲精品你懂的| 欧美日韩的一区二区| 天堂va蜜桃一区二区三区漫画版| 欧美日韩国产首页在线观看| 日本不卡在线视频| 久久久亚洲精华液精华液精华液| 丁香一区二区三区| 亚洲欧美日韩在线不卡| 欧美久久高跟鞋激| 国产一区二区三区日韩| 亚洲欧美在线视频观看| 91一区二区三区在线播放| 亚洲一级电影视频| 欧美成人vps| 99麻豆久久久国产精品免费优播| 亚洲另类春色校园小说| 日韩欧美一二三| www.欧美精品一二区| 亚洲成人先锋电影| 久久精品亚洲精品国产欧美kt∨| 色哟哟亚洲精品| av资源网一区| 免费精品视频在线| 国产精品视频看| 欧美精品久久久久久久多人混战| 国产乱人伦精品一区二区在线观看 | 一区二区三区四区不卡视频| 日韩一级黄色片| av在线这里只有精品| 丝袜亚洲另类欧美| 国产精品福利影院| 日韩无一区二区| 99视频一区二区| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲国产精华液网站w | av亚洲精华国产精华精华| 日韩黄色免费网站| 日韩美女视频一区二区| 精品成人在线观看| 欧洲人成人精品| 成人午夜精品一区二区三区| 日本亚洲电影天堂| 怡红院av一区二区三区| 国产精品美女久久久久久久| 日韩美女视频在线| 欧美日韩三级视频| 在线精品视频免费播放| 成人av一区二区三区| 久久精品999| 天堂va蜜桃一区二区三区漫画版| 日韩美女视频一区| 欧美国产一区视频在线观看| 亚洲精品一区二区三区在线观看| 欧美日本免费一区二区三区| 色狠狠av一区二区三区| av一区二区三区四区| 国产精品一级在线| 国内精品国产三级国产a久久 | 亚洲伦理在线免费看| 中文字幕乱码亚洲精品一区 | 97久久人人超碰| 国产成人免费视频一区| 国产大片一区二区| 国产成人精品免费看| 国产高清亚洲一区| 丰满少妇久久久久久久| 国产成人免费av在线| 国产成人在线影院| 成人开心网精品视频| 国产传媒欧美日韩成人| 成人丝袜高跟foot| 91在线免费播放| 91免费观看国产| 91久久一区二区| 欧美日韩一区不卡| 欧美一级电影网站| 日韩欧美自拍偷拍| 日韩一区二区精品| www欧美成人18+| 国产视频一区在线播放| 中文字幕不卡在线播放| 亚洲欧洲在线观看av| 亚洲伦理在线免费看| 亚洲午夜久久久久久久久电影网| 亚洲v精品v日韩v欧美v专区| 蜜桃av一区二区三区| 国产麻豆精品在线观看| 成人涩涩免费视频| 91国偷自产一区二区三区成为亚洲经典| 91网站在线播放| 欧美三区在线观看| 精品久久久网站| 国产精品美女久久久久av爽李琼| 亚洲精品欧美在线| 免费观看在线色综合| 国产·精品毛片| 91久久奴性调教| 欧美精品乱人伦久久久久久| 精品国一区二区三区| 国产精品午夜久久| 亚洲高清在线精品| 精品一区二区综合| 91色在线porny| 91精品国产欧美一区二区| 久久久蜜桃精品| 亚洲五月六月丁香激情| 经典三级在线一区| 欧美最猛性xxxxx直播| 精品少妇一区二区| 亚洲欧洲精品天堂一级| 日韩国产欧美在线观看| 成人激情免费电影网址| 这里只有精品99re| 中文字幕一区在线观看视频| 视频一区在线播放| av不卡在线观看| 欧美xingq一区二区| 一区二区三区在线免费播放| 韩国在线一区二区| 欧美日韩视频在线一区二区| 国产调教视频一区| 人禽交欧美网站| 色婷婷亚洲综合| 久久日一线二线三线suv| 亚洲国产精品一区二区www在线| 国产成人自拍网| 欧美一卡2卡3卡4卡| 亚洲女人****多毛耸耸8| 国精产品一区一区三区mba桃花| 欧美综合亚洲图片综合区| 久久欧美一区二区| 奇米影视在线99精品| 欧美专区亚洲专区| 亚洲色图19p| 国产成人精品一区二区三区四区| 欧美一卡二卡在线观看| 亚洲一区二区欧美激情| 不卡一二三区首页| 久久欧美一区二区| 久久国产精品99精品国产| 欧美精品在线一区二区三区| 亚洲美腿欧美偷拍| av电影天堂一区二区在线| 国产欧美一区二区精品性| 久久99精品久久只有精品| 日韩一区二区视频| 日日夜夜免费精品| 欧美精品丝袜久久久中文字幕| 亚洲精选视频免费看| av亚洲精华国产精华精| 中文字幕 久热精品 视频在线| 国产精品影音先锋| 久久日韩精品一区二区五区| 韩日av一区二区| 欧美成人vps| 国产自产视频一区二区三区 | 欧美国产激情一区二区三区蜜月| 精品一二三四区| 日韩精品中午字幕| 久久国产麻豆精品| 精品久久久久久最新网址| 免费成人小视频| 精品国产乱码久久久久久闺蜜 | 一区二区不卡在线播放 | 欧美草草影院在线视频| 日本伊人色综合网| 欧美成人激情免费网| 国产在线麻豆精品观看| 欧美国产精品一区二区| 不卡高清视频专区| 一区二区高清视频在线观看| 欧美日韩一本到| 日韩黄色一级片| 精品国精品国产尤物美女| 国产suv一区二区三区88区| 中文字幕一区二区三区色视频| 成人免费电影视频| 亚洲综合在线电影| 制服丝袜国产精品| 国产一区二区精品久久91| 一区视频在线播放| 欧美日韩中文字幕精品| 欧美色图第一页| 日本不卡123| 国产欧美精品一区aⅴ影院 | 欧美日韩免费一区二区三区视频| 日韩精品一二三四| 国产亚洲一本大道中文在线| 色视频一区二区| 紧缚捆绑精品一区二区| 亚洲婷婷在线视频| 欧美一级片在线看| 成人激情电影免费在线观看| 亚洲高清不卡在线观看| 久久久久久一二三区| 在线欧美小视频| 国产一区二区电影|