comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDLtoAVIGENERATOR gives unexpected output when dimension is not power of 2?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDLtoAVIGENERATOR gives unexpected output when dimension is not power of 2? [message #52099] Tue, 09 January 2007 10:07 Go to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Hi,
the dlm grabs the list of video for windows codecs from the OS (don't use
any quicktime codecs, they won't work). When you install the codec it
contains the routine that registers the codec with the OS for futher use.
You can get links to codecs and info here: http://www.fourcc.org/. Also
Reimar Bauer answered a post to me a while ago about using Flash. There seem
to be some free options out there. Just google the newsgroups.

Haje


"biophys" <biophys@gmail.com> wrote in message
news:1168331781.447772.116590@v33g2000cwv.googlegroups.com.. .
> Haje and Rick,
>
> Thanks for the replys. It's good to know that the size has to be
> divisible by 4,8,16. For the codecs listed in IDLtoAVIGENERATOR.dlm, I
> was testing mostly with fullframe(uncompressed) and cinepack. I googled
> and found out that cinpack compressed with 4x4 data chunks. All size
> that can be divisible by 4 works perfectly with fullframe and cinepack
> as well as microsoft video 1. I still have no luck with other codecs
> listed there. Maybe that's not very important since cinepack seems to
> give reasonable balance between size and quality. I am used to use flc
> format under unix/linux and sometimes convert them into divx. I am
> curious about what do you guys use today for scientific animations? How
> do you add codecs to this dlm. Is the source of IDLtoAVI generally
> available? Flash would be great if there is an easy and free
> implementation. Unfortunately it is not free.
>
> BP
>
>
> Rick Towler wrote:
>> The issue is most likely related to the fact that your frame sizes
>> aren't evenly divisible by 4, 8, or 16. To be safe, your frame sizes
>> should be divisible by 8 and some codecs are optimized for 16. I am
>> stumped as to why the demo 300x400 works but your code doesn't. I
> oops, it seem to work now, maybe I feeded a wrong size other than
> 300x400
>> suspect that you used different codecs between the test and your code.
>> I'll guess the test was done with the cinepack codec?
>>
>> Stick with "legal" frame sizes and you should have better luck.
>>
>> -Rick
>>
>
Re: IDLtoAVIGENERATOR gives unexpected output when dimension is not power of 2? [message #52105 is a reply to message #52099] Tue, 09 January 2007 00:36 Go to previous messageGo to next message
biophys is currently offline  biophys
Messages: 68
Registered: July 2004
Member
Haje and Rick,

Thanks for the replys. It's good to know that the size has to be
divisible by 4,8,16. For the codecs listed in IDLtoAVIGENERATOR.dlm, I
was testing mostly with fullframe(uncompressed) and cinepack. I googled
and found out that cinpack compressed with 4x4 data chunks. All size
that can be divisible by 4 works perfectly with fullframe and cinepack
as well as microsoft video 1. I still have no luck with other codecs
listed there. Maybe that's not very important since cinepack seems to
give reasonable balance between size and quality. I am used to use flc
format under unix/linux and sometimes convert them into divx. I am
curious about what do you guys use today for scientific animations? How
do you add codecs to this dlm. Is the source of IDLtoAVI generally
available? Flash would be great if there is an easy and free
implementation. Unfortunately it is not free.

BP


Rick Towler wrote:
> The issue is most likely related to the fact that your frame sizes
> aren't evenly divisible by 4, 8, or 16. To be safe, your frame sizes
> should be divisible by 8 and some codecs are optimized for 16. I am
> stumped as to why the demo 300x400 works but your code doesn't. I
oops, it seem to work now, maybe I feeded a wrong size other than
300x400
> suspect that you used different codecs between the test and your code.
> I'll guess the test was done with the cinepack codec?
>
> Stick with "legal" frame sizes and you should have better luck.
>
> -Rick
>
Re: IDLtoAVIGENERATOR gives unexpected output when dimension is not power of 2? [message #52114 is a reply to message #52105] Mon, 08 January 2007 09:39 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
The issue is most likely related to the fact that your frame sizes
aren't evenly divisible by 4, 8, or 16. To be safe, your frame sizes
should be divisible by 8 and some codecs are optimized for 16. I am
stumped as to why the demo 300x400 works but your code doesn't. I
suspect that you used different codecs between the test and your code.
I'll guess the test was done with the cinepack codec?

Stick with "legal" frame sizes and you should have better luck.

-Rick

biophys wrote:
> Hello,
>
> I've been using idl2avi.dlm and lately the new IDLtoAVIGENERATOR.dlm
> quite a few times and it all gives me satisfactory results. Recently I
> need to make avi output under windows with some random size, say
> 258x349, not 128x128,256x256 as usual. The program runs smoothly and
> generates avi output. However, when I open avi with windows media
> player, the frames are like skewed by 30 to 60 degrees and sometimes
> the color is also screwed up. When I force the program to feed 256x256
> images, it works fine. It seems to be codec independent and
> reproducible in different machines. Also it does not matter if it is
> generated with 8bits or 24 bits. My guess in the title may not be
> completely true since I did not try all possible combinations of
> dimensions. The example testAVIgenerator works with its default size
> 300x400, but not some other size 258x349. But strangely 300x400 does
> not work in my program. I also had good luck with size of 512x[some
> random dimension smaller than 512] or [some random dimension smaller
> than 512]x512. I am totally lost here. Am I the only one who has this
> problem? Can someone help me understand this?
>
> Many thanks!
> BP
>
Re: IDLtoAVIGENERATOR gives unexpected output when dimension is not power of 2? [message #52116 is a reply to message #52114] Mon, 08 January 2007 05:28 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
The issues yar are having are codec related. Some codec have limitations on
the allowed image dimensions (divisible by 2, 4, etc.). idl2avi makes no
efforts in checking whether your input meets theese requirements. Supplying
wrong input can give you anything from funky results to total crashes. I use
VP3 codec for a lot of my movies and I usually pad the images to meet the
size requirements.

Good luck,
Haje


"biophys" <biophys@gmail.com> wrote in message
news:1168203313.137281.91000@42g2000cwt.googlegroups.com...
> Hello,
>
> I've been using idl2avi.dlm and lately the new IDLtoAVIGENERATOR.dlm
> quite a few times and it all gives me satisfactory results. Recently I
> need to make avi output under windows with some random size, say
> 258x349, not 128x128,256x256 as usual. The program runs smoothly and
> generates avi output. However, when I open avi with windows media
> player, the frames are like skewed by 30 to 60 degrees and sometimes
> the color is also screwed up. When I force the program to feed 256x256
> images, it works fine. It seems to be codec independent and
> reproducible in different machines. Also it does not matter if it is
> generated with 8bits or 24 bits. My guess in the title may not be
> completely true since I did not try all possible combinations of
> dimensions. The example testAVIgenerator works with its default size
> 300x400, but not some other size 258x349. But strangely 300x400 does
> not work in my program. I also had good luck with size of 512x[some
> random dimension smaller than 512] or [some random dimension smaller
> than 512]x512. I am totally lost here. Am I the only one who has this
> problem? Can someone help me understand this?
>
> Many thanks!
> BP
>
Re: IDLtoAVIGENERATOR gives unexpected output when dimension is not power of 2? [message #52227 is a reply to message #52105] Wed, 10 January 2007 15:17 Go to previous message
badjelly.witch is currently offline  badjelly.witch
Messages: 27
Registered: May 2006
Junior Member
Where can I get IDLtoAVIGENERATOR?

I'm just curious. I'm using Oleg Kornilov's avi.dll at the moment, with
a wrapper function that stops me from crashing IDL by passing bad data.
But I may go back to a DLM version in future so I want to keep an eye
on these things.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Bug in the SAX parser?
Next Topic: map_set for negative data and grid

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:00 PDT 2025

Total time taken to generate the page: 0.01162 seconds