Ticket #965: vidix_nv12.diff
| File vidix_nv12.diff, 2.0 KB (added by , 18 years ago) |
|---|
-
vidix/nvidia_vid.c
789 789 value = info->pitch; 790 790 if(info->use_colorkey)value |= 1 << 20; 791 791 if(info->format == IMGFMT_YUY2)value |= 1 << 16; 792 if(info->format == IMGFMT_NV12) { 793 value |= 1 << 16 | 1; 794 VID_WR32 (info->chip.PVIDEO, 0x820 + 0, info->height * info->pitch); 795 } 792 796 VID_WR32 (info->chip.PVIDEO, 0x958 + 0, value); 793 797 //VID_WR32 (info->chip.PVIDEO, 0x958 + 4, (pitch << 1) | 0x00100000); 794 798 … … 984 988 985 989 inline static int is_supported_fourcc(uint32_t fourcc) 986 990 { 987 if (fourcc == IMGFMT_UYVY || fourcc == IMGFMT_YUY2) 991 if (fourcc == IMGFMT_UYVY || fourcc == IMGFMT_YUY2 || 992 (fourcc == IMGFMT_NV12 && info->chip.arch >= NV_ARCH_10)) 988 993 return 1; 989 994 else 990 995 return 0; … … 1036 1041 info->pitch = ((info->width << 1) + (vinfo->dest.pitch.y-1)) & ~(vinfo->dest.pitch.y-1); 1037 1042 vinfo->frame_size = info->pitch * info->height; 1038 1043 break; 1044 case IMGFMT_NV12: 1045 vinfo->dest.pitch.y = 64; 1046 vinfo->dest.pitch.u = 64; 1047 vinfo->dest.pitch.v = 64; 1048 vinfo->offset.y = 0; 1049 vinfo->offset.u = 0; 1050 vinfo->offset.v = 0; 1051 info->pitch = ((info->width << 1) + (vinfo->dest.pitch.y-1)) & ~(vinfo->dest.pitch.y-1); 1052 vinfo->frame_size = info->pitch * info->height * 2; 1053 break; 1039 1054 } 1040 1055 info->buffer_size = vinfo->frame_size; 1041 1056 info->num_frames = vinfo->num_frames= (info->chip.fbsize - info->picture_offset)/vinfo->frame_size; -
vidix/fourcc.h
78 78 79 79 /* Vendor-specific formats */ 80 80 #define IMGFMT_WNVA vid_fourcc('W','N','V','A') /* Winnov hw compress */ 81 #define IMGFMT_NV12 vid_fourcc('N','V','1','2') /* nvidia NV12 */ 81 82 82 83 #endif
