Re: [Mlt-devel] Question about thumbnails
Brought to you by:
ddennedy,
lilo_booter
|
From: Dan D. <da...@de...> - 2008-06-16 19:19:46
|
On Thu, Jun 12, 2008 at 1:44 PM, j-b-m <j-...@us...> wrote:
> On Thursday 12 June 2008 07:55:18 you wrote:
>> Are you suggesting that this is a new problem "since a few weeks?"
> Yes, sorry it wasn't clear but thumbnails worked fine before, even with the
> westley-xml producer.
>
>> However, direct usage of avformat is better than nothing. In your
>> Producer constructor add "avformat" as a third argument.
>
> I made some tests, the best results were obtained with the following code:
>
> Mlt::Profile *m_mltProfile = new Mlt::Profile("dv_pal");
> Mlt::Producer producer(*m_mltProfile, "avformat", "/tmp/myvideo.mpg");
> Mlt::Frame * frame = producer.get_frame();
> uchar *buffer = frame->fetch_image( mlt_image_rgb24, 50, 40, 1 );
>
> The problem is that the buffer contains an unscaled image. The image has the
> size of the original source, for example if source is an image with size
> 800x600, the buffer contains an rgb image of size 800x600... No scaling is
> applied on it, and I am sure it worked before...
Yeah, sorry for that misinformation. No, scaling never worked before
by going directly to avproducer as I described.
> However I was not able to track down the problem, sorry...
I reviewed the source, but I am unable to understand how you were ever
able to get an RGB image out of fezzik. I reviewed the SVN logs over
the past month and a half, and the only thing I see that seems close
to causing a regression in this area is the removal of some redundant
rounding (see commit on filter_resize.c June 1). As I recall, the
redundant rounding sometimes causes unnecessary scaling. I was
thinking, previous to my change, this might have been forcing your
request to always be scaled, and something in the scaler filters would
become active and return rgb. However, I simply do not see in the code
where any scaler filter can both scale and return rgb. Maybe you were
taking advantage of a bug without knowing it.
I think the best resolution is to simply add proper support for rgb in
the rescale and filter_resize filters rather than figure out the
regression. I think a temporary solution is to get the yuv422, then
call mlt_frame_convert_yuv422_to_rgb24a, and finally copy just the rgb
bytes over to your own buffer. That is NOT how I am going to add
proper RGB support to these normalizing filters. But I will put this
task at the top of my agenda when the heat from my current project
subsides (should be in a couple of weeks according to some hard
deadlines I am told).
--
+-DRD-+
|