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.57 2004-05-21 14:40:15 edgomez Exp $ |
* $Id: decoder.c,v 1.58 2004-05-31 21:36:23 edgomez Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
1218 |
uint32_t x, y; |
uint32_t x, y; |
1219 |
VECTOR mv; |
VECTOR mv; |
1220 |
const VECTOR zeromv = {0,0}; |
const VECTOR zeromv = {0,0}; |
|
const int32_t TRB = dec->time_pp - dec->time_bp, TRD = dec->time_pp; |
|
1221 |
int i; |
int i; |
1222 |
|
|
1223 |
if (!dec->is_edged[0]) { |
if (!dec->is_edged[0]) { |
1321 |
|
|
1322 |
case MODE_DIRECT_NONE_MV: |
case MODE_DIRECT_NONE_MV: |
1323 |
for (i = 0; i < 4; i++) { |
for (i = 0; i < 4; i++) { |
1324 |
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; |
1325 |
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; |
1326 |
? ((TRB - TRD) * last_mb->mvs[i].x) / TRD |
|
1327 |
: mb->mvs[i].x - last_mb->mvs[i].x); |
mb->b_mvs[i].x = (mv.x) |
1328 |
mb->mvs[i].y = (int32_t) ((TRB * last_mb->mvs[i].y) / TRD + mv.y); |
? mb->mvs[i].x - last_mb->mvs[i].x |
1329 |
mb->b_mvs[i].y = (int32_t) ((mv.y == 0) |
: last_mb->mvs[i].x*(dec->time_bp - dec->time_pp)/dec->time_pp; |
1330 |
? ((TRB - TRD) * last_mb->mvs[i].y) / TRD |
mb->b_mvs[i].y = (mv.y) |
1331 |
: mb->mvs[i].y - last_mb->mvs[i].y); |
? mb->mvs[i].y - last_mb->mvs[i].y |
1332 |
|
: last_mb->mvs[i].y*(dec->time_bp - dec->time_pp)/dec->time_pp; |
1333 |
} |
} |
1334 |
|
|
1335 |
decoder_bf_interpolate_mbinter(dec, dec->refn[1], dec->refn[0], |
decoder_bf_interpolate_mbinter(dec, dec->refn[1], dec->refn[0], |