comparison zmbvenc.c @ 10544:b9fdb6b4c2dc libavcodec

cosmetics: break some long lines and insert few spaces
author kostya
date Fri, 20 Nov 2009 07:26:17 +0000
parents 7ff7a34848bf
children 8a4984c5cacc
comparison
equal deleted inserted replaced
10543:7ff7a34848bf 10544:b9fdb6b4c2dc
59 59
60 /** Block comparing function 60 /** Block comparing function
61 * XXX should be optimized and moved to DSPContext 61 * XXX should be optimized and moved to DSPContext
62 * TODO handle out of edge ME 62 * TODO handle out of edge ME
63 */ 63 */
64 static inline int block_cmp(uint8_t *src, int stride, uint8_t *src2, int stride2, int bw, int bh, int *xored) 64 static inline int block_cmp(uint8_t *src, int stride, uint8_t *src2, int stride2,
65 int bw, int bh, int *xored)
65 { 66 {
66 int sum = 0; 67 int sum = 0;
67 int i, j; 68 int i, j;
68 uint8_t histogram[256]={0}; 69 uint8_t histogram[256] = {0};
69 70
70 *xored = 0; 71 *xored = 0;
71 for(j = 0; j < bh; j++){ 72 for(j = 0; j < bh; j++){
72 for(i = 0; i < bw; i++){ 73 for(i = 0; i < bw; i++){
73 int t = src[i] ^ src2[i]; 74 int t = src[i] ^ src2[i];
76 } 77 }
77 src += stride; 78 src += stride;
78 src2 += stride2; 79 src2 += stride2;
79 } 80 }
80 81
81 for(i=1; i<256; i++) 82 for(i = 1; i < 256; i++)
82 sum+= score_tab[histogram[i]]; 83 sum += score_tab[histogram[i]];
83 84
84 return sum; 85 return sum;
85 } 86 }
86 87
87 /** Motion estimation function 88 /** Motion estimation function
88 * TODO make better ME decisions 89 * TODO make better ME decisions
89 */ 90 */
90 static int zmbv_me(ZmbvEncContext *c, uint8_t *src, int sstride, uint8_t *prev, int pstride, 91 static int zmbv_me(ZmbvEncContext *c, uint8_t *src, int sstride, uint8_t *prev,
91 int x, int y, int *mx, int *my, int *xored) 92 int pstride, int x, int y, int *mx, int *my, int *xored)
92 { 93 {
93 int dx, dy, tx, ty, tv, bv, bw, bh; 94 int dx, dy, tx, ty, tv, bv, bw, bh;
94 95
95 *mx = *my = 0; 96 *mx = *my = 0;
96 bw = FFMIN(ZMBV_BLOCK, c->avctx->width - x); 97 bw = FFMIN(ZMBV_BLOCK, c->avctx->width - x);