Reimar Döffinger | 1 Jun 07:56 2010
Picon
Picon

Re: r23369 - trunk/libavcodec/h264.c

On Mon, May 31, 2010 at 03:02:10PM -0700, Baptiste Coudurier wrote:
> Btw, why is VDPAU using a different API than what VAAPI and DXVA are using ?

IMO: basically because nobody works on cleaning up the API, just like
nobody works (much?) on implementing hardware-accelerated decoding
to system memory.
siretart | 1 Jun 08:28 2010
Picon

r23399 - in branches/0.6: . ffmpeg.c

Author: siretart
Date: Tue Jun  1 08:28:19 2010
New Revision: 23399

Log:
ffmpeg: fail if user selected codec is experimental and strict_std_compliance > experimental

backport r23397 by janne

Modified:
   branches/0.6/   (props changed)
   branches/0.6/ffmpeg.c

Modified: branches/0.6/ffmpeg.c
==============================================================================
--- branches/0.6/ffmpeg.c	Tue Jun  1 00:35:14 2010	(r23398)
+++ branches/0.6/ffmpeg.c	Tue Jun  1 08:28:19 2010	(r23399)
 <at>  <at>  -2912,7 +2912,7  <at>  <at>  static int opt_input_ts_offset(const cha
     return 0;
 }

-static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
+static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)
 {
     const char *codec_string = encoder ? "encoder" : "decoder";
     AVCodec *codec;
 <at>  <at>  -2930,6 +2930,13  <at>  <at>  static enum CodecID find_codec_or_die(co
         fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);
         av_exit(1);
     }
(Continue reading)

siretart | 1 Jun 08:29 2010
Picon

r23400 - in branches/0.6: . ffmpeg.c

Author: siretart
Date: Tue Jun  1 08:29:50 2010
New Revision: 23400

Log:
ffmpeg: offer alternatives for experimental codecs if they exist

backport r23398 by janne

Modified:
   branches/0.6/   (props changed)
   branches/0.6/ffmpeg.c

Modified: branches/0.6/ffmpeg.c
==============================================================================
--- branches/0.6/ffmpeg.c	Tue Jun  1 08:28:19 2010	(r23399)
+++ branches/0.6/ffmpeg.c	Tue Jun  1 08:29:50 2010	(r23400)
 <at>  <at>  -2935,6 +2935,12  <at>  <at>  static enum CodecID find_codec_or_die(co
         fprintf(stderr, "%s '%s' is experimental and might produce bad "
                 "results.\nAdd '-strict experimental' if you want to use it.\n",
                 codec_string, codec->name);
+        codec = encoder ?
+            avcodec_find_encoder(codec->id) :
+            avcodec_find_decoder(codec->id);
+        if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))
+            fprintf(stderr, "Or use the non experimental %s '%s'.\n",
+                    codec_string, codec->name);
         av_exit(1);
     }
     return codec->id;
(Continue reading)

siretart | 1 Jun 08:53 2010
Picon

r31298 - in trunk: libmpcodecs/vf_palette.c libswscale/rgb2rgb.c libswscale/rgb2rgb.h

Author: siretart
Date: Tue Jun  1 08:53:56 2010
New Revision: 31298

Log:
remove palette8torgb15 and palette8tobgr15

They contain exactly the same code as their 16bit variants, so this is
effectively code de-duplication.

Modified:
   trunk/libswscale/rgb2rgb.c
   trunk/libswscale/rgb2rgb.h

Changes in other areas also in this revision:
Modified:
   trunk/libmpcodecs/vf_palette.c

Modified: trunk/libswscale/rgb2rgb.c
==============================================================================
--- trunk/libswscale/rgb2rgb.c	Mon May 31 23:24:00 2010	(r31297)
+++ trunk/libswscale/rgb2rgb.c	Tue Jun  1 08:53:56 2010	(r31298)
 <at>  <at>  -250,22 +250,6  <at>  <at>  void palette8tobgr16(const uint8_t *src,
         ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
 }

