michael | 1 May 2009 14:17
Picon

r18723 - trunk/libavcodec/mpeg12.c

Author: michael
Date: Fri May  1 14:17:25 2009
New Revision: 18723

Log:
Factorize quantization matrix loading code out.

Modified:
   trunk/libavcodec/mpeg12.c

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	Thu Apr 30 23:34:56 2009	(r18722)
+++ trunk/libavcodec/mpeg12.c	Fri May  1 14:17:25 2009	(r18723)
 <at>  <at>  -1470,42 +1470,31  <at>  <at>  static void mpeg_decode_picture_display_
         );
 }

+static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1[64], int intra){
+    int i;
+
+    for(i=0; i<64; i++) {
+        int j = s->dsp.idct_permutation[ ff_zigzag_direct[i] ];
+        int v = get_bits(&s->gb, 8);
+        if(v==0){
+            av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n");
+            return -1;
+        }
+        matrix0[j] = v;
+        if(matrix1)
(Continue reading)

michael | 1 May 2009 14:31
Picon

r18724 - trunk/libavcodec/mpeg12.c

Author: michael
Date: Fri May  1 14:31:19 2009
New Revision: 18724

Log:
Ignore first entry of intra matrixes if its invalid.
Fixes pink.mpg / issue1046.

Modified:
   trunk/libavcodec/mpeg12.c

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	Fri May  1 14:17:25 2009	(r18723)
+++ trunk/libavcodec/mpeg12.c	Fri May  1 14:31:19 2009	(r18724)
 <at>  <at>  -1480,6 +1480,10  <at>  <at>  static int load_matrix(MpegEncContext *s
             av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n");
             return -1;
         }
+        if(intra && i==0 && v!=8){
+            av_log(s->avctx, AV_LOG_ERROR, "intra matrix invalid, ignoring\n");
+            v= 8; // needed by pink.mpg / issue1046
+        }
         matrix0[j] = v;
         if(matrix1)
             matrix1[j] = v;
michael | 1 May 2009 16:38
Picon

r18725 - in trunk/libavfilter: parseutils.c parseutils.h

Author: michael
Date: Fri May  1 16:38:07 2009
New Revision: 18725

Log:
av_get_token()
based on a patch by Stefano Sabatini

Added:
   trunk/libavfilter/parseutils.c
   trunk/libavfilter/parseutils.h

Added: trunk/libavfilter/parseutils.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/libavfilter/parseutils.c	Fri May  1 16:38:07 2009	(r18725)
 <at>  <at>  -0,0 +1,110  <at>  <at> 
+/*
+ * copyright (c) 2009 Stefano Sabatini
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
(Continue reading)

stefano | 1 May 2009 20:18
Picon

r18726 - trunk/libavfilter/graphparser.c

Author: stefano
Date: Fri May  1 20:17:59 2009
New Revision: 18726

Log:
Make graphparser.c use av_get_token().
This also avoids the need for '\=' escaping.

Modified:
   trunk/libavfilter/graphparser.c

Modified: trunk/libavfilter/graphparser.c
==============================================================================
--- trunk/libavfilter/graphparser.c	Fri May  1 16:38:07 2009	(r18725)
+++ trunk/libavfilter/graphparser.c	Fri May  1 20:17:59 2009	(r18726)
 <at>  <at>  -26,6 +26,7  <at>  <at> 
 #include "graphparser.h"
 #include "avfilter.h"
 #include "avfiltergraph.h"
+#include "parseutils.h"

 #define WHITESPACES " \n\t"

 <at>  <at>  -44,49 +45,6  <at>  <at>  static int link_filter(AVFilterContext *
 }

 /**
- * Consumes a string from *buf.
- *  <at> return a copy of the consumed string, which should be free'd after use
- */
(Continue reading)

stefano | 1 May 2009 23:35
Picon

r18727 - trunk/libavfilter/parseutils.c

Author: stefano
Date: Fri May  1 23:35:01 2009
New Revision: 18727

Log:
Prefer (void) over (), for consisteny reason.

Modified:
   trunk/libavfilter/parseutils.c

Modified: trunk/libavfilter/parseutils.c
==============================================================================
--- trunk/libavfilter/parseutils.c	Fri May  1 20:17:59 2009	(r18726)
+++ trunk/libavfilter/parseutils.c	Fri May  1 23:35:01 2009	(r18727)
 <at>  <at>  -65,7 +65,7  <at>  <at>  char *av_get_token(const char **buf, con

 #undef printf

-int main()
+int main(void)
 {
     int i;
diego | 1 May 2009 23:39
Picon

r18728 - trunk/tools/pktdumper.c

Author: diego
Date: Fri May  1 23:39:53 2009
New Revision: 18728

Log:
Use new packet reading API, fixes a memory leak.
patch by Zdenek Kabelac, zdenek.kabelac gmail com

Modified:
   trunk/tools/pktdumper.c

Modified: trunk/tools/pktdumper.c
==============================================================================
--- trunk/tools/pktdumper.c	Fri May  1 23:35:01 2009	(r18727)
+++ trunk/tools/pktdumper.c	Fri May  1 23:39:53 2009	(r18728)
 <at>  <at>  -107,11 +107,14  <at>  <at>  int main(int argc, char **argv)
             write(fd, pkt.data, pkt.size);
             close(fd);
         }
+        av_free_packet(&pkt);
         pktnum++;
         if (maxpkts && (pktnum >= maxpkts))
             break;
     }

+    av_close_input_file(fctx);
+
     while (donotquit)
         sleep(60);
(Continue reading)

diego | 2 May 2009 01:21
Picon

[propchange]: r18724 - svn:log

Author: diego
Revision: 18724
Property Name: svn:log
Action: modified

Property diff:
--- old property value
+++ new property value
 <at>  <at>  -1,2 +1,2  <at>  <at> 
-Ignore first entry of intra matrixes if its invalid.
+Ignore first entry of intra matrixes if it is invalid.
 Fixes pink.mpg / issue1046.
kostya | 2 May 2009 07:17
Picon

r18729 - trunk/libavcodec/wavpack.c

Author: kostya
Date: Sat May  2 07:17:20 2009
New Revision: 18729

Log:
Decode extended bitstream for high-precision WavPack files.
Patch by Laurent Aimar [(wolf, son of Loki) <at> (videolan) <dot> (org)]

Modified:
   trunk/libavcodec/wavpack.c

Modified: trunk/libavcodec/wavpack.c
==============================================================================
--- trunk/libavcodec/wavpack.c	Fri May  1 23:39:53 2009	(r18728)
+++ trunk/libavcodec/wavpack.c	Sat May  2 07:17:20 2009	(r18729)
 <at>  <at>  -57,7 +57,7  <at>  <at>  enum WP_ID{
     WP_ID_INT32INFO,
     WP_ID_DATA,
     WP_ID_CORR,
-    WP_ID_FLT,
+    WP_ID_EXTRABITS,
     WP_ID_CHANINFO
 };

 <at>  <at>  -85,11 +85,15  <at>  <at>  typedef struct WavpackContext {
     int joint;
     uint32_t CRC;
     GetBitContext gb;
+    int got_extra_bits;
+    uint32_t crc_extra_bits;
(Continue reading)

sdrik | 2 May 2009 10:40
Picon

r29242 - trunk/libswscale/swscale_template.c

Author: sdrik
Date: Sat May  2 10:40:53 2009
New Revision: 29242

Log:
Fix chroma shift when scaling from ARGB on LE and BGRA on BE

Modified:
   trunk/libswscale/swscale_template.c

Modified: trunk/libswscale/swscale_template.c
==============================================================================
--- trunk/libswscale/swscale_template.c	Mon Apr 27 23:41:42 2009	(r29241)
+++ trunk/libswscale/swscale_template.c	Sat May  2 10:40:53 2009	(r29242)
 <at>  <at>  -2533,7 +2533,7  <at>  <at>  inline static void RENAME(hcscale)(SwsCo
     if (isGray(srcFormat) || srcFormat==PIX_FMT_MONOBLACK || srcFormat==PIX_FMT_MONOWHITE)
         return;

-    if (srcFormat==PIX_FMT_RGB32_1) {
+    if (srcFormat==PIX_FMT_RGB32_1 || srcFormat==PIX_FMT_BGR32_1) {
         src1 += ALT32_CORR;
         src2 += ALT32_CORR;
     }
banan | 2 May 2009 11:08
Picon

r18730 - in trunk/libavcodec: vc1.c wavpack.c

Author: banan
Date: Sat May  2 11:08:40 2009
New Revision: 18730

Log:
Remove dead assignments found by CSA

Modified:
   trunk/libavcodec/vc1.c
   trunk/libavcodec/wavpack.c

Modified: trunk/libavcodec/vc1.c
==============================================================================
--- trunk/libavcodec/vc1.c	Sat May  2 07:17:20 2009	(r18729)
+++ trunk/libavcodec/vc1.c	Sat May  2 11:08:40 2009	(r18730)
 <at>  <at>  -2387,7 +2387,7  <at>  <at>  static int vc1_decode_i_block(VC1Context
     GetBitContext *gb = &v->s.gb;
     MpegEncContext *s = &v->s;
     int dc_pred_dir = 0; /* Direction of the DC prediction used */
-    int run_diff, i;
+    int i;
     int16_t *dc_val;
     int16_t *ac_val, *ac_val2;
     int dcdiff;
 <at>  <at>  -2433,7 +2433,6  <at>  <at>  static int vc1_decode_i_block(VC1Context
         block[0] = dcdiff * s->c_dc_scale;
     }
     /* Skip ? */
-    run_diff = 0;
     if (!coded) {
(Continue reading)


Gmane