20 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
* |
* |
23 |
* $Id: decoder.c,v 1.51.2.3 2004-05-03 23:28:29 edgomez Exp $ |
* $Id: decoder.c,v 1.51.2.4 2004-05-31 21:26:23 edgomez Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
1215 |
uint32_t x, y; |
uint32_t x, y; |
1216 |
VECTOR mv; |
VECTOR mv; |
1217 |
const VECTOR zeromv = {0,0}; |
const VECTOR zeromv = {0,0}; |
|
const int64_t TRB = dec->time_pp - dec->time_bp, TRD = dec->time_pp; |
|
1218 |
int i; |
int i; |
1219 |
|
|
1220 |
start_timer(); |
start_timer(); |
1309 |
|
|
1310 |
case MODE_DIRECT_NONE_MV: |
case MODE_DIRECT_NONE_MV: |
1311 |
for (i = 0; i < 4; i++) { |
for (i = 0; i < 4; i++) { |
1312 |
mb->mvs[i].x = (int32_t) ((TRB * last_mb->mvs[i].x) / TRD + mv.x); |
mb->mvs[i].x = last_mb->mvs[i].x*dec->time_bp/dec->time_pp + mv.x; |
1313 |
mb->b_mvs[i].x = (int32_t) ((mv.x == 0) |
mb->mvs[i].y = last_mb->mvs[i].y*dec->time_bp/dec->time_pp + mv.y; |
1314 |
? ((TRB - TRD) * last_mb->mvs[i].x) / TRD |
|
1315 |
: mb->mvs[i].x - last_mb->mvs[i].x); |
mb->b_mvs[i].x = (mv.x) |
1316 |
mb->mvs[i].y = (int32_t) ((TRB * last_mb->mvs[i].y) / TRD + mv.y); |
? mb->mvs[i].x - last_mb->mvs[i].x |
1317 |
mb->b_mvs[i].y = (int32_t) ((mv.y == 0) |
: last_mb->mvs[i].x*(dec->time_bp - dec->time_pp)/dec->time_pp; |
1318 |
? ((TRB - TRD) * last_mb->mvs[i].y) / TRD |
mb->b_mvs[i].y = (mv.y) |
1319 |
: mb->mvs[i].y - last_mb->mvs[i].y); |
? mb->mvs[i].y - last_mb->mvs[i].y |
1320 |
|
: last_mb->mvs[i].y*(dec->time_bp - dec->time_pp)/dec->time_pp; |
1321 |
} |
} |
1322 |
|
|
1323 |
decoder_bf_interpolate_mbinter(dec, dec->refn[1], dec->refn[0], |
decoder_bf_interpolate_mbinter(dec, dec->refn[1], dec->refn[0], |