-/**
- * Palette is assumed to contain BGR15, see rgb32to15 to convert the palette.
- */
-void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
(Continue reading)

mstorsjo | 1 Jun 09:46 2010
Picon

r23401 - in trunk/libavformat: avio.c avio.h file.c gopher.c http.c librtmp.c rtmpproto.c rtpproto.c tcp.c udp.c

Author: mstorsjo
Date: Tue Jun  1 09:46:23 2010
New Revision: 23401

Log:
Declare the url_write buffer parameter as const

Modified:
   trunk/libavformat/avio.c
   trunk/libavformat/avio.h
   trunk/libavformat/file.c
   trunk/libavformat/gopher.c
   trunk/libavformat/http.c
   trunk/libavformat/librtmp.c
   trunk/libavformat/rtmpproto.c
   trunk/libavformat/rtpproto.c
   trunk/libavformat/tcp.c
   trunk/libavformat/udp.c

Modified: trunk/libavformat/avio.c
==============================================================================
--- trunk/libavformat/avio.c	Tue Jun  1 08:29:50 2010	(r23400)
+++ trunk/libavformat/avio.c	Tue Jun  1 09:46:23 2010	(r23401)
 <at>  <at>  -184,7 +184,7  <at>  <at>  int url_read_complete(URLContext *h, uns
     return len;
 }

-int url_write(URLContext *h, unsigned char *buf, int size)
+int url_write(URLContext *h, const unsigned char *buf, int size)
 {
(Continue reading)

stefano | 1 Jun 10:07 2010
Picon

r23402 - in trunk/libavcodec: avcodec.h eval.c eval.h opt.c ratecontrol.c

Author: stefano
Date: Tue Jun  1 10:07:07 2010
New Revision: 23402

Log:
Make ff_parse_expr() and ff_parse_and_eval_expr() return an int
containing an error code.

Allow these functions to convey the reason of the failure to the
calling function, failure which is not always due to a parsing error
but it may depend for example on a memory problem.

Also fix several potential memleaks.

Modified:
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/eval.c
   trunk/libavcodec/eval.h
   trunk/libavcodec/opt.c
   trunk/libavcodec/ratecontrol.c

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	Tue Jun  1 09:46:23 2010	(r23401)
+++ trunk/libavcodec/avcodec.h	Tue Jun  1 10:07:07 2010	(r23402)
 <at>  <at>  -31,7 +31,7  <at>  <at> 

 #define LIBAVCODEC_VERSION_MAJOR 52
 #define LIBAVCODEC_VERSION_MINOR 72
-#define LIBAVCODEC_VERSION_MICRO  0
(Continue reading)

stefano | 1 Jun 10:07 2010
Picon

r23404 - trunk/libavcodec/eval.c

Author: stefano
Date: Tue Jun  1 10:07:15 2010
New Revision: 23404

Log:
Cosmetics: consistently apply K&R style.

Make me and Diego happy.

Modified:
   trunk/libavcodec/eval.c

Modified: trunk/libavcodec/eval.c
==============================================================================
--- trunk/libavcodec/eval.c	Tue Jun  1 10:07:12 2010	(r23403)
+++ trunk/libavcodec/eval.c	Tue Jun  1 10:07:15 2010	(r23404)
 <at>  <at>  -29,7 +29,7  <at>  <at> 
 #include "libavutil/avutil.h"
 #include "eval.h"

-typedef struct Parser{
+typedef struct Parser {
     const AVClass *class;
     int stack_index;
     char *s;
 <at>  <at>  -48,7 +48,7  <at>  <at>  typedef struct Parser{

 static const AVClass class = { "Eval", av_default_item_name, NULL, LIBAVUTIL_VERSION_INT,
offsetof(Parser,log_offset), offsetof(Parser,log_ctx) };

(Continue reading)

stefano | 1 Jun 10:07 2010
Picon

r23403 - in trunk/libavcodec: eval.c eval.h

Author: stefano
Date: Tue Jun  1 10:07:12 2010
New Revision: 23403

Log:
Cosmetics: rename ff_parse_expr() and ff_parse_and_eval_expr() parameters:
const_name    -> const_names
const_value   -> const_values
func[12]_name -> func[12]_names
func[12]      -> funcs[12]

All these parameters contain a list of values, using plural names for
them help understanding a little.

Modified:
   trunk/libavcodec/eval.c
   trunk/libavcodec/eval.h

Modified: trunk/libavcodec/eval.c
==============================================================================
--- trunk/libavcodec/eval.c	Tue Jun  1 10:07:07 2010	(r23402)
+++ trunk/libavcodec/eval.c	Tue Jun  1 10:07:12 2010	(r23403)
 <at>  <at>  -33,12 +33,12  <at>  <at>  typedef struct Parser{
     const AVClass *class;
     int stack_index;
     char *s;
-    const double *const_value;
-    const char * const *const_name;          // NULL terminated
-    double (* const *func1)(void *, double a);           // NULL terminated
-    const char * const *func1_name;          // NULL terminated
(Continue reading)

stefano | 1 Jun 10:07 2010
Picon

r23405 - in trunk/libavcodec: eval.c eval.h

Author: stefano
Date: Tue Jun  1 10:07:17 2010
New Revision: 23405

Log:
Cosmetics: reindent and break some overly long line.

Modified:
   trunk/libavcodec/eval.c
   trunk/libavcodec/eval.h

Modified: trunk/libavcodec/eval.c
==============================================================================
--- trunk/libavcodec/eval.c	Tue Jun  1 10:07:15 2010	(r23404)
+++ trunk/libavcodec/eval.c	Tue Jun  1 10:07:17 2010	(r23405)
 <at>  <at>  -442,7 +442,7  <at>  <at>  int ff_parse_expr(AVExpr **expr, const c
                   const char * const *const_names,
                   const char * const *func1_names, double (* const *funcs1)(void *, double),
                   const char * const *func2_names, double (* const *funcs2)(void *, double, double),
-                      int log_offset, void *log_ctx)
+                  int log_offset, void *log_ctx)
 {
     Parser p;
     AVExpr *e = NULL;
 <at>  <at>  -494,7 +494,7  <at>  <at>  int ff_parse_and_eval_expr(double *d, co
                            const char * const *const_names, const double *const_values,
                            const char * const *func1_names, double (* const *funcs1)(void *, double),
                            const char * const *func2_names, double (* const *funcs2)(void *, double, double),
-                              void *opaque, int log_offset, void *log_ctx)
+                           void *opaque, int log_offset, void *log_ctx)
(Continue reading)

stefano | 1 Jun 10:07 2010
Picon

r23406 - trunk/libavcodec/eval.c

Author: stefano
Date: Tue Jun  1 10:07:21 2010
New Revision: 23406

Log:
Fix eval-test compilation.

Modified:
   trunk/libavcodec/eval.c

Modified: trunk/libavcodec/eval.c
==============================================================================
--- trunk/libavcodec/eval.c	Tue Jun  1 10:07:17 2010	(r23405)
+++ trunk/libavcodec/eval.c	Tue Jun  1 10:07:21 2010	(r23406)
 <at>  <at>  -532,7 +532,7  <at>  <at>  int main(void)
     printf("%f == 12.7\n", d);
     ff_parse_and_eval_expr(&d, "80G/80Gi",
                            const_names, const_values,
-                           NULL, NULL, NULL, NULL, NULL, NULL);
+                           NULL, NULL, NULL, NULL, NULL, 0, NULL);
     printf("%f == 0.931322575\n", d);

     for (i=0; i<1050; i++) {

Gmane