1 Nov
2003
1 Nov
'03
6:33 p.m.
Hello, On Sat, 1 Nov 2003, Alex Beregszaszi wrote: > > Moving jpeg_enc to the filter layer is doable. Two new IMGFMT's will > > be needed, like > > > > IMGFMT_ZRMJPEG (YUV422, width%16==0, height%8==0) > > IMGFMT_ZRMJPEG_INTERLACED (two concatenated JPEG images of halve > > height) > Imho IMGFMT_MJPEG is ok for it (mpi can/should handle interlacing flag), > and the filter should handle different styles of mjpeg. So for example > -vf lavc=format=mjpeg:favor=zoran should do the job. There are two problems: - it must be known at config() time whether the incoming MJPEG stream is interlaced. - vo_zr2 must decide at query_format time if it can handle the MJPEG stream, so it must be able to see if it is a zoran-compliant MJPEG stream from the format parameter. The MJPEG passthrough filter should perform some sanity-checks on the first MJPEG frame and decide if it can be decoded by the zoran hardware decoder, and if it is interlaced or not. (the first frame is available to the passthrough filter during init, right?) If the first frame is zoran-compliant it should set IMGFMT_MJPEG and IMGFMT_ZRMJPEG(_INTERLACED) as supported output formats, otherwise just IMGFMT_MJPEG. > > 3. Add vf_zrmjpeg.c, at first it will be jpeg_enc.c including a > > vf_wrapper. > Better would be copying jpeg_enc.c to vf_zrmjpeg.c and later remove > jpeg_enc.c Yes. > > [multiple output/cinerama..] > Maybe we should start the whole work in G2? G2 has plans for this > multiple output support. Well, I will write vo_zr2 in such a way that it is re-entrant. The whole state of the driver is saved in a private data structure, so that the same driver can be used for multiple cards. (the pointer to the private data structure would need to be passed to vo_zr2.c, this is the case in G2 (vo->priv)). It will be easy to port it to G2. Greetings, Rik. -- Nothing is ever a total loss; it can always serve as a bad example.