Michael Niedermayer | 1 Jun 05:15 2011

swscale: More accurate rounding in YSCALE_YUV_2_PACKEDX_FULL_C()

ffmpeg | branch: master | Michael Niedermayer <michaelni <at> gmx.at> | Wed Jun  1 04:15:13 2011 +0200|
[201549d1a95e5ea81a97257368668cda0afcb2f8] | committer: Michael Niedermayer

swscale: More accurate rounding in YSCALE_YUV_2_PACKEDX_FULL_C()

Signed-off-by: Michael Niedermayer <michaelni <at> gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=201549d1a95e5ea81a97257368668cda0afcb2f8
---

 libswscale/swscale.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index e7e81d3..6bf7fcf 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
 <at>  <at>  -557,9 +557,9  <at>  <at>  static inline void yuv2nv12XinC(const int16_t *lumFilter, const int16_t **lumSrc
 #define YSCALE_YUV_2_PACKEDX_FULL_C(rnd,alpha) \
     for (i=0; i<dstW; i++) {\
         int j;\
-        int Y = 0;\
-        int U = -128<<19;\
-        int V = -128<<19;\
+        int Y = 1<<9;\
+        int U = (1<<9)-(128<<19);\
+        int V = (1<<9)-(128<<19);\
         int av_unused A;\
         int R,G,B;\
         \
(Continue reading)

Stefano Sabatini | 1 Jun 13:29 2011

yuv4mpeg: complain and exit if a non-rawvideo stream is selected

ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Mon May 30 17:09:12 2011
+0200| [1f95fb58137951941d8d74bd47b1635b6d2399ec] | committer: Stefano Sabatini

yuv4mpeg: complain and exit if a non-rawvideo stream is selected

The yuv4mpeg muxer will crash otherwise.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f95fb58137951941d8d74bd47b1635b6d2399ec
---

 libavformat/yuv4mpeg.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 445ec37..90b222d 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
 <at>  <at>  -154,6 +154,12  <at>  <at>  static int yuv4_write_header(AVFormatContext *s)
     if (s->nb_streams != 1)
         return AVERROR(EIO);

+    if (s->streams[0]->codec->codec_id != CODEC_ID_RAWVIDEO) {
+        av_log(s, AV_LOG_ERROR,
+               "A non-rawvideo stream was selected, but yuv4mpeg only handles rawvideo streams\n");
+        return AVERROR(EINVAL);
+    }
+
     if (s->streams[0]->codec->pix_fmt == PIX_FMT_YUV411P) {
         av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV stream, some mjpegtools might not work.\n");
     }
(Continue reading)

Stefano Sabatini | 1 Jun 13:29 2011

ffmpeg: handle copy of packets for AVFMT_RAWPICTURE output formats

ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Mon May 30 16:52:35 2011
+0200| [ac41f3b036246e64d1724d945bea01d982bd1c91] | committer: Stefano Sabatini

ffmpeg: handle copy of packets for AVFMT_RAWPICTURE output formats

Store AVPicture in AVPacket as required by AVFMT_RAWPICTURE formats.

Fix trac issue #251.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac41f3b036246e64d1724d945bea01d982bd1c91
---

 ffmpeg.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 220feb2..e962f15 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
 <at>  <at>  -1731,6 +1731,7  <at>  <at>  static int output_packet(AVInputStream *ist, int ist_index,
                         }
                     } else {
                         AVFrame avframe; //FIXME/XXX remove this
+                        AVPicture pict;
                         AVPacket opkt;
                         int64_t ost_tb_start_time= av_rescale_q(start_time, AV_TIME_BASE_Q, ost->st->time_base);

 <at>  <at>  -1784,6 +1785,13  <at>  <at>  static int output_packet(AVInputStream *ist, int ist_index,
                             opkt.size = data_size;
                         }
(Continue reading)

Stefano Sabatini | 1 Jun 13:29 2011

doc/examples: give meaningful names to the example files

ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Mon May 30 09:18:42 2011
+0200| [ca858ab77d7bb49ae99485721bbbe3a580670904] | committer: Stefano Sabatini

doc/examples: give meaningful names to the example files

Rename:
api-example.c    -> encoding-example.c
output-example.c -> muxing-example.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca858ab77d7bb49ae99485721bbbe3a580670904
---

 doc/examples/Makefile                              |    2 +-
 doc/examples/{api-example.c => encoding-example.c} |    0
 .../{output-example.c => muxing-example.c}         |    0
 3 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/examples/Makefile b/doc/examples/Makefile
index facbd7e..c32d524 100644
--- a/doc/examples/Makefile
+++ b/doc/examples/Makefile
 <at>  <at>  -3,7 +3,7  <at>  <at>  FFMPEG_LIBS=libavdevice libavformat libavfilter libavcodec libswscale libavutil
 CFLAGS+=$(shell pkg-config  --cflags $(FFMPEG_LIBS))
 LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))

-EXAMPLES=api-example output-example
+EXAMPLES=encoding-example muxing-example

 OBJS=$(addsuffix .o,$(EXAMPLES))

(Continue reading)

Stefano Sabatini | 1 Jun 13:29 2011

lavf: tag dump_format() as <at> deprecated

ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Wed Jun  1 13:07:57 2011
+0200| [adf94155989c765c4cac6e3ef5d3526555ad2274] | committer: Stefano Sabatini

lavf: tag dump_format() as  <at> deprecated

This makes the generated Doxygen doc link to the replacement
av_dump_format() function.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=adf94155989c765c4cac6e3ef5d3526555ad2274
---

 libavformat/avformat.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 41830ad..1703bcc 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
 <at>  <at>  -1459,6 +1459,9  <at>  <at>  int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
 int av_write_trailer(AVFormatContext *s);

 #if FF_API_DUMP_FORMAT
+/**
+ *  <at> deprecated Deprecated in favor of av_dump_format().
+ */
 attribute_deprecated void dump_format(AVFormatContext *ic,
                                       int index,
                                       const char *url,
Stefano Sabatini | 1 Jun 13:38 2011

swscale: fix compilation of bfin due to missing pixdesc.h header

ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Wed Jun  1 13:30:35 2011
+0200| [eb5a3ab7b0ddaa9e7ce1b5070ba44bda9ce41ce9] | committer: Stefano Sabatini

swscale: fix compilation of bfin due to missing pixdesc.h header

This is required after sws_format_name() was replaced by
av_get_pix_fmt(), which is declared in libavutil/pixdesc.h.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb5a3ab7b0ddaa9e7ce1b5070ba44bda9ce41ce9
---

 libswscale/bfin/yuv2rgb_bfin.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libswscale/bfin/yuv2rgb_bfin.c b/libswscale/bfin/yuv2rgb_bfin.c
index a2be1df..7a7dc7f 100644
--- a/libswscale/bfin/yuv2rgb_bfin.c
+++ b/libswscale/bfin/yuv2rgb_bfin.c
 <at>  <at>  -28,6 +28,7  <at>  <at> 
 #include <assert.h>
 #include "config.h"
 #include <unistd.h>
+#include "libavutil/pixdesc.h"
 #include "libswscale/rgb2rgb.h"
 #include "libswscale/swscale.h"
 #include "libswscale/swscale_internal.h"
Etienne Buira | 1 Jun 19:53 2011
Picon

Re: vsrc_buffer: remove dependency on AVFrame

On Thu, May 19, 2011 at 11:33:08PM +0200, Stefano Sabatini wrote:
> ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Sat May  7 21:35:08 2011
+0200| [6070b7e1c520e9ca389403bae20a2ad04c7d54c7] | committer: Stefano Sabatini
> 
> vsrc_buffer: remove dependency on AVFrame
> 
> Rename av_vsrc_buffer_add_frame to
> av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make
> it accept in input an AVFilterBufferRef rather than an AVFrame.
> 
> This way the interface can be used without requiring the
> inclusion/installation of libavcodec headers.
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6070b7e1c520e9ca389403bae20a2ad04c7d54c7

Hi all.

This commit seems to introduce/exhibit a serious memory leak that still
shows up in current master. Seems that frames that are decoded, but not
encoded (-ss) are not freed.

Here an execution trace: (-vcodec mpeg4 -acodec mp2 show same behaviour)
$ nice -n 19 ffmpeg -i 'input.ts' -ss 1719.02 -t 5092.72 -vcodec libx264 -preset veryslow -crf 25 -acodec
libmp3lame -aq 9 -vf crop=1408:1056:16:12,yadif,scale=704:528 output.mp4
ffmpeg version git-N-30048-g6070b7e, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun  1 2011 19:33:10 with gcc 4.4.5
  configuration: --prefix=/home/etienne/usr/ --disable-doc --enable-gpl --enable-version3
--enable-postproc --enable-avfilter --enable-nonfree --enable-libfaac --enable-libmp3lame --enable-libx264
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  6. 0 / 53.  6. 0
(Continue reading)

Reimar Döffinger | 1 Jun 20:31 2011

Simplify code and avoid compiler warning about incompatible types.

ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> | Wed Jun  1 20:29:27 2011 +0200|
[06a9da736554197601e4062298fcf45a5e8d49ff] | committer: Reimar Döffinger

Simplify code and avoid compiler warning about incompatible types.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06a9da736554197601e4062298fcf45a5e8d49ff
---

 libavformat/avio.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 972c533..b2926c0 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
 <at>  <at>  -60,11 +60,11  <at>  <at>  URLProtocol *av_protocol_next(URLProtocol *p)

 const char *avio_enum_protocols(void **opaque, int output)
 {
-    URLProtocol **p = opaque;
-    *p = *p ? (*p)->next : first_protocol;
-    if (!*p) return NULL;
-    if ((output && (*p)->url_write) || (!output && (*p)->url_read))
-        return (*p)->name;
+    URLProtocol *p = *opaque;
+    p = p ? p->next : first_protocol;
+    if (!p) return NULL;
+    if ((output && p->url_write) || (!output && p->url_read))
+        return p->name;
     return avio_enum_protocols(opaque, output);
(Continue reading)

Reimar Döffinger | 1 Jun 20:31 2011

Fix type of out[] variable, it should not be const.

ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> | Wed Jun  1 20:26:54 2011 +0200|
[bf19c871012644fe27c69531b5f733c472aa858b] | committer: Reimar Döffinger

Fix type of out[] variable, it should not be const.

Fixes compiler warning about incompatible types in sws_scale call.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf19c871012644fe27c69531b5f733c472aa858b
---

 libavfilter/vf_scale.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 9ff93bd..e172a2e 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
 <at>  <at>  -270,7 +270,8  <at>  <at>  static int scale_slice(AVFilterLink *link, struct SwsContext *sws, int y, int h,
     ScaleContext *scale = link->dst->priv;
     AVFilterBufferRef *cur_pic = link->cur_buf;
     AVFilterBufferRef *out_buf = link->dst->outputs[0]->out_buf;
-    const uint8_t *in[4], *out[4];
+    const uint8_t *in[4];
+    uint8_t *out[4];
     int in_stride[4],out_stride[4];
     int i;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog <at> ffmpeg.org
(Continue reading)

Stefano Sabatini | 2 Jun 01:07 2011
Picon

Re: vsrc_buffer: remove dependency on AVFrame

On date Wednesday 2011-06-01 19:53:48 +0200, Etienne Buira wrote:
> On Thu, May 19, 2011 at 11:33:08PM +0200, Stefano Sabatini wrote:
> > ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala <at> poste.it> | Sat May  7 21:35:08 2011
+0200| [6070b7e1c520e9ca389403bae20a2ad04c7d54c7] | committer: Stefano Sabatini
> > 
> > vsrc_buffer: remove dependency on AVFrame
> > 
> > Rename av_vsrc_buffer_add_frame to
> > av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make
> > it accept in input an AVFilterBufferRef rather than an AVFrame.
> > 
> > This way the interface can be used without requiring the
> > inclusion/installation of libavcodec headers.
> > 
> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6070b7e1c520e9ca389403bae20a2ad04c7d54c7
> 
> Hi all.
> 
> This commit seems to introduce/exhibit a serious memory leak that still
> shows up in current master. Seems that frames that are decoded, but not
> encoded (-ss) are not freed.

Have you evidence that there is currently a leak (I mean e.g. by using
valgrind)? Also can you confirm that the leak if any was introduced by
this commit and was not already present before?
--

-- 
What is food to one, is to others bitter poison.
		-- Titus Lucretius Carus

Gmane