I am going to improve theora codec with dynamically changing way. In this case we want to change compression parameters like video_q, sharpness when a keyframe is generated. When i set video quality parameter using cpi-> pb.info.quality in CommpressKeyFrame in encoder_toplevel it will not change dynamically. Can you please help me to do this. Wich function should i cange to achieve my objective.... -- ___ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20080201/f0cb4122/attachment.html
On Feb 1, 2008 5:29 AM, Asanka Dilruk <adilruk@gmail.com> wrote:> I am going to improve theora codec with dynamically changing way. In this > case we want to change compression parameters like video_qAlthough the mainline encoder does not currently treat it this way, the video_q is intended to work like a Lagrange multiplier, and the internal qi is adjusted to optimize the actual encoding mode to match the desired R/D tradeoff. There are two ways to govern encoding with theora; one is to set up a bitrate range to which it must stick (the lagrange multiplier and qi both are manipulated internally to match a bitrate traget) and a constant-quality mode where the lagrange multiplier is fixed and the qi (actually, three qis for a given frame) are chosen to acheive the best possible rate/distortion ratio. In neither case should the application be manipulating the qi directly on the fly.> sharpnessThe 'sharpness' parameter, as provided by VP3 and passed through to the Theora api in the mainline, is essentially nonfunctional. I'm not sure why On2 called it 'sharpness' but that's not what it did. In the 'Thusnelda' encoder, which will become the new mainline encoder shortly, there is no such setting. Actual sharpness control is acheived by manipulating the quantization matricies and process, something that has deep-reaching effects on every aspect of the codec's tuning. These numbers are not altered lightly (although they can be altered, and in fact should/probably will be altered considerably from what they currently are).> keyframe is generated.Again, a toplevel application has very little business making ths decision. Keyframes are generated for only two reasons: The max interval between keyframes has passed, or a keyframe would require fewer bits than a P frame. Only the theora internals have any way of knowing this information. A Keyframe (I frame) and a P frame will have the same distortion characteristics. A keyframe is not higher quality than P frame, just (usually) bigger and allows seeking.> When i set video quality parameter using > cpi->pb.info.quality in CommpressKeyFrame in encoder_toplevel it will not > change dynamically. Can you please help me to do this. Wich function should > i cange to achieve my objective....You have not actually stated your objective, just what you're attemting to do with theora (which is not going to work, at least not as you describe). Could you explain the end funtionality you're attempting to acheive (ie, what you're really trying to do, not how you're trying to do it)? Monty
Would it make sense, in a system such as the XO laptop that is designed for energy efficiency with a relatively low speed CPU, to integrate a coprocessor with the video camera that could do real-time theora compression? John Kintree
On Fri, Feb 1, 2008 at 9:52 AM, John Kintree <jkintree@swbell.net> wrote:> Would it make sense, in a system such as the XO laptop that is designed for > energy efficiency with a relatively low speed CPU, to integrate a coprocessor > with the video camera that could do real-time theora compression?Could it possibly make sense? Yes, but that would depend on the details of the coprocessor. Do you have any specific parameters for the coprocessor in mind? Monty
On Thursday 14 February 2008 06:16 am, xiphmont@xiph.org wrote:> Could it possibly make sense? Yes, but that would depend on the > details of the coprocessor. Do you have any specific parameters for > the coprocessor in mind?In March of 2005, Andrey Filippov reported that he had used a Xilinx Spartan 3 FPGA with theora to design a network camera that could compress the image from a 1280x1024 sensor at 30 fps. http://www.linuxdevices.com/articles/AT3888835064.html According to the Xilinx web site, the Spartan-3E (XC3S1200E) with 1.2M system gates can be purchased for under US$9.00 in quantites of 500K. http://www.xilinx.com/products/silicon_solutions/fpgas/spartan_series/spartan3e_fpgas/index.htm Those price/performance parameters were what I had in mind. It just seems like doing the compression right behind the sensor is the way to go. With a 640x480 sensor, maybe that kind of FPGA could also handle the audio compression? Regards, John Kintree
Hi, Andrey. Thanks for that clarification. Perhaps you are the most qualified person to present the idea to Walter Bender, or maybe to Mary Lou Jepsen. When using the Record activity of the XO laptop, the quality of the unprocessed video image is pretty good. After clicking the Record button within that activity, and saving a video clip, the quality of the clip when played from storage instead of directly from the camera is not nearly as good. IMHO, if it could be done for about $20 per laptop in large quantities, the improved quality of the recorded video as well as the reduced need for bandwidth and storage would make adding the FPGA and DDR SDRAM to the next generation XO laptop well worth it. Having lots of people producing good quality video in native ogg theora format would also be a big boost to establishing a royalty-free, open source codec as an industry standard. Regards, John Kintree On Thursday 14 February 2008 05:33 pm, Andrey Filippov wrote:> John, > > Theora compressor in FPGA need also a DDR SDRAM chip (not too expensive in > volume) and fast connection to the CPU/DMA/whatever to be able to transfer > compressed data. > > And of course I love the idea of adding FPGA+SDRAM to the system, but it > should be not just Theora encoder, but perform variety of other functions > to make it efficient. > > Andrey > > On Thu, Feb 14, 2008 at 1:17 PM, John Kintree <jkintree@swbell.net> wrote: > > On Thursday 14 February 2008 06:16 am, xiphmont@xiph.org wrote: > > > Could it possibly make sense? Yes, but that would depend on the > > > details of the coprocessor. Do you have any specific parameters for > > > the coprocessor in mind? > > > > In March of 2005, Andrey Filippov reported that he had used a > > Xilinx Spartan 3 FPGA with theora to design a network camera > > that could compress the image from a 1280x1024 sensor at 30 fps. > > http://www.linuxdevices.com/articles/AT3888835064.html > > > > According to the Xilinx web site, the Spartan-3E (XC3S1200E) > > with 1.2M system gates can be purchased for under US$9.00 > > in quantites of 500K. > > > > http://www.xilinx.com/products/silicon_solutions/fpgas/spartan_series/spa > >rtan3e_fpgas/index.htm > > > > Those price/performance parameters were what I had in mind. It > > just seems like doing the compression right behind the sensor > > is the way to go. With a 640x480 sensor, maybe that kind of FPGA > > could also handle the audio compression? > > Regards, > > John Kintree > > _______________________________________________ > > theora-dev mailing list > > theora-dev@xiph.org > > http://lists.xiph.org/mailman/listinfo/theora-dev
On Thursday 14 February 2008 05:33 pm, Andrey Filippov wrote:> And of course I love the idea of adding FPGA+SDRAM to the system, but it > should be not just Theora encoder, but perform variety of other functions > to make it efficient.What other functions could the coprocessor perform: audio and speech compression, video and audio decompression, ...? It would be great if the XO could become a platform for good quality multi-site video and voice conferencing. What would be needed to proceed: an XO laptop, the schematic of the XO motherboard, a contract, ...? Here's another thought, for anyone. Could the Speex compresssed output from a multi-site voice conference be piped to a server that would perform real time translation into different languages, and then piped back in Speex format to the participants in the conference? Regards, John Kintree