> -----Original Message----- > From: [email protected] [mailto:ivtv-devel- > [email protected]] On Behalf Of Paulus, Mark G > Sent: Thursday, November 19, 2009 6:44 AM > To: Discussion list for development of the IVTV driver > Subject: Re: [ivtv-devel] cx18: Reprise of YUV frame alignment > improvements > > > -----Original Message----- > > From: [email protected] [mailto:ivtv-devel- > > [email protected]] On Behalf Of Andy Walls > > Sent: Tuesday, November 10, 2009 9:32 PM > > To: [email protected]; [email protected] > > Subject: [ivtv-devel] cx18: Reprise of YUV frame alignment > improvements > > > > OK, here's my second attempt at getting rid of cx18 YUV frame > alignment > > and tearing issues. > > > > http://linuxtv.org/hg/~awalls/cx18-yuv2 > > > > This change primarily implements full scatter-gather buffer handling > > between the cx18 driver and the CX23418 firmware. That in turn > allows > > me to set the MDL size to have exactly one YUV frame per MDL transfer > > from the encoder to eliminate frame alignment issues, while using > very > > small buffers that should not have anyone's machine go into a panic. > > (I > > also tweaked the VBI transfer size while I was at it.) > > > > I'm pretty happy with the results. I can run this set of streams > > simultaneously from one HVR-1600 and have witnessed no new cx18 > driver > > issues on my machine: > > > > YUV: mplayer /dev/video32 -demuxer rawvideo -rawvideo > > w=720:h=480:format=hm12:ntsc > > PCM: aplay -f dat < /dev/video24 > > VBI: ~/build/zvbi-0.2.30/test/osc -2 > > MPEG: mplayer /dev/video0 -cache 8192 > > ATSC: mplayer dvb://WTTG\ DT -cache 8192 > > > > (ALSA or my soundcard couldn't mix together 3 streams of audio out to > > my > > speakers though. Only 2 streams, PCM and MPEG audio, were audible). > > > > The cx18 default YUV buffer size is now 3 * 33.75 kB = 3 full HM12 > > macroblock sets that cover 32 screen lines for each macroblock set. > A > > full NTSC frame requires 15 * 33.75 kB and a full PAL frame requires > 18 > > * 33.75 kB which is why I picked 3 * 33.75 kB. I don't anticipate > > anyone having problems with this new default YUV buffer size of about > > ~102 kB, since the current default YUV buffer size is 128 kB. > > > > (BTW the cx18 driver restricts YUV captures to sizes which are a > > multiple of 32 lines in height. I believe the reasoning is that the > > software HM12 decoders may not gracefully handle a partial macroblock > > set when not a multiple of 32 lines. This changeset is robust enough > > to > > handle lifting that restriction, if someone has a smart HM12 decoder > > that can handle partial macroblocks sensibly.) > > > > > > > > Could folks give this cx18 code a test to make sure their primary use > > cases didn't break? > > > > > > Regards, > > Andy > > > > > > _______________________________________________ > > ivtv-devel mailing list > > [email protected] > > http://ivtvdriver.org/mailman/listinfo/ivtv-devel > > Andy, > > I have built this fine on my Debian Lenny box with a Backported kernel > 2.6.30~bpo1, amd64 flavor. > > However, I cannot build this on my mythbuntu box with a 2.6.31-amd64 > kernel: > > mgpau...@mythbuntu1:~/cx18/cx18-yuv2$ make make -C > /home/mgpaulus/cx18/cx18-yuv2/v4l > make[1]: Entering directory `/home/mgpaulus/cx18/cx18-yuv2/v4l' > creating symbolic links... > make -C firmware prep > make[2]: Entering directory `/home/mgpaulus/cx18/cx18- > yuv2/v4l/firmware' > make[2]: Leaving directory `/home/mgpaulus/cx18/cx18-yuv2/v4l/firmware' > make -C firmware > make[2]: Entering directory `/home/mgpaulus/cx18/cx18- > yuv2/v4l/firmware' > make[2]: Nothing to be done for `default'. > make[2]: Leaving directory `/home/mgpaulus/cx18/cx18-yuv2/v4l/firmware' > Kernel build directory is /lib/modules/2.6.31-14-generic/build > make -C /lib/modules/2.6.31-14-generic/build > SUBDIRS=/home/mgpaulus/cx18/cx18-yu > v2/v4l modules > make[2]: Entering directory `/usr/src/linux-headers-2.6.31-14-generic' > CC [M] /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.o > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:21:17: error: dma.h: > No > such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:22:21: error: > csr1212.h: No such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:23:23: error: > highlevel.h: No such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:24:19: error: hosts.h: > No such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:25:22: error: > ieee1394.h: No such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:26:17: error: iso.h: > No > such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:27:21: error: > nodemgr.h: No such file or directory > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:37: warning: 'struct > hpsb_iso' declared inside parameter list > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:37: warning: its scope > is only this definition or declaration, which is probably not what you > want > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'rawiso_activity_cb': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:53: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:54: error: implicit > declaration of function 'hpsb_iso_n_ready' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:61: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:62: error: implicit > declaration of function 'dma_region_i' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:62: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:62: error: expected > expression before 'unsigned' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:63: warning: > assignment > makes pointer from integer without a cast > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:64: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:68: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:82: error: implicit > declaration of function 'hpsb_iso_recv_release_packets' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'node_of': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:87: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:87: warning: type > defaults to 'int' in declaration of '__mptr' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:87: warning: > initialization from incompatible pointer type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:87: error: invalid use > of undefined type 'struct unit_directory' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'node_lock': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:92: error: implicit > declaration of function 'hpsb_node_lock' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:92: error: > 'EXTCODE_COMPARE_SWAP' undeclared (first use in this function) > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:92: error: (Each > undeclared identifier is reported only once > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:92: error: for each > function it appears in.) > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:93: error: 'quadlet_t' > undeclared (first use in this function) > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:93: error: expected > ')' > > before 'arg' /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In > function 'node_read': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:98: error: implicit > declaration of function 'hpsb_node_read' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'node_write': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:103: error: implicit > declaration of function 'hpsb_node_write' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'start_iso': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:114: error: implicit > declaration of function 'hpsb_iso_recv_init' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:114: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:116: error: > 'HPSB_ISO_DMA_DEFAULT' undeclared (first use in this function) > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:118: warning: > assignment makes pointer from integer without a cast > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:125: error: implicit > declaration of function 'hpsb_iso_recv_start' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:128: error: implicit > declaration of function 'hpsb_iso_shutdown' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'stop_iso': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:139: error: implicit > declaration of function 'hpsb_iso_stop' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: At top level: > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:154: warning: 'struct > hpsb_host' declared inside parameter list > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'fcp_request': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:167: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:168: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'node_probe': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:182: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:182: warning: type > defaults to 'int' in declaration of '__mptr' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:182: warning: > initialization from incompatible pointer type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:182: error: invalid > use > of undefined type 'struct unit_directory' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:187: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:187: error: > 'quadlet_t' > undeclared (first use in this function) > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:188: error: implicit > declaration of function 'CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:188: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:188: warning: > assignment makes pointer from integer without a cast > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: At top level: > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:243: warning: 'struct > unit_directory' declared inside parameter list > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'node_update': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:245: error: > dereferencing pointer to incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: At top level: > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:253: error: variable > 'fdtv_driver' has initializer but incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:254: error: unknown > field 'name' specified in initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:254: warning: excess > elements in struct initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:254: warning: (near > initialization for 'fdtv_driver') > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:255: error: unknown > field 'update' specified in initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:255: warning: excess > elements in struct initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:255: warning: (near > initialization for 'fdtv_driver') > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:256: error: unknown > field 'driver' specified in initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:256: error: extra > brace > group at end of initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:256: error: (near > initialization for 'fdtv_driver') > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:259: warning: excess > elements in struct initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:259: warning: (near > initialization for 'fdtv_driver') > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:262: error: variable > 'fdtv_highlevel' has initializer but incomplete type > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:263: error: unknown > field 'name' specified in initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:263: warning: excess > elements in struct initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:263: warning: (near > initialization for 'fdtv_highlevel') > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:264: error: unknown > field 'fcp request' specified in initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:264: warning: excess > elements in struct initializer > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:264: warning: (near > initialization for 'fdtv_highlevel') > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'fdtv_1394_init': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:271: error: implicit > declaration of function 'hpsb_register_highlevel' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:272: error: invalid > use > of undefined type 'struct hpsb_protocol_driver' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:273: error: implicit > declaration of function 'hpsb_register_protocol' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:276: error: implicit > declaration of function 'hpsb_unregister_highlevel' > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c: In function > 'fdtv_1394_exit': > /home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.c:283: error: implicit > declaration of function 'hpsb_unregister_protocol' > make[3]: *** [/home/mgpaulus/cx18/cx18-yuv2/v4l/firedtv-1394.o] Error 1 > make[2]: *** [_module_/home/mgpaulus/cx18/cx18-yuv2/v4l] Error 2 > make[2]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic' > make[1]: *** [default] Error 2 > make[1]: Leaving directory `/home/mgpaulus/cx18/cx18-yuv2/v4l' > make: *** [all] Error 2 > mgpau...@mythbuntu1:~/cx18/cx18-yuv2$ >
Ok, one more small bit of info machine that doesn't build: $ uname -a Linux mythbuntu1 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:05:01 UTC 2009 x86_64 GNU/Linux machine that does build: $ uname -a Linux csu6220509.vzbi.com 2.6.30-bpo.1-amd64 #1 SMP Mon Aug 17 08:42:50 UTC 2009 x86_64 GNU/Linux _______________________________________________ ivtv-devel mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-devel
