Am Sat, 28 Nov 2009 08:08:23 +0100
schrieb Gour <g...@gour-nitai.com>:

> Hiya!
> 
> With the dvdwizard developer I'm troubleshooting problem of transcode
> crashing when called in dvdcpics script...
> 
> On #transcode I was told about the workaround to use '-V rgb24' and it
> really helps, but the man says 'rgb24' is the older internal format
> and it should not be used. The other format is 'yuv420p' as default
> standard.
> 

Hi,

I was the one who suggested to use rgb mode. Unless this is a different
crash it's most likely caused by a change in libjpeg though.

If I understand the documentation correctly, libjpeg now wants to
downsample the chroma components by default. Which is bad if
they already are.

The attached patch disables the downsampling. I've also moved the
setting of the color model infront of jpeg_set_defaults(). Not sure if
it matters in raw mode, but the docs say that's how it's done..

stefan

diff -r 1e99b584363f export/export_jpg.c
--- a/export/export_jpg.c	Sun Nov 15 13:23:16 2009 +0100
+++ b/export/export_jpg.c	Mon Nov 30 00:34:38 2009 +0100
@@ -85,13 +85,18 @@
   encinfo.image_width = width;
   encinfo.image_height = height;
   encinfo.input_components = 3;
+  encinfo.in_color_space = JCS_YCbCr;
 
   jpeg_set_defaults(&encinfo);
+
   encinfo.dct_method = JDCT_FASTEST;
 
   jpeg_set_quality(&encinfo, quality, TRUE);
   encinfo.raw_data_in = TRUE;
-  encinfo.in_color_space = JCS_YCbCr;
+
+#if JPEG_LIB_VERSION >= 70
+  encinfo.do_fancy_downsampling = FALSE;
+#endif
 
   encinfo.comp_info[0].h_samp_factor = 2;
   encinfo.comp_info[0].v_samp_factor = 2;

Reply via email to