[cvs] / xvidcore / src / prediction / mbprediction.h Repository:
ViewVC logotype

Diff of /xvidcore/src/prediction/mbprediction.h

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

revision 1.14, Sat Sep 7 13:43:00 2002 UTC revision 1.16, Sat Oct 19 12:20:33 2002 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  -  MB prediction header file  -   *  -  MB prediction header file  -
5   *   *
6     *  Copyright(C) 2002 Christoph Lampert <gruel@web.de>
7     *               2002 Peter Ross <pross@xvid.org>
8     *
9   *  This program is an implementation of a part of one or more MPEG-4   *  This program is an implementation of a part of one or more MPEG-4
10   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending   *  Video tools as specified in ISO/IEC 14496-2 standard.  Those intending
11   *  to use this software module in hardware or software products are   *  to use this software module in hardware or software products are
# Line 138  Line 141 
141      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
142      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
143      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
144      num_cand = 0;      last_cand = num_cand = 0;
145    
146      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
147          num_cand++;          num_cand++;
# Line 164  Line 167 
167          pmv[3] = zeroMV;          pmv[3] = zeroMV;
168      }      }
169    
170      /* if only one valid candidate predictor, the invalid candiates are set to the canidate */      /*
171             * If there're more than one candidate, we return the median vector
172             * edgomez : the special case "no candidates" is handled the same way
173             *           because all vectors are set to zero. So the median vector
174             *           is {0,0}, and this is exactly the vector we must return
175             *           according to the mpeg4 specs.
176             */
177    
178          if (num_cand != 1) {          if (num_cand != 1) {
179                  /* set median */                  /* set median */
180    
# Line 238  Line 248 
248      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
249      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
250      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
251      num_cand = 0;      last_cand = num_cand = 0;
252    
253      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
254          num_cand++;          num_cand++;
# Line 356  Line 366 
366      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
367      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
368      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
369      num_cand = 0;      last_cand = num_cand = 0;
370    
371      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
372          num_cand++;          num_cand++;
# Line 441  Line 451 
451      lpos = lx + ly * mb_width;      lpos = lx + ly * mb_width;
452      rpos = rx + ry * mb_width;      rpos = rx + ry * mb_width;
453      tpos = tx + ty * mb_width;      tpos = tx + ty * mb_width;
454      num_cand = 0;      last_cand = num_cand = 0;
455    
456      if (lpos >= bound && lx >= 0) {      if (lpos >= bound && lx >= 0) {
457          num_cand++;          num_cand++;

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.16

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