Mercurial > libavcodec.hg
comparison cavsdec.c @ 8605:33f51dd2491f libavcodec
rename vector_t to cavs_vector
author | stefang |
---|---|
date | Fri, 16 Jan 2009 17:20:17 +0000 |
parents | 0579157cbb14 |
children | c3a96cea3453 |
comparison
equal
deleted
inserted
replaced
8604:48c89068a41b | 8605:33f51dd2491f |
---|---|
57 h->col_mv[(h->mby*h->mb_width + h->mbx)*4 + 1] = h->mv[MV_FWD_X1]; | 57 h->col_mv[(h->mby*h->mb_width + h->mbx)*4 + 1] = h->mv[MV_FWD_X1]; |
58 h->col_mv[(h->mby*h->mb_width + h->mbx)*4 + 2] = h->mv[MV_FWD_X2]; | 58 h->col_mv[(h->mby*h->mb_width + h->mbx)*4 + 2] = h->mv[MV_FWD_X2]; |
59 h->col_mv[(h->mby*h->mb_width + h->mbx)*4 + 3] = h->mv[MV_FWD_X3]; | 59 h->col_mv[(h->mby*h->mb_width + h->mbx)*4 + 3] = h->mv[MV_FWD_X3]; |
60 } | 60 } |
61 | 61 |
62 static inline void mv_pred_direct(AVSContext *h, vector_t *pmv_fw, | 62 static inline void mv_pred_direct(AVSContext *h, cavs_vector *pmv_fw, |
63 vector_t *col_mv) { | 63 cavs_vector *col_mv) { |
64 vector_t *pmv_bw = pmv_fw + MV_BWD_OFFS; | 64 cavs_vector *pmv_bw = pmv_fw + MV_BWD_OFFS; |
65 int den = h->direct_den[col_mv->ref]; | 65 int den = h->direct_den[col_mv->ref]; |
66 int m = col_mv->x >> 31; | 66 int m = col_mv->x >> 31; |
67 | 67 |
68 pmv_fw->dist = h->dist[1]; | 68 pmv_fw->dist = h->dist[1]; |
69 pmv_bw->dist = h->dist[0]; | 69 pmv_bw->dist = h->dist[0]; |
75 m = col_mv->y >> 31; | 75 m = col_mv->y >> 31; |
76 pmv_fw->y = (((den+(den*col_mv->y*pmv_fw->dist^m)-m-1)>>14)^m)-m; | 76 pmv_fw->y = (((den+(den*col_mv->y*pmv_fw->dist^m)-m-1)>>14)^m)-m; |
77 pmv_bw->y = m-(((den+(den*col_mv->y*pmv_bw->dist^m)-m-1)>>14)^m); | 77 pmv_bw->y = m-(((den+(den*col_mv->y*pmv_bw->dist^m)-m-1)>>14)^m); |
78 } | 78 } |
79 | 79 |
80 static inline void mv_pred_sym(AVSContext *h, vector_t *src, enum block_t size) { | 80 static inline void mv_pred_sym(AVSContext *h, cavs_vector *src, enum block_t size) { |
81 vector_t *dst = src + MV_BWD_OFFS; | 81 cavs_vector *dst = src + MV_BWD_OFFS; |
82 | 82 |
83 /* backward mv is the scaled and negated forward mv */ | 83 /* backward mv is the scaled and negated forward mv */ |
84 dst->x = -((src->x * h->sym_factor + 256) >> 9); | 84 dst->x = -((src->x * h->sym_factor + 256) >> 9); |
85 dst->y = -((src->y * h->sym_factor + 256) >> 9); | 85 dst->y = -((src->y * h->sym_factor + 256) >> 9); |
86 dst->ref = 0; | 86 dst->ref = 0; |