[svn] / branches / dev-api-3 / xvidcore / src / image / image.c Repository:
ViewVC logotype

Diff of /branches/dev-api-3/xvidcore/src/image/image.c

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

revision 530, Mon Sep 23 20:36:02 2002 UTC revision 543, Thu Sep 26 01:54:54 2002 UTC
# Line 160  Line 160 
160                             uint32_t edged_width,                             uint32_t edged_width,
161                             uint32_t edged_height,                             uint32_t edged_height,
162                             uint32_t width,                             uint32_t width,
163                             uint32_t height,                             uint32_t height)
                            uint32_t interlacing)  
164  {  {
165          const uint32_t edged_width2 = edged_width / 2;          const uint32_t edged_width2 = edged_width / 2;
166          const uint32_t width2 = width / 2;          const uint32_t width2 = width / 2;
# Line 174  Line 173 
173          src = image->y;          src = image->y;
174    
175          for (i = 0; i < EDGE_SIZE; i++) {          for (i = 0; i < EDGE_SIZE; i++) {
                 // if interlacing, edges contain top-most data from each field  
                 if (interlacing && (i & 1)) {  
                         memset(dst, *(src + edged_width), EDGE_SIZE);  
                         memcpy(dst + EDGE_SIZE, src + edged_width, width);  
                         memset(dst + edged_width - EDGE_SIZE,  
                                    *(src + edged_width + width - 1), EDGE_SIZE);  
                 } else {  
176                          memset(dst, *src, EDGE_SIZE);                          memset(dst, *src, EDGE_SIZE);
177                          memcpy(dst + EDGE_SIZE, src, width);                          memcpy(dst + EDGE_SIZE, src, width);
178                          memset(dst + edged_width - EDGE_SIZE, *(src + width - 1),                          memset(dst + edged_width - EDGE_SIZE, *(src + width - 1),
179                                     EDGE_SIZE);                                     EDGE_SIZE);
                 }  
180                  dst += edged_width;                  dst += edged_width;
181          }          }
182    
# Line 198  Line 189 
189    
190          src -= edged_width;          src -= edged_width;
191          for (i = 0; i < EDGE_SIZE; i++) {          for (i = 0; i < EDGE_SIZE; i++) {
                 // if interlacing, edges contain bottom-most data from each field  
                 if (interlacing && !(i & 1)) {  
                         memset(dst, *(src - edged_width), EDGE_SIZE);  
                         memcpy(dst + EDGE_SIZE, src - edged_width, width);  
                         memset(dst + edged_width - EDGE_SIZE,  
                                    *(src - edged_width + width - 1), EDGE_SIZE);  
                 } else {  
192                          memset(dst, *src, EDGE_SIZE);                          memset(dst, *src, EDGE_SIZE);
193                          memcpy(dst + EDGE_SIZE, src, width);                          memcpy(dst + EDGE_SIZE, src, width);
194                          memset(dst + edged_width - EDGE_SIZE, *(src + width - 1),                          memset(dst + edged_width - EDGE_SIZE, *(src + width - 1),
195                                     EDGE_SIZE);                                     EDGE_SIZE);
                 }  
196                  dst += edged_width;                  dst += edged_width;
197          }          }
198    

Legend:
Removed from v.530  
changed lines
  Added in v.543

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