Mercurial > libavcodec.hg
diff h263.c @ 1070:6da5ae9ee199 libavcodec
more #ifdef CONFIG_ENCODERS patch by (Wolfgang Hesseler <qv at multimediaware dot com>) with modifications by me (s/WOLFGANG/CONFIG_ENCODERS/ and some other fixes)
author | michaelni |
---|---|
date | Sun, 16 Feb 2003 23:05:38 +0000 |
parents | a5be963709d1 |
children | 7e79a58954b1 |
line wrap: on
line diff
--- a/h263.c Fri Feb 14 21:27:25 2003 +0000 +++ b/h263.c Sun Feb 16 23:05:38 2003 +0000 @@ -73,19 +73,21 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded, int intra); static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr); +#ifdef CONFIG_ENCODERS static void mpeg4_inv_pred_ac(MpegEncContext * s, DCTELEM *block, int n, int dir); +#endif //CONFIG_ENCODERS static void mpeg4_decode_sprite_trajectory(MpegEncContext * s); static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr, int *dir_ptr); extern uint32_t inverse[256]; +#ifdef CONFIG_ENCODERS static uint8_t uni_DCtab_lum_len[512]; static uint8_t uni_DCtab_chrom_len[512]; static uint16_t uni_DCtab_lum_bits[512]; static uint16_t uni_DCtab_chrom_bits[512]; -#ifdef CONFIG_ENCODERS static uint16_t (*mv_penalty)[MAX_MV*2+1]= NULL; static uint8_t fcode_tab[MAX_MV*2+1]; static uint8_t umv_fcode_tab[MAX_MV*2+1]; @@ -129,6 +131,8 @@ return format; } +#ifdef CONFIG_ENCODERS + static void float_aspect_to_info(MpegEncContext * s, float aspect){ int i; @@ -397,6 +401,8 @@ } } +#endif //CONFIG_ENCODERS + void ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my){ const int mb_index= s->mb_x + s->mb_y*s->mb_width; int xy= s->block_index[0]; @@ -1010,7 +1016,6 @@ return pred_dc; } - static void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n) { int x, y, wrap, a, c, pred_dc, scale, i; @@ -1290,6 +1295,8 @@ } #endif +#ifdef CONFIG_ENCODERS + static void init_uni_dc_tab(void) { int level, uni_code, uni_len; @@ -1342,6 +1349,8 @@ } } +#endif //CONFIG_ENCODERS + #ifdef CONFIG_ENCODERS static void init_uni_mpeg4_rl_tab(RLTable *rl, uint32_t *bits_tab, uint8_t *len_tab){ int slevel, run, last; @@ -1549,6 +1558,8 @@ } #endif +#ifdef CONFIG_ENCODERS + /***************************************************/ /** * add mpeg4 stuffing bits (01...1) @@ -1798,6 +1809,8 @@ s->v_edge_pos= s->height; } +#endif //CONFIG_ENCODERS + /** * change qscale by given dquant and update qscale dependant variables. */ @@ -1938,6 +1951,8 @@ } +#ifdef CONFIG_ENCODERS + static void mpeg4_inv_pred_ac(MpegEncContext * s, DCTELEM *block, int n, int dir) { @@ -2025,7 +2040,7 @@ } #endif } -#ifdef CONFIG_ENCODERS + /** * encodes a 8x8 block * @param n block index (0-3 are luma, 4-5 are chroma) @@ -2363,6 +2378,8 @@ tab[i] = val; } +#ifdef CONFIG_ENCODERS + void ff_mpeg4_init_partitions(MpegEncContext *s) { init_put_bits(&s->tex_pb, s->tex_pb_buffer, PB_BUFFER_SIZE, NULL, NULL); @@ -2394,6 +2411,8 @@ s->last_bits= get_bit_count(&s->pb); } +#endif //CONFIG_ENCODERS + int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s){ switch(s->pict_type){ case I_TYPE: @@ -2408,6 +2427,8 @@ } } +#ifdef CONFIG_ENCODERS + void ff_mpeg4_encode_video_packet_header(MpegEncContext *s) { int mb_num_bits= av_log2(s->mb_num - 1) + 1; @@ -2421,6 +2442,8 @@ put_bits(&s->pb, 1, 0); /* no HEC */ } +#endif //CONFIG_ENCODERS + /** * check if the next stuff is a resync marker or the end. * @return 0 if not