[svn] / trunk / xvidcore / src / plugins / plugin_lumimasking.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/plugins/plugin_lumimasking.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1872, Thu May 28 17:03:46 2009 UTC revision 1873, Tue Jun 2 13:06:54 2009 UTC
# Line 21  Line 21 
21   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23   *   *
24   * $Id: plugin_lumimasking.c,v 1.7 2009-05-27 15:52:05 Isibaar Exp $   * $Id: plugin_lumimasking.c,v 1.8 2009-06-02 13:06:54 Isibaar Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 204  Line 204 
204                          ptr += 16*j*data->current.stride[0] + 16*i;                          ptr += 16*j*data->current.stride[0] + 16*i;
205    
206                          if (handle->method) { /* Variance masking mode */                          if (handle->method) { /* Variance masking mode */
207                                    int variance = 0;
208                                  /* Accumulate sum and sum of squares over the MB */                                  /* Accumulate sum and sum of squares over the MB */
209                                  for (k = 0; k < 16; k++) {                                  for (k = 0; k < 16; k++) {
210                                          for (l = 0; l < 16; l++) {                                          for (l = 0; l < 16; l++) {
# Line 213  Line 214 
214                                          }                                          }
215                                  }                                  }
216                                  /* Variance = SSD - SAD^2 / (numpixels) */                                  /* Variance = SSD - SAD^2 / (numpixels) */
217                                  int variance = sum_of_squares - sum * sum / 256;                                  variance = sum_of_squares - sum * sum / 256;
218                                  handle->val[j*data->mb_width + i] = (float)variance;                                  handle->val[j*data->mb_width + i] = (float)variance;
219                          }                          }
220                          else { /* Luminance masking mode */                          else { /* Luminance masking mode */

Legend:
Removed from v.1872  
changed lines
  Added in v.1873

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4