[svn] / branches / release-1_0-branch / xvidcore / src / prediction / mbprediction.h Repository:
ViewVC logotype

Diff of /branches/release-1_0-branch/xvidcore/src/prediction/mbprediction.h

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

revision 445, Sat Sep 7 13:43:00 2002 UTC revision 456, Sun Sep 8 17:25:10 2002 UTC
# Line 26  Line 26 
26   *  along with this program; if not, write to the xvid_free Software   *  along with this program; if not, write to the xvid_free Software
27   *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28   *   *
29   *  $Id: mbprediction.h,v 1.14 2002-09-07 13:43:00 edgomez Exp $   *  $Id: mbprediction.h,v 1.15 2002-09-08 17:25:10 edgomez Exp $
30   *   *
31   *************************************************************************/   *************************************************************************/
32    
# Line 138  Line 138 
138      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
139      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
140      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
141      num_cand = 0;      last_cand = num_cand = 0;
142    
143      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
144          num_cand++;          num_cand++;
# Line 164  Line 164 
164          pmv[3] = zeroMV;          pmv[3] = zeroMV;
165      }      }
166    
167      /* if only one valid candidate predictor, the invalid candiates are set to the canidate */      /*
168             * If there're more than one candidate, we return the median vector
169             * edgomez : the special case "no candidates" is handled the same way
170             *           because all vectors are set to zero. So the median vector
171             *           is {0,0}, and this is exactly the vector we must return
172             *           according to the mpeg4 specs.
173             */
174    
175          if (num_cand != 1) {          if (num_cand != 1) {
176                  /* set median */                  /* set median */
177    
# Line 238  Line 245 
245      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
246      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
247      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
248      num_cand = 0;      last_cand = num_cand = 0;
249    
250      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
251          num_cand++;          num_cand++;
# Line 356  Line 363 
363      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
364      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
365      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
366      num_cand = 0;      last_cand = num_cand = 0;
367    
368      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
369          num_cand++;          num_cand++;
# Line 441  Line 448 
448      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
449      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
450      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
451      num_cand = 0;      last_cand = num_cand = 0;
452    
453      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
454          num_cand++;          num_cand++;

Legend:
Removed from v.445  
changed lines
  Added in v.456

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