Write clip-related decimal numbers into hex, where they make more sense.
Originally committed as revision 22968 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
							parent
							
								
									3bfd582c96
								
							
						
					
					
						commit
						ad6408960b
					
				@ -118,7 +118,7 @@ static inline av_const int av_clip(int a, int amin, int amax)
 | 
			
		||||
 */
 | 
			
		||||
static inline av_const uint8_t av_clip_uint8(int a)
 | 
			
		||||
{
 | 
			
		||||
    if (a&(~255)) return (-a)>>31;
 | 
			
		||||
    if (a&(~0xFF)) return (-a)>>31;
 | 
			
		||||
    else          return a;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -129,7 +129,7 @@ static inline av_const uint8_t av_clip_uint8(int a)
 | 
			
		||||
 */
 | 
			
		||||
static inline av_const uint16_t av_clip_uint16(int a)
 | 
			
		||||
{
 | 
			
		||||
    if (a&(~65535)) return (-a)>>31;
 | 
			
		||||
    if (a&(~0xFFFF)) return (-a)>>31;
 | 
			
		||||
    else            return a;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -140,7 +140,7 @@ static inline av_const uint16_t av_clip_uint16(int a)
 | 
			
		||||
 */
 | 
			
		||||
static inline av_const int16_t av_clip_int16(int a)
 | 
			
		||||
{
 | 
			
		||||
    if ((a+32768) & ~65535) return (a>>31) ^ 32767;
 | 
			
		||||
    if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
 | 
			
		||||
    else                    return a;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user