123 |
if (create->width%2 || create->height%2) |
if (create->width%2 || create->height%2) |
124 |
return XVID_ERR_FAIL; |
return XVID_ERR_FAIL; |
125 |
|
|
126 |
|
if (create->width<=0 || create->height<=0) |
127 |
|
return XVID_ERR_FAIL; |
128 |
|
|
129 |
/* allocate encoder struct */ |
/* allocate encoder struct */ |
130 |
|
|
131 |
pEnc = (Encoder *) xvid_malloc(sizeof(Encoder), CACHE_LINE); |
pEnc = (Encoder *) xvid_malloc(sizeof(Encoder), CACHE_LINE); |
1443 |
start_timer(); |
start_timer(); |
1444 |
image_setedges(&pEnc->current->image, |
image_setedges(&pEnc->current->image, |
1445 |
pEnc->mbParam.edged_width, pEnc->mbParam.edged_height, |
pEnc->mbParam.edged_width, pEnc->mbParam.edged_height, |
1446 |
pEnc->mbParam.width, pEnc->mbParam.height); |
pEnc->mbParam.width, pEnc->mbParam.height, 0); |
1447 |
stop_edges_timer(); |
stop_edges_timer(); |
1448 |
} |
} |
1449 |
|
|
1554 |
if (!reference->is_edged) { |
if (!reference->is_edged) { |
1555 |
start_timer(); |
start_timer(); |
1556 |
image_setedges(pRef, pParam->edged_width, pParam->edged_height, |
image_setedges(pRef, pParam->edged_width, pParam->edged_height, |
1557 |
pParam->width, pParam->height); |
pParam->width, pParam->height, 0); |
1558 |
stop_edges_timer(); |
stop_edges_timer(); |
1559 |
reference->is_edged = 1; |
reference->is_edged = 1; |
1560 |
} |
} |
1952 |
if (!pEnc->reference->is_edged) { |
if (!pEnc->reference->is_edged) { |
1953 |
image_setedges(f_ref, pEnc->mbParam.edged_width, |
image_setedges(f_ref, pEnc->mbParam.edged_width, |
1954 |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
1955 |
pEnc->mbParam.height); |
pEnc->mbParam.height, 0); |
1956 |
pEnc->current->is_edged = 1; |
pEnc->current->is_edged = 1; |
1957 |
} |
} |
1958 |
|
|
1969 |
if (!pEnc->current->is_edged) { |
if (!pEnc->current->is_edged) { |
1970 |
image_setedges(b_ref, pEnc->mbParam.edged_width, |
image_setedges(b_ref, pEnc->mbParam.edged_width, |
1971 |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
pEnc->mbParam.edged_height, pEnc->mbParam.width, |
1972 |
pEnc->mbParam.height); |
pEnc->mbParam.height, 0); |
1973 |
pEnc->current->is_edged = 1; |
pEnc->current->is_edged = 1; |
1974 |
} |
} |
1975 |
|
|