mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 20:42:49 +08:00 
			
		
		
		
	Small h264 decoding speed optimization: while->do/while
Originally committed as revision 14459 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		| @@ -5356,10 +5356,10 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     while( coeff_count-- ) { |     do { | ||||||
|         uint8_t *ctx = coeff_abs_level1_ctx[node_ctx] + abs_level_m1_ctx_base; |         uint8_t *ctx = coeff_abs_level1_ctx[node_ctx] + abs_level_m1_ctx_base; | ||||||
|  |  | ||||||
|         int j= scantable[index[coeff_count]]; |         int j= scantable[index[--coeff_count]]; | ||||||
|  |  | ||||||
|         if( get_cabac( CC, ctx ) == 0 ) { |         if( get_cabac( CC, ctx ) == 0 ) { | ||||||
|             node_ctx = coeff_abs_level_transition[0][node_ctx]; |             node_ctx = coeff_abs_level_transition[0][node_ctx]; | ||||||
| @@ -5396,7 +5396,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT | |||||||
|                 block[j] = (get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32) >> 6; |                 block[j] = (get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32) >> 6; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } while( coeff_count ); | ||||||
| #ifdef CABAC_ON_STACK | #ifdef CABAC_ON_STACK | ||||||
|             h->cabac.range     = cc.range     ; |             h->cabac.range     = cc.range     ; | ||||||
|             h->cabac.low       = cc.low       ; |             h->cabac.low       = cc.low       ; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jason Garrett-Glaser
					Jason Garrett-Glaser