comparison mpegvideo.h @ 5286:4393e09e32ec libavcodec

move ff_h263_round_chroma() to mpegvideo.h as static inline
author mru
date Wed, 11 Jul 2007 21:04:53 +0000
parents 101f20612a94
children 8c0bbf712d76
comparison
equal deleted inserted replaced
5285:6661692d34b4 5286:4393e09e32ec
760 s->last_bits = bits; 760 s->last_bits = bits;
761 761
762 return bits - last; 762 return bits - last;
763 } 763 }
764 764
765 static inline int ff_h263_round_chroma(int x){
766 static const uint8_t h263_chroma_roundtab[16] = {
767 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
768 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
769 };
770 if (x >= 0)
771 return (h263_chroma_roundtab[x & 0xf] + ((x >> 3) & ~1));
772 else {
773 x = -x;
774 return -(h263_chroma_roundtab[x & 0xf] + ((x >> 3) & ~1));
775 }
776 }
777
765 /* motion_est.c */ 778 /* motion_est.c */
766 void ff_estimate_p_frame_motion(MpegEncContext * s, 779 void ff_estimate_p_frame_motion(MpegEncContext * s,
767 int mb_x, int mb_y); 780 int mb_x, int mb_y);
768 void ff_estimate_b_frame_motion(MpegEncContext * s, 781 void ff_estimate_b_frame_motion(MpegEncContext * s,
769 int mb_x, int mb_y); 782 int mb_x, int mb_y);
869 int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s); 882 int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s);
870 int ff_h263_resync(MpegEncContext *s); 883 int ff_h263_resync(MpegEncContext *s);
871 int ff_h263_get_gob_height(MpegEncContext *s); 884 int ff_h263_get_gob_height(MpegEncContext *s);
872 void ff_mpeg4_init_direct_mv(MpegEncContext *s); 885 void ff_mpeg4_init_direct_mv(MpegEncContext *s);
873 int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my); 886 int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my);
874 inline int ff_h263_round_chroma(int x);
875 void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code); 887 void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code);
876 888
877 889
878 /* rv10.c */ 890 /* rv10.c */
879 void rv10_encode_picture_header(MpegEncContext *s, int picture_number); 891 void rv10_encode_picture_header(MpegEncContext *s, int picture_number);