27 |
#include <stdlib.h> |
#include <stdlib.h> |
28 |
|
|
29 |
#include "../xvid.h" |
#include "../xvid.h" |
30 |
|
#include "../global.h" |
31 |
#include "../portab.h" |
#include "../portab.h" |
32 |
#include "../utils/emms.h" |
#include "../utils/emms.h" |
33 |
|
|
204 |
/* Normalize the global luminance accumulator */ |
/* Normalize the global luminance accumulator */ |
205 |
global /= data->mb_width*data->mb_height; |
global /= data->mb_width*data->mb_height; |
206 |
|
|
207 |
DarkThres = DarkThres*global/127.0; |
DarkThres = DarkThres*global/127.0f; |
208 |
BrightThres = BrightThres*global/127.0; |
BrightThres = BrightThres*global/127.0f; |
209 |
|
|
210 |
|
|
211 |
/* Apply luminance masking only to frames where the global luminance is |
/* Apply luminance masking only to frames where the global luminance is |
228 |
data->dquant, |
data->dquant, |
229 |
data->mb_width*data->mb_height, |
data->mb_width*data->mb_height, |
230 |
data->quant, |
data->quant, |
231 |
data->quant + data->quant/2); |
MAX(2,data->quant + data->quant/2)); |
232 |
|
|
233 |
/* Plugin job finished */ |
/* Plugin job finished */ |
234 |
return(0); |
return(0); |