From dc2380b04d9f33e2f03ae49dcffa1ef40dddbf23 Mon Sep 17 00:00:00 2001 From: Angel Carpintero Date: Sat, 29 Oct 2011 03:59:20 +0200 Subject: [PATCH] Try to fix : http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x08x20x194659 Adding dinfo.do_fancy_upsampling = FALSE; --- CHANGELOG | 2 ++ Makefile.in | 12 ++++++++++++ configure | 18 +++++++++--------- jpegutils.c | 8 ++++++++ 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 533c7c66..18ddc892 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -63,6 +63,8 @@ Bugfixes http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x01x21x162309 * Added a conditional check for avformat_alloc_context , av_avformat_alloc_context to fix http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936 (Angel Carpintero) + * Fix issue with JPEG , adding dinfo.do_fancy_upsampling = FALSE; + http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x08x20x194659 3.2.12 Summary of Changes diff --git a/Makefile.in b/Makefile.in index 08793f8b..45af71a7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -133,6 +133,11 @@ dep depend fastdep: $(DEPEND_FILE) ################################################################################ dev: distclean autotools all +################################################################################ +# DEV-GIT, BUILD with developer flags # +################################################################################ +dev-git: distclean autotools-git all + ################################################################################ # GIT, BUILD with developer flags # @@ -152,6 +157,12 @@ autotools: autoconf ./configure --with-developer-flags +autotools-git: + @sed -i 's/.\/git-commit-version.sh/.\/version.sh/g' configure.in + autoconf + ./configure --with-developer-flags + + build-commit: distclean svn set-version all set-version: @@ -172,6 +183,7 @@ help: @echo "make Build motion from local copy in your computer" @echo "make current Build last version of motion from svn" @echo "make dev Build motion with dev flags" + @echo "make dev-git Build motion with dev flags for git" @echo "make build-commit Build last version of motion and prepare to commit to svn" @echo "make build-commit-git Build last version of motion and prepare to commit to git" @echo "make clean Clean objects" diff --git a/configure b/configure index 231aadbd..7c3e8153 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for motion Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb. +# Generated by GNU Autoconf 2.67 for motion Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -549,8 +549,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='motion' PACKAGE_TARNAME='motion' -PACKAGE_VERSION='Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb' -PACKAGE_STRING='motion Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb' +PACKAGE_VERSION='Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d' +PACKAGE_STRING='motion Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1216,7 +1216,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures motion Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb to adapt to many kinds of systems. +\`configure' configures motion Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1277,7 +1277,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of motion Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb:";; + short | recursive ) echo "Configuration of motion Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d:";; esac cat <<\_ACEOF @@ -1419,7 +1419,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -motion configure Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb +motion configure Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2016,7 +2016,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by motion $as_me Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb, which was +It was created by motion $as_me Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -6437,7 +6437,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by motion $as_me Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb, which was +This file was extended by motion $as_me Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6499,7 +6499,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -motion config.status Git-5dd9ed44ecbd430a5f059e916c0f9ce9ceed0beb +motion config.status Git-7dbb5f3d9dcb34f9e7575c744d2e54ed266d128d configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/jpegutils.c b/jpegutils.c index 88574b44..e8c4550b 100644 --- a/jpegutils.c +++ b/jpegutils.c @@ -491,6 +491,8 @@ int decode_jpeg_raw (unsigned char *jpeg_data, int len, */ jpeg_read_header (&dinfo, TRUE); dinfo.raw_data_out = TRUE; + // TODO: Set to FALSE for some buggy implementation of JPEG ? + dinfo.do_fancy_upsampling = FALSE; dinfo.out_color_space = JCS_YCbCr; dinfo.dct_method = JDCT_IFAST; guarantee_huff_tables(&dinfo); @@ -581,6 +583,8 @@ int decode_jpeg_raw (unsigned char *jpeg_data, int len, if (field > 0) { jpeg_read_header (&dinfo, TRUE); dinfo.raw_data_out = TRUE; + // TODO: Set to FALSE for some buggy implementation of JPEG ? + dinfo.do_fancy_upsampling = FALSE; dinfo.out_color_space = JCS_YCbCr; dinfo.dct_method = JDCT_IFAST; jpeg_start_decompress (&dinfo); @@ -797,6 +801,8 @@ int decode_jpeg_gray_raw(unsigned char *jpeg_data, int len, */ jpeg_read_header (&dinfo, TRUE); dinfo.raw_data_out = TRUE; + // TODO: Set to FALSE for some buggy implementation of JPEG ? + dinfo.do_fancy_upsampling = FALSE; dinfo.out_color_space = JCS_GRAYSCALE; dinfo.dct_method = JDCT_IFAST; @@ -863,6 +869,8 @@ int decode_jpeg_gray_raw(unsigned char *jpeg_data, int len, if (field > 0) { jpeg_read_header (&dinfo, TRUE); dinfo.raw_data_out = TRUE; + // TODO: Set to FALSE for some buggy implementation of JPEG ? + dinfo.do_fancy_upsampling = FALSE; dinfo.out_color_space = JCS_GRAYSCALE; dinfo.dct_method = JDCT_IFAST; jpeg_start_decompress (&dinfo);