Package: libdv Version: 1.0.0-1 Severity: minor Tags: upstream patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The build configuration option YUV_420_USE_YV12 (configure - --with-pal-yuv=YV12) actually affects encoding of "NTSC" frames (with 4:1:1 colour subsampling), contrary to documentation and inconsistent with decoding. This option is not used in the current Debian package but could affect those who rebuild it. - --- libdv-1.0.0.orig/libdv/encode.c +++ libdv-1.0.0/libdv/encode.c @@ -1712,15 +1712,15 @@ /* --------------------------------------------------------------------------- */ static void - -yv12_to_ycb( uint8_t **in, int isPAL, short *img_y, short *img_cr, short *img_cb) +yv12_to_ycb( uint8_t **in, short *img_y, short *img_cr, short *img_cb) { - - register int total = DV_WIDTH * (isPAL ? DV_PAL_HEIGHT : DV_NTSC_HEIGHT); + register int total = DV_WIDTH * DV_PAL_HEIGHT; register int i, j, k; for (i = 0; i < total; i++) img_y[i] = (((short) in[0][i]) - 128) << DCT_YUV_PRECISION; - - for (i = 0; i < (isPAL ? DV_PAL_HEIGHT : DV_NTSC_HEIGHT)/2; ++i) { + for (i = 0; i < DV_PAL_HEIGHT/2; ++i) { for (j = 0; j < DV_WIDTH/2 ; j++) { k = i * DV_WIDTH/2 + j; @@ -1796,11 +1796,12 @@ dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); break; case e_dv_color_yuv: - -#ifndef YUV_420_USE_YV12 - - yuy2_to_ycb( in[0], dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); - -#else - - yv12_to_ycb( in, dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); +#ifdef YUV_420_USE_YV12 + if (dv_enc->isPAL) + yv12_to_ycb( in, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); + else #endif + yuy2_to_ycb( in[0], dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); break; default: fprintf(stderr, "Invalid value for color_space " - --- END --- - -- System Information: Debian Release: lenny/sid APT prefers stable APT policy: (990, 'stable'), (500, 'stable'), (100, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHt0IZ79ZNCRIGYgcRAjWeAJ0ZhP5r0ulKTM3A9ihtUTiQA9mxSACeODH9 ehutbKfF8Ed6rgd4nOdJ+gY= =knhB -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]