623 |
interlacing?uyvyi_to_yv12_c:uyvy_to_yv12_c, 2); |
interlacing?uyvyi_to_yv12_c:uyvy_to_yv12_c, 2); |
624 |
break; |
break; |
625 |
|
|
626 |
case XVID_CSP_I420: |
case XVID_CSP_I420: /* YCrCb == internal colorspace for MPEG */ |
627 |
yv12_to_yv12(image->y, image->u, image->v, edged_width, edged_width2, |
yv12_to_yv12(image->y, image->u, image->v, edged_width, edged_width2, |
628 |
src[0], src[0] + src_stride[0]*height, src[0] + src_stride[0]*height + (src_stride[0]/2)*height2, |
src[0], src[0] + src_stride[0]*height, src[0] + src_stride[0]*height + (src_stride[0]/2)*height2, |
629 |
src_stride[0], src_stride[0]/2, width, height, (csp & XVID_CSP_VFLIP)); |
src_stride[0], src_stride[0]/2, width, height, (csp & XVID_CSP_VFLIP)); |
630 |
break |
break; |
631 |
; |
|
632 |
case XVID_CSP_YV12: /* u/v swapped */ |
case XVID_CSP_YV12: /* YCbCr == U and V plane swapped */ |
633 |
yv12_to_yv12(image->y, image->v, image->u, edged_width, edged_width2, |
yv12_to_yv12(image->y, image->v, image->u, edged_width, edged_width2, |
634 |
src[0], src[0] + src_stride[0]*height, src[0] + src_stride[0]*height + (src_stride[0]/2)*height2, |
src[0], src[0] + src_stride[0]*height, src[0] + src_stride[0]*height + (src_stride[0]/2)*height2, |
635 |
src_stride[0], src_stride[0]/2, width, height, (csp & XVID_CSP_VFLIP)); |
src_stride[0], src_stride[0]/2, width, height, (csp & XVID_CSP_VFLIP)); |
636 |
break; |
break; |
637 |
|
|
638 |
case XVID_CSP_USER: |
case XVID_CSP_USER : /* YCrCb with arbitrary pointers and different strides for Y and UV */ |
|
/*XXX: support for different u & v strides */ |
|
639 |
yv12_to_yv12(image->y, image->u, image->v, edged_width, edged_width2, |
yv12_to_yv12(image->y, image->u, image->v, edged_width, edged_width2, |
640 |
src[0], src[1], src[2], src_stride[0], src_stride[1], |
src[0], src[1], src[2], src_stride[0], src_stride[1], /* v: dst_stride[2] not yet supported */ |
641 |
width, height, (csp & XVID_CSP_VFLIP)); |
width, height, (csp & XVID_CSP_VFLIP)); |
642 |
break; |
break; |
643 |
|
|
791 |
interlacing?yv12_to_uyvyi_c:yv12_to_uyvy_c, 2); |
interlacing?yv12_to_uyvyi_c:yv12_to_uyvy_c, 2); |
792 |
return 0; |
return 0; |
793 |
|
|
794 |
case XVID_CSP_I420: |
case XVID_CSP_I420: /* YCrCb == internal colorspace for MPEG */ |
795 |
yv12_to_yv12(dst[0], dst[0] + dst_stride[0]*height, dst[0] + dst_stride[0]*height + (dst_stride[0]/2)*height2, |
yv12_to_yv12(dst[0], dst[0] + dst_stride[0]*height, dst[0] + dst_stride[0]*height + (dst_stride[0]/2)*height2, |
796 |
dst_stride[0], dst_stride[0]/2, |
dst_stride[0], dst_stride[0]/2, |
797 |
image->y, image->u, image->v, edged_width, edged_width2, |
image->y, image->u, image->v, edged_width, edged_width2, |
798 |
width, height, (csp & XVID_CSP_VFLIP)); |
width, height, (csp & XVID_CSP_VFLIP)); |
799 |
return 0; |
return 0; |
800 |
|
|
801 |
case XVID_CSP_YV12: /* u,v swapped */ |
case XVID_CSP_YV12: /* YCbCr == U and V plane swapped */ |
802 |
yv12_to_yv12(dst[0], dst[0] + dst_stride[0]*height, dst[0] + dst_stride[0]*height + (dst_stride[0]/2)*height2, |
yv12_to_yv12(dst[0], dst[0] + dst_stride[0]*height, dst[0] + dst_stride[0]*height + (dst_stride[0]/2)*height2, |
803 |
dst_stride[0], dst_stride[0]/2, |
dst_stride[0], dst_stride[0]/2, |
804 |
image->y, image->v, image->u, edged_width, edged_width2, |
image->y, image->v, image->u, edged_width, edged_width2, |
805 |
width, height, (csp & XVID_CSP_VFLIP)); |
width, height, (csp & XVID_CSP_VFLIP)); |
806 |
return 0; |
return 0; |
807 |
|
|
808 |
case XVID_CSP_USER : /* u,v swapped */ |
case XVID_CSP_USER : /* YCrCb with arbitrary pointers and different strides for Y and UV */ |
809 |
yv12_to_yv12(dst[0], dst[1], dst[2], |
yv12_to_yv12(dst[0], dst[1], dst[2], |
810 |
dst_stride[0], dst_stride[1], /* v: dst_stride[2] */ |
dst_stride[0], dst_stride[1], /* v: dst_stride[2] not yet supported */ |
811 |
image->y, image->v, image->u, edged_width, edged_width2, |
image->y, image->u, image->v, edged_width, edged_width2, |
812 |
width, height, (csp & XVID_CSP_VFLIP)); |
width, height, (csp & XVID_CSP_VFLIP)); |
813 |
return 0; |
return 0; |
814 |
|
|