Mercurial > libavcodec.hg
comparison h263.h @ 10828:d0657e337f91 libavcodec
Split H263 encoder and decoder from common code.
author | michael |
---|---|
date | Sat, 09 Jan 2010 14:59:06 +0000 |
parents | 514dc1c87b2e |
children | f9e0f62a7d8a |
comparison
equal
deleted
inserted
replaced
10827:3d011a01a6a0 | 10828:d0657e337f91 |
---|---|
30 #define TEX_VLC_BITS 9 | 30 #define TEX_VLC_BITS 9 |
31 | 31 |
32 extern const AVRational ff_h263_pixel_aspect[16]; | 32 extern const AVRational ff_h263_pixel_aspect[16]; |
33 extern const uint8_t ff_h263_cbpy_tab[16][2]; | 33 extern const uint8_t ff_h263_cbpy_tab[16][2]; |
34 | 34 |
35 extern const uint8_t cbpc_b_tab[4][2]; | |
36 | |
35 extern const uint8_t mvtab[33][2]; | 37 extern const uint8_t mvtab[33][2]; |
36 | 38 |
37 extern const uint8_t ff_h263_intra_MCBPC_code[9]; | 39 extern const uint8_t ff_h263_intra_MCBPC_code[9]; |
38 extern const uint8_t ff_h263_intra_MCBPC_bits[9]; | 40 extern const uint8_t ff_h263_intra_MCBPC_bits[9]; |
39 | 41 |
40 extern const uint8_t ff_h263_inter_MCBPC_code[28]; | 42 extern const uint8_t ff_h263_inter_MCBPC_code[28]; |
41 extern const uint8_t ff_h263_inter_MCBPC_bits[28]; | 43 extern const uint8_t ff_h263_inter_MCBPC_bits[28]; |
44 extern const uint8_t h263_mbtype_b_tab[15][2]; | |
42 | 45 |
43 extern VLC ff_h263_intra_MCBPC_vlc; | 46 extern VLC ff_h263_intra_MCBPC_vlc; |
44 extern VLC ff_h263_inter_MCBPC_vlc; | 47 extern VLC ff_h263_inter_MCBPC_vlc; |
45 extern VLC ff_h263_cbpy_vlc; | 48 extern VLC ff_h263_cbpy_vlc; |
46 | 49 |
47 extern RLTable ff_h263_rl_inter; | 50 extern RLTable ff_h263_rl_inter; |
48 | 51 |
52 extern RLTable rl_intra_aic; | |
53 | |
54 extern const uint16_t h263_format[8][2]; | |
55 extern const uint8_t modified_quant_tab[2][32]; | |
56 extern uint16_t ff_mba_max[6]; | |
57 extern uint8_t ff_mba_length[7]; | |
58 | |
59 extern uint8_t ff_h263_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; | |
60 | |
61 | |
49 int h263_decode_motion(MpegEncContext * s, int pred, int f_code); | 62 int h263_decode_motion(MpegEncContext * s, int pred, int f_code); |
50 av_const int ff_h263_aspect_to_info(AVRational aspect); | 63 av_const int ff_h263_aspect_to_info(AVRational aspect); |
64 int ff_h263_decode_init(AVCodecContext *avctx); | |
65 int ff_h263_decode_frame(AVCodecContext *avctx, | |
66 void *data, int *data_size, | |
67 AVPacket *avpkt); | |
68 int ff_h263_decode_end(AVCodecContext *avctx); | |
69 void h263_encode_mb(MpegEncContext *s, | |
70 DCTELEM block[6][64], | |
71 int motion_x, int motion_y); | |
72 void h263_encode_picture_header(MpegEncContext *s, int picture_number); | |
73 void h263_encode_gob_header(MpegEncContext * s, int mb_line); | |
74 int16_t *h263_pred_motion(MpegEncContext * s, int block, int dir, | |
75 int *px, int *py); | |
76 void h263_encode_init(MpegEncContext *s); | |
77 void h263_decode_init_vlc(MpegEncContext *s); | |
78 int h263_decode_picture_header(MpegEncContext *s); | |
79 int ff_h263_decode_gob_header(MpegEncContext *s); | |
80 void ff_h263_update_motion_val(MpegEncContext * s); | |
81 void ff_h263_loop_filter(MpegEncContext * s); | |
82 void ff_set_qscale(MpegEncContext * s, int qscale); | |
83 int ff_h263_decode_mba(MpegEncContext *s); | |
84 void ff_h263_encode_mba(MpegEncContext *s); | |
85 void ff_init_qscale_tab(MpegEncContext *s); | |
86 int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr); | |
87 void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n); | |
88 | |
89 | |
90 /** | |
91 * Prints picture info if FF_DEBUG_PICT_INFO is set. | |
92 */ | |
93 void ff_h263_show_pict_info(MpegEncContext *s); | |
94 | |
95 int ff_intel_h263_decode_picture_header(MpegEncContext *s); | |
96 int ff_h263_decode_mb(MpegEncContext *s, | |
97 DCTELEM block[6][64]); | |
98 | |
99 /** | |
100 * Returns the value of the 3bit "source format" syntax element. | |
101 * that represents some standard picture dimensions or indicates that | |
102 * width&height are explicitly stored later. | |
103 */ | |
104 int av_const h263_get_picture_format(int width, int height); | |
105 | |
106 void ff_clean_h263_qscales(MpegEncContext *s); | |
107 int ff_h263_resync(MpegEncContext *s); | |
108 const uint8_t *ff_h263_find_resync_marker(const uint8_t *p, const uint8_t *end); | |
109 int ff_h263_get_gob_height(MpegEncContext *s); | |
110 void ff_h263_encode_motion(MpegEncContext * s, int val, int f_code); | |
111 | |
51 | 112 |
52 static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){ | 113 static inline int h263_get_motion_length(MpegEncContext * s, int val, int f_code){ |
53 int l, bit_size, code; | 114 int l, bit_size, code; |
54 | 115 |
55 if (val == 0) { | 116 if (val == 0) { |
173 cbp |= 1 << (5 - i); | 234 cbp |= 1 << (5 - i); |
174 } | 235 } |
175 } | 236 } |
176 return cbp; | 237 return cbp; |
177 } | 238 } |
239 | |
240 static inline void memsetw(short *tab, int val, int n) | |
241 { | |
242 int i; | |
243 for(i=0;i<n;i++) | |
244 tab[i] = val; | |
245 } | |
178 #endif | 246 #endif |