comparison h263.c @ 429:718a22dc121f libavcodec

license/copyright change
author glantau
date Sat, 25 May 2002 22:45:33 +0000
parents fce0a2520551
children 69876443a723
comparison
equal deleted inserted replaced
428:dd4f4c3d7171 429:718a22dc121f
1 /* 1 /*
2 * H263/MPEG4 backend for ffmpeg encoder and decoder 2 * H263/MPEG4 backend for ffmpeg encoder and decoder
3 * Copyright (c) 2000,2001 Gerard Lantau. 3 * Copyright (c) 2000,2001 Fabrice Bellard.
4 * H263+ support. 4 * H263+ support.
5 * Copyright (c) 2001 Juan J. Sierralta P. 5 * Copyright (c) 2001 Juan J. Sierralta P.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This library is free software; you can redistribute it and/or
8 * it under the terms of the GNU General Public License as published by 8 * modify it under the terms of the GNU Lesser General Public
9 * the Free Software Foundation; either version 2 of the License, or 9 * License as published by the Free Software Foundation; either
10 * (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
11 * 11 *
12 * This program is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * GNU General Public License for more details. 15 * Lesser General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU Lesser General Public
18 * along with this program; if not, write to the Free Software 18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * 20 *
21 * ac prediction encoding & b-frame support by Michael Niedermayer <michaelni@gmx.at> 21 * ac prediction encoding & b-frame support by Michael Niedermayer <michaelni@gmx.at>
22 */ 22 */
23 23
24 //#define DEBUG 24 //#define DEBUG
1122 if(s->time_increment_resolution>=256*256) s->time_increment_resolution= 256*128; 1122 if(s->time_increment_resolution>=256*256) s->time_increment_resolution= 256*128;
1123 1123
1124 s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1; 1124 s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1;
1125 } 1125 }
1126 1126
1127 s->time= picture_number*(int64_t)FRAME_RATE_BASE*s->time_increment_resolution/s->frame_rate; 1127 s->time= picture_number*(INT64)FRAME_RATE_BASE*s->time_increment_resolution/s->frame_rate;
1128 time_div= s->time/s->time_increment_resolution; 1128 time_div= s->time/s->time_increment_resolution;
1129 time_mod= s->time%s->time_increment_resolution; 1129 time_mod= s->time%s->time_increment_resolution;
1130 1130
1131 if(s->pict_type==B_TYPE){ 1131 if(s->pict_type==B_TYPE){
1132 s->bp_time= s->last_non_b_time - s->time; 1132 s->bp_time= s->last_non_b_time - s->time;