comparison lcldec.c @ 9730:1c3b57fbb512 libavcodec

Use av_clip_uint8 instead of equivalent but unoptimzed code,
author reimar
date Fri, 29 May 2009 20:15:38 +0000
parents d6a35d7be925
children 405cbc435997
comparison
equal deleted inserted replaced
9729:8c680e33eeaa 9730:1c3b57fbb512
79 static inline unsigned char fix (int pix14) 79 static inline unsigned char fix (int pix14)
80 { 80 {
81 int tmp; 81 int tmp;
82 82
83 tmp = (pix14 + 0x80000) >> 20; 83 tmp = (pix14 + 0x80000) >> 20;
84 if (tmp < 0) 84 return av_clip_uint8(tmp);
85 return 0;
86 if (tmp > 255)
87 return 255;
88 return tmp;
89 } 85 }
90 86
91 87
92 88
93 static inline unsigned char get_b (unsigned char yq, signed char bq) 89 static inline unsigned char get_b (unsigned char yq, signed char bq)