]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ituh263enc.c
Set Delphine Software International CIN palette opaque.
[ffmpeg] / libavcodec / ituh263enc.c
index 557ed48a56a448380e3b66504206836ab957959a..01c603e26dec836bc7c435b94df8dc18c215d653 100644 (file)
@@ -126,7 +126,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number)
     coded_frame_rate= 1800000;
     coded_frame_rate_base= (1000+best_clock_code)*best_divisor;
 
-    align_put_bits(&s->pb);
+    avpriv_align_put_bits(&s->pb);
 
     /* Update the pointer to last GOB */
     s->ptr_lastgob = put_bits_ptr(&s->pb);
@@ -657,7 +657,7 @@ void h263_encode_mb(MpegEncContext * s,
 
 void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code)
 {
-    int range, l, bit_size, sign, code, bits;
+    int range, bit_size, sign, code, bits;
 
     if (val == 0) {
         /* zero vector */
@@ -667,8 +667,7 @@ void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code)
         bit_size = f_code - 1;
         range = 1 << bit_size;
         /* modulo encoding */
-        l= INT_BIT - 6 - bit_size;
-        val = (val<<l)>>l;
+        val = sign_extend(val, 6 + bit_size);
         sign = val>>31;
         val= (val^sign)-sign;
         sign&=1;