@@ -611,11 +611,11 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
611611
612612 dprintk ("%d: buffer field: %s format: 0x%08x size: %dx%d\n" ,
613613 btv -> c .nr , v4l2_field_names [buf -> vb .field ],
614- buf -> fmt -> fourcc , buf -> vb .width , buf -> vb .height );
614+ btv -> fmt -> fourcc , buf -> vb .width , buf -> vb .height );
615615
616616 /* packed pixel modes */
617- if (buf -> fmt -> flags & FORMAT_FLAGS_PACKED ) {
618- int bpl = (buf -> fmt -> depth >> 3 ) * buf -> vb .width ;
617+ if (btv -> fmt -> flags & FORMAT_FLAGS_PACKED ) {
618+ int bpl = (btv -> fmt -> depth >> 3 ) * buf -> vb .width ;
619619 int bpf = bpl * (buf -> vb .height >> 1 );
620620
621621 bttv_calc_geo (btv ,& buf -> geo ,buf -> vb .width ,buf -> vb .height ,
@@ -651,22 +651,22 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
651651 }
652652
653653 /* planar modes */
654- if (buf -> fmt -> flags & FORMAT_FLAGS_PLANAR ) {
654+ if (btv -> fmt -> flags & FORMAT_FLAGS_PLANAR ) {
655655 int uoffset , voffset ;
656656 int ypadding , cpadding , lines ;
657657
658658 /* calculate chroma offsets */
659659 uoffset = buf -> vb .width * buf -> vb .height ;
660660 voffset = buf -> vb .width * buf -> vb .height ;
661- if (buf -> fmt -> flags & FORMAT_FLAGS_CrCb ) {
661+ if (btv -> fmt -> flags & FORMAT_FLAGS_CrCb ) {
662662 /* Y-Cr-Cb plane order */
663- uoffset >>= buf -> fmt -> hshift ;
664- uoffset >>= buf -> fmt -> vshift ;
663+ uoffset >>= btv -> fmt -> hshift ;
664+ uoffset >>= btv -> fmt -> vshift ;
665665 uoffset += voffset ;
666666 } else {
667667 /* Y-Cb-Cr plane order */
668- voffset >>= buf -> fmt -> hshift ;
669- voffset >>= buf -> fmt -> vshift ;
668+ voffset >>= btv -> fmt -> hshift ;
669+ voffset >>= btv -> fmt -> vshift ;
670670 voffset += uoffset ;
671671 }
672672
@@ -677,39 +677,39 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
677677 tvnorm ,& buf -> crop );
678678 bttv_risc_planar (btv , & buf -> top , dma -> sglist ,
679679 0 ,buf -> vb .width ,0 ,buf -> vb .height ,
680- uoffset ,voffset ,buf -> fmt -> hshift ,
681- buf -> fmt -> vshift ,0 );
680+ uoffset , voffset , btv -> fmt -> hshift ,
681+ btv -> fmt -> vshift , 0 );
682682 break ;
683683 case V4L2_FIELD_BOTTOM :
684684 bttv_calc_geo (btv ,& buf -> geo ,buf -> vb .width ,
685685 buf -> vb .height ,0 ,
686686 tvnorm ,& buf -> crop );
687687 bttv_risc_planar (btv , & buf -> bottom , dma -> sglist ,
688688 0 ,buf -> vb .width ,0 ,buf -> vb .height ,
689- uoffset ,voffset ,buf -> fmt -> hshift ,
690- buf -> fmt -> vshift ,0 );
689+ uoffset , voffset , btv -> fmt -> hshift ,
690+ btv -> fmt -> vshift , 0 );
691691 break ;
692692 case V4L2_FIELD_INTERLACED :
693693 bttv_calc_geo (btv ,& buf -> geo ,buf -> vb .width ,
694694 buf -> vb .height ,1 ,
695695 tvnorm ,& buf -> crop );
696696 lines = buf -> vb .height >> 1 ;
697697 ypadding = buf -> vb .width ;
698- cpadding = buf -> vb .width >> buf -> fmt -> hshift ;
698+ cpadding = buf -> vb .width >> btv -> fmt -> hshift ;
699699 bttv_risc_planar (btv ,& buf -> top ,
700700 dma -> sglist ,
701701 0 ,buf -> vb .width ,ypadding ,lines ,
702702 uoffset ,voffset ,
703- buf -> fmt -> hshift ,
704- buf -> fmt -> vshift ,
703+ btv -> fmt -> hshift ,
704+ btv -> fmt -> vshift ,
705705 cpadding );
706706 bttv_risc_planar (btv ,& buf -> bottom ,
707707 dma -> sglist ,
708708 ypadding ,buf -> vb .width ,ypadding ,lines ,
709709 uoffset + cpadding ,
710710 voffset + cpadding ,
711- buf -> fmt -> hshift ,
712- buf -> fmt -> vshift ,
711+ btv -> fmt -> hshift ,
712+ btv -> fmt -> vshift ,
713713 cpadding );
714714 break ;
715715 case V4L2_FIELD_SEQ_TB :
@@ -718,22 +718,22 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
718718 tvnorm ,& buf -> crop );
719719 lines = buf -> vb .height >> 1 ;
720720 ypadding = buf -> vb .width ;
721- cpadding = buf -> vb .width >> buf -> fmt -> hshift ;
721+ cpadding = buf -> vb .width >> btv -> fmt -> hshift ;
722722 bttv_risc_planar (btv ,& buf -> top ,
723723 dma -> sglist ,
724724 0 ,buf -> vb .width ,0 ,lines ,
725725 uoffset >> 1 ,
726726 voffset >> 1 ,
727- buf -> fmt -> hshift ,
728- buf -> fmt -> vshift ,
727+ btv -> fmt -> hshift ,
728+ btv -> fmt -> vshift ,
729729 0 );
730730 bttv_risc_planar (btv ,& buf -> bottom ,
731731 dma -> sglist ,
732732 lines * ypadding ,buf -> vb .width ,0 ,lines ,
733733 lines * ypadding + (uoffset >> 1 ),
734734 lines * ypadding + (voffset >> 1 ),
735- buf -> fmt -> hshift ,
736- buf -> fmt -> vshift ,
735+ btv -> fmt -> hshift ,
736+ btv -> fmt -> vshift ,
737737 0 );
738738 break ;
739739 default :
@@ -742,7 +742,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
742742 }
743743
744744 /* raw data */
745- if (buf -> fmt -> flags & FORMAT_FLAGS_RAW ) {
745+ if (btv -> fmt -> flags & FORMAT_FLAGS_RAW ) {
746746 /* build risc code */
747747 buf -> vb .field = V4L2_FIELD_SEQ_TB ;
748748 bttv_calc_geo (btv ,& buf -> geo ,tvnorm -> swidth ,tvnorm -> sheight ,
@@ -755,7 +755,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
755755 }
756756
757757 /* copy format info */
758- buf -> btformat = buf -> fmt -> btformat ;
759- buf -> btswap = buf -> fmt -> btswap ;
758+ buf -> btformat = btv -> fmt -> btformat ;
759+ buf -> btswap = btv -> fmt -> btswap ;
760760 return 0 ;
761761}
0 commit comments