[cvs] / xvidcore / src / image / image.c Repository:
ViewVC logotype

Diff of /xvidcore/src/image/image.c

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

revision 1.20.2.4, Sat Oct 5 21:31:14 2002 UTC revision 1.20.2.5, Sun Oct 6 07:05:51 2002 UTC
# Line 549  Line 549 
549                  height = -height;                  height = -height;
550          }          }
551    
552            // --- xvid 2.1 compatiblity patch ---
553            // --- remove when xvid_dec_frame->stride equals real stride
554            if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB555 ||
555                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB565 ||
556                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_YUY2 ||
557                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_YVYU ||
558                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_UYVY)
559            {
560                    dst_stride *= 2;
561            }
562            else if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB24)
563            {
564                    dst_stride *= 3;
565            }
566            else if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB32 ||
567                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_ABGR ||
568                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGBA)
569            {
570                    dst_stride *= 4;
571            }
572            // ^--- xvid 2.1 compatiblity fix ---^
573    
574    
575          switch (csp & ~XVID_CSP_VFLIP) {          switch (csp & ~XVID_CSP_VFLIP) {
576          case XVID_CSP_RGB555:          case XVID_CSP_RGB555:
577                  yv12_to_rgb555(dst, dst_stride, image->y, image->u, image->v,                  yv12_to_rgb555(dst, dst_stride, image->y, image->u, image->v,
# Line 570  Line 593 
593                                            edged_width, edged_width / 2, width, height);                                            edged_width, edged_width / 2, width, height);
594                  return 0;                  return 0;
595    
596            case XVID_CSP_ABGR:
597                    yv12_to_abgr(dst, dst_stride, image->y, image->u, image->v,
598                                              edged_width, edged_width / 2, width, height);
599                    return 0;
600    
601            case XVID_CSP_RGBA:
602                    yv12_to_rgba(dst, dst_stride, image->y, image->u, image->v,
603                                              edged_width, edged_width / 2, width, height);
604                    return 0;
605    
606          case XVID_CSP_I420:          case XVID_CSP_I420:
607                  yv12_to_yuv(dst, dst_stride, image->y, image->u, image->v, edged_width,                  yv12_to_yuv(dst, dst_stride, image->y, image->u, image->v, edged_width,
608                                          edged_width / 2, width, height);                                          edged_width / 2, width, height);

Legend:
Removed from v.1.20.2.4  
changed lines
  Added in v.1.20.2.5

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