--- plugin_lumimasking.c 2004/03/22 22:36:24 1.2 +++ plugin_lumimasking.c 2006/03/11 12:10:42 1.4 @@ -20,7 +20,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: plugin_lumimasking.c,v 1.2 2004/03/22 22:36:24 edgomez Exp $ + * $Id: plugin_lumimasking.c,v 1.4 2006/03/11 12:10:42 syskin Exp $ * ****************************************************************************/ @@ -203,8 +203,8 @@ /* Normalize the global luminance accumulator */ global /= data->mb_width*data->mb_height; - DarkThres = DarkThres*global/127.0; - BrightThres = BrightThres*global/127.0; + DarkThres = DarkThres*global/127.0f; + BrightThres = BrightThres*global/127.0f; /* Apply luminance masking only to frames where the global luminance is @@ -227,7 +227,7 @@ data->dquant, data->mb_width*data->mb_height, data->quant, - data->quant + data->quant/2); + max(2,data->quant + data->quant/2)); /* Plugin job finished */ return(0);