Re: [libav-devel] [PATCH 1/2] doc: Add RTMP in the list of network protocols supported
On Wed, Jun 13, 2012 at 10:10:35PM +0300, Martin Storsjö wrote: > On Wed, 13 Jun 2012, Samuel Pitoiset wrote: > >--- a/doc/general.texi > >+++ b/doc/general.texi > >@@ -810,6 +810,7 @@ performance on systems without hardware floating point > >support). > >@item MMS @tab X > >@item pipe @tab X > >+@item RTMP @tab X > >@item RTP @tab X > >@item TCP @tab X > > Ok with me. RTMP also is mentioned in the "file formats" list > already, which feels a bit odd to me. But this should be ok at > least... So move it. Note that the protocols section appears to be missing more than just RTMP, somebody needs to sit down and make it complete. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavfi: Add the af_channelmap audio channel mapping filter.
On Wed, 13 Jun 2012 18:49:02 -0700, Alex Converse wrote: > Inspired by MPlayer's af_channels filter and SoX's remix effect. > --- > Changelog |1 + > doc/filters.texi| 24 +++ > libavfilter/Makefile|1 + > libavfilter/af_channelmap.c | 406 > +++ > libavfilter/allfilters.c|1 + > 5 files changed, 433 insertions(+), 0 deletions(-) > create mode 100644 libavfilter/af_channelmap.c > > diff --git a/Changelog b/Changelog > index b80ff88..580381d 100644 > --- a/Changelog > +++ b/Changelog > @@ -25,6 +25,7 @@ version : >be used with -of old. > - Indeo Audio decoder > - channelsplit audio filter > +- audio channel mapping filter > > > version 0.8: > diff --git a/doc/filters.texi b/doc/filters.texi > index f17dad8..00ab07e 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -232,6 +232,30 @@ front_center.wav -map '[LFE]' lfe.wav -map '[SL]' > side_left.wav -map '[SR]' > side_right.wav > @end example > > +@section channelmap > +Remap input channels to new locations. > + > +This filter accepts the following named parameters: > +@table @option > +@item channel_layout > +Channel layout of the output stream. > + > +@item map > +A comma-seperated list of input to output mappings. You should specify what exactly are allowed forms of those mappings, so the user doesn't have to derive it from examples. Also if I'm reading the code right, while several forms are allowed, the same one must be used in all mappings. That should be documented too. > +@end table > + > +For example, assuming a 5.1+downmix input MOV file > +@example > +avconv -i in.mov -filter 'channelmap=map=DL-FL\,DR-FR' out.wav > +@end example > +will create an output Wave file tagged as stereo from the downmix channels of > +the input. > + > +To fix a 5.1 wav improperly encoded in AAC's native channel order > +@example > +avconv -i in.wav -filter 'channelmap=1\,2\,0\,5\,3\,4:channel_layout=5.1' > out.wav > +@end example > + > @section resample > Convert the audio sample format, sample rate and channel layout. This filter > is > not meant to be used directly, it is inserted automatically by libavfilter > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > index 955a97c..7d1ced0 100644 > --- a/libavfilter/Makefile > +++ b/libavfilter/Makefile > @@ -30,6 +30,7 @@ OBJS-$(CONFIG_AMIX_FILTER) += af_amix.o > OBJS-$(CONFIG_ANULL_FILTER) += af_anull.o > OBJS-$(CONFIG_ASPLIT_FILTER) += split.o > OBJS-$(CONFIG_ASYNCTS_FILTER)+= af_asyncts.o > +OBJS-$(CONFIG_CHANNELMAP_FILTER) += af_channelmap.o > OBJS-$(CONFIG_CHANNELSPLIT_FILTER) += af_channelsplit.o > OBJS-$(CONFIG_RESAMPLE_FILTER) += af_resample.o > > diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c > new file mode 100644 > index 000..788affc > --- /dev/null > +++ b/libavfilter/af_channelmap.c > @@ -0,0 +1,406 @@ > +/* > + * Copyright (c) 2012 Google, Inc. > + * > + * This file is part of Libav. > + * > + * Libav 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. > + * > + * Libav 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. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with Libav; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +/** > + * @file > + * audio channel mapping filter > + */ > + > +#include > + > +#include "libavutil/audioconvert.h" > +#include "libavutil/avstring.h" > +#include "libavutil/mathematics.h" > +#include "libavutil/opt.h" > +#include "libavutil/samplefmt.h" > + > +#include "audio.h" > +#include "avfilter.h" > +#include "formats.h" > +#include "internal.h" > + > +struct ChannelMap { > +uint64_t in_channel; > +uint64_t out_channel; > +int in_channel_idx; > +int out_channel_idx; > +}; > + > +enum MappingMode { > +MAP_NONE, > +MAP_ONE_INT, > +MAP_ONE_STR, > +MAP_PAIR_INT_INT, > +MAP_PAIR_INT_STR, > +MAP_PAIR_STR_INT, > +MAP_PAIR_STR_STR > +}; > + > +#define MAX_CH 64 > +typedef struct ChannelMapContext { > +const AVClass *class; > +AVFilterChannelLayouts *channel_layouts; > +char *mapping_str; > +char *channel_layout_str; > +int nch; > +int output_layout; Wrong type? > +struct ChannelMap map[MAX_CH]; > +enum MappingMode mode; > +} ChannelMapContext; > + > +#define OFFSET(x) offsetof(ChannelMapContext, x) > +#define A
Re: [libav-devel] [PATCH 2/2] RTMPT protocol support
On Wed, Jun 13, 2012 at 05:17:47PM +0200, Samuel Pitoiset wrote: > This adds add two protocols, but one of them is an internal implementation adds add ---> adds Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Avoid C99 variable declarations within for statements.
We generally do not declare variables within for statements and there are compilers that choke on such constructs. --- avplay.c |6 +++--- libavcodec/pthread.c |3 ++- libavdevice/dv1394.h |3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/avplay.c b/avplay.c index c01e446..e9389ff 100644 --- a/avplay.c +++ b/avplay.c @@ -2608,13 +2608,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) static void toggle_full_screen(void) { -is_full_screen = !is_full_screen; #if defined(__APPLE__) && SDL_VERSION_ATLEAST(1, 2, 14) /* OS X needs to empty the picture_queue */ -for (int i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { +int i; +for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) cur_stream->pictq[i].reallocate = 1; -} #endif +is_full_screen = !is_full_screen; video_open(cur_stream); } diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 88d8ade..c7edb9e 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -865,6 +865,7 @@ error: void ff_thread_flush(AVCodecContext *avctx) { +int i; FrameThreadContext *fctx = avctx->thread_opaque; if (!avctx->thread_opaque) return; @@ -880,7 +881,7 @@ void ff_thread_flush(AVCodecContext *avctx) fctx->next_decoding = fctx->next_finished = 0; fctx->delaying = 1; fctx->prev_thread = NULL; -for (int i = 0; i < avctx->thread_count; i++) { +for (i = 0; i < avctx->thread_count; i++) { PerThreadContext *p = &fctx->threads[i]; // Make sure decode flush calls with size=0 won't return old frames p->got_frame = 0; diff --git a/libavdevice/dv1394.h b/libavdevice/dv1394.h index 5ccc68a..fc4df24 100644 --- a/libavdevice/dv1394.h +++ b/libavdevice/dv1394.h @@ -175,7 +175,8 @@ if(status.dropped_frames > 0) { reset_dv1394(); } else { - for(int i = 0; i < status.n_clear_frames; i++) { + int i; + for (i = 0; i < status.n_clear_frames; i++) { copy_DV_frame(); } } -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] RTMPT protocol support
On Wed, Jun 13, 2012 at 09:59:42PM +0300, Martin Storsjö wrote: > On Wed, 13 Jun 2012, Samuel Pitoiset wrote: > > >This adds add two protocols, but one of them is an internal implementation > >detail just used as an abstraction layer/generalization in the code. The > >RTMPT protocol implementation uses rtmphttp:// as an alternative to the > >tcp:// protocol. This allows moving most of the lower level logic out > >from the higher level generic rtmp code. > >--- > >Changelog|1 + > >doc/general.texi |1 + > >doc/protocols.texi |8 ++ > >libavformat/Makefile |1 + > >libavformat/allformats.c |2 + > >libavformat/rtmphttp.c | 220 > >++ > >libavformat/rtmpproto.c | 31 ++- > >libavformat/version.h|4 +- > >8 files changed, 263 insertions(+), 5 deletions(-) > >create mode 100644 libavformat/rtmphttp.c > > When you repost a big patch like this one, re-reading all of it to > find out what has changed since the last iteration takes a bit of > time. If you split sending of the patch into two steps, git > format-patch, and then git send-email to send that file, you can > edit the file inbetween (you might be able to do the same with some > options to the normal git send-email workflow too). git send-email --annotate Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Avoid C99 variable declarations within for statements.
On Thu, 14 Jun 2012 10:24:19 +0200, Diego Biurrun wrote: > We generally do not declare variables within for statements and > there are compilers that choke on such constructs. > --- LGTM -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] doc: Add missing protocols to list of supported protocols.
--- I'm not entirely sure this is fully correct as I'm not sure if things like "concat" should be mentioned in this list. Also, for some protocols (HLS?) mentioning the long name instead of the abbreviation might be better. doc/general.texi | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index dee8f9e..d8adc0e 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -805,18 +805,34 @@ performance on systems without hardware floating point support). @multitable @columnfractions .4 .1 @item Name @tab Support @item Apple HTTP Live Streaming @tab X +@item concat @tab X +@item crypto @tab X @item file @tab X @item Gopher @tab X +@item HLS @tab X @item HTTP @tab X -@item MMS @tab X +@item HTTPPROXY@tab X +@item HTTPS@tab X +@item MD5 @tab X +@item MMSH @tab X +@item MMST @tab X @item pipe @tab X +@item RTMP @tab X +@item RTMPE@tab E +@item RTMPS@tab E +@item RTMPT@tab E +@item RTMPTE @tab E @item RTP @tab X +@item SCTP @tab X @item TCP @tab X +@item TLS @tab X @item UDP @tab X @end multitable @code{X} means that the protocol is supported. +@code{E} means that support is provided through an external library. + @section Input/Output Devices -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: Add missing protocols to list of supported protocols.
On Thu, 14 Jun 2012, Diego Biurrun wrote: --- I'm not entirely sure this is fully correct as I'm not sure if things like "concat" should be mentioned in this list. Also, for some protocols (HLS?) mentioning the long name instead of the abbreviation might be better. doc/general.texi | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/doc/general.texi b/doc/general.texi index dee8f9e..d8adc0e 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -805,18 +805,34 @@ performance on systems without hardware floating point support). @multitable @columnfractions .4 .1 @item Name @tab Support @item Apple HTTP Live Streaming @tab X +@item concat @tab X +@item crypto @tab X @item file @tab X @item Gopher @tab X +@item HLS @tab X @item HTTP @tab X -@item MMS @tab X +@item HTTPPROXY@tab X +@item HTTPS@tab X +@item MD5 @tab X +@item MMSH @tab X +@item MMST @tab X @item pipe @tab X +@item RTMP @tab X +@item RTMPE@tab E +@item RTMPS@tab E +@item RTMPT@tab E +@item RTMPTE @tab E @item RTP @tab X +@item SCTP @tab X @item TCP @tab X +@item TLS @tab X @item UDP @tab X @end multitable I'm not sure if it's useful to list every single one of them - e.g. httpproxy is more or less an internal detail - it's for creating a plain connection via a http proxy, which you'd normally just use as a implementation detail internally when connecting tls (or https) via a proxy. But in some very special cases you could want to use it directly, too. The rtmphttp protocol in Samuel's patch is the same but with even less reason for anyone to ever use it directly. Or put another way - this list is probably most useful for a user wondering "does libav support protocol X?", and such a user won't really know about our own internal protocols. HLS is already listed as Apple HTTP Live Streaming. // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Support for MSVC.
"Ronald S. Bultje" writes: > Hi, > > see attached. It's kinda big, some parts can/should be done > differently, but it's a starting point so let's start talking about > how to get this in the right way. If you split the patch into logically independent "fixes", reviewing it might be almost possible. As is, I refuse to even begin looking at it. > Some general comments: > - only tested on 32bit so far > - no it won't compile on non-MSVC with my patch (I had to break the > Makefile in a couple of places to get linking to work) That's fine for a work in progress. We can fix it properly later. > - the include of stdlib.h everywhere is because of [1]. We may need to > add av_restrict instead. I fail to see how that ph0rum post suggests including stdlib.h everywhere. The problem is that msvc doesn't support the restrict keyword. You'll have remove it with a custom preprocessor or something, just like you have to remove designated initialisers. > - the include of mathematics.h, avconfig.h and avstring.h everywhere > is (I think) legit, to account for snprintf(), M_PI or inline. I seriously doubt that those are really needed in all the places you've added them. > - the added assembly in fmtconvert.asm helps to get rid of a VLA in > fmtconvert_mmx.c. Please submit that as a separate patch. It's a good thing on its own. > - test.c converts c99 to c89 which MSVC can compile. Don't look at it > unless you want to see true pain, it's intended to be shipped outside, > like gas-preprocessor.pl. (unit.c and unit2.c are unittests for it.) Then please do not include those in the patch. > - the renames of libavutil/x86/cpu.c, libavcodec/x86/mlpdsp.c and > libswscale/x86/rgb2rgb.c are to prevent duplicate filenames in the > same library, which makes the MSVC linker crap out in debug mode > (works fine in release mode). Seriously? -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Support for MSVC.
"Ronald S. Bultje" writes: > Hi, > > On Wed, Jun 13, 2012 at 8:49 PM, Derek Buitenhuis > wrote: >> On 13/06/2012 11:40 PM, Derek Buitenhuis wrote: >>> On 13/06/2012 7:59 PM, Ronald S. Bultje wrote: - the include of mathematics.h, avconfig.h and avstring.h everywhere is (I think) legit, to account for snprintf(), M_PI or inline. >>> >>> We don't need to do this for mathematics.h, as discussed on IRC. >>> >>> If we define _USE_MATH_DEFINES, we have access to teh usual M_PI, etc. >>> in MSVC's math.h. >> >> And a followup with: >> >> http://msdn.microsoft.com/en-us/library/2ts7cx93%28v=vs.80%29.aspx >> >> or >> >> http://msdn.microsoft.com/en-us/library/f30dzcf6%28v=vs.80%29.aspx > > Same here, the snprintf define can go in config.h or avstring.h (and > then include that everywhere) - which do people prefer? I prefer you do that in your preprocessor. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Support for MSVC.
"Ronald S. Bultje" writes: > Hi, > > On Wed, Jun 13, 2012 at 8:40 PM, Derek Buitenhuis > wrote: >> On 13/06/2012 7:59 PM, Ronald S. Bultje wrote: >>> - the include of mathematics.h, avconfig.h and avstring.h everywhere >>> is (I think) legit, to account for snprintf(), M_PI or inline. >> >> We don't need to do this for mathematics.h, as discussed on IRC. >> >> If we define _USE_MATH_DEFINES, we have access to teh usual M_PI, etc. >> in MSVC's math.h. > > Interesting, hadn't noticed yet. So, we can add this to config.h (if > needed), or in mathematics.h (but then we still need all the include > modifications). Which one do people prefer? CFLAGS -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] rtpdec: Don't require frames to start with a Mode A packet
While there is no reason for starting a frame with anything else than a Mode A packet, some senders seem to consistently use Mode B packets for everything. This fixes depacketization of such streams. --- libavformat/rtpdec_h263_rfc2190.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtpdec_h263_rfc2190.c b/libavformat/rtpdec_h263_rfc2190.c index a3a4825..92102f3 100644 --- a/libavformat/rtpdec_h263_rfc2190.c +++ b/libavformat/rtpdec_h263_rfc2190.c @@ -132,7 +132,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, if (!data->buf) { /* Check the picture start code, only start buffering a new frame * if this is correct */ -if (!f && len > 4 && AV_RB32(buf) >> 10 == 0x20) { +if (len > 4 && AV_RB32(buf) >> 10 == 0x20) { int ret = avio_open_dyn_buf(&data->buf); if (ret < 0) return ret; -- 1.7.9.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] dtx mode not implemented - sample file (not subscribed)
On Mon, 11 Jun 2012, Huw Greenhough wrote: Just to let you know I uploaded MOV00669.3gp & MOV00669.3gp.txt to upload.libav.org/incoming/ in case they are useful. Sorry I couldn't figure Git out, so if the problem is already fixed, sorry for troubling you. It's not fixed (and there's not much progress on getting it implemented currently either), but if you need it handled, you can use the libopencore_amrnb decoder instead of the built-in one - that one handles DTX packets just fine. // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] rtmp: Read and handle incoming packets while writing data
--- libavformat/rtmppkt.c | 16 +--- libavformat/rtmppkt.h | 13 + libavformat/rtmpproto.c | 30 ++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index ed8e6b2..4ce238d 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -74,15 +74,25 @@ void ff_amf_write_object_end(uint8_t **dst) int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt) { -uint8_t hdr, t, buf[16]; +uint8_t hdr; + +if (ffurl_read(h, &hdr, 1) != 1) +return AVERROR(EIO); + +return ff_rtmp_packet_read_internal(h, p, chunk_size, prev_pkt, hdr); +} + +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket *prev_pkt, uint8_t hdr) +{ + +uint8_t t, buf[16]; int channel_id, timestamp, data_size, offset = 0; uint32_t extra = 0; enum RTMPPacketType type; int size = 0; int ret; -if (ffurl_read(h, &hdr, 1) != 1) -return AVERROR(EIO); size++; channel_id = hdr & 0x3F; diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 8372484..a83d0fe 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -115,6 +115,19 @@ void ff_rtmp_packet_destroy(RTMPPacket *pkt); */ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt); +/** + * Read internal RTMP packet sent by the server. + * + * @param h reader context + * @param p packet + * @param chunk_size current chunk size + * @param prev_pkt previously read packet headers for all channels + * (may be needed for restoring incomplete packet header) + * @param c the first byte already read + * @return number of bytes read on success, negative value otherwise + */ +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket *prev_pkt, uint8_t c); /** * Send RTMP packet to the server. diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index e64e2a3..b3ae5a2 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1287,6 +1287,7 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) int pktsize, pkttype; uint32_t ts; const uint8_t *buf_temp = buf; +uint8_t c; int ret; do { @@ -1356,6 +1357,35 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) rt->flv_header_bytes = 0; } } while (buf_temp - buf < size); + +/* set stream into nonblocking mode */ +rt->stream->flags |= AVIO_FLAG_NONBLOCK; + +/* try to read one byte from the stream */ +ret = ffurl_read(rt->stream, &c, 1); + +/* switch the stream back into blocking mode */ +rt->stream->flags &= ~AVIO_FLAG_NONBLOCK; + +if (ret == AVERROR(EAGAIN)) { +/* no incoming data to handle */ +return size; +} else if (ret < 0) { +return ret; +} else if (ret == 1) { +RTMPPacket rpkt = { 0 }; + +if ((ret = ff_rtmp_packet_read_internal(rt->stream, &rpkt, +rt->chunk_size, +rt->prev_pkt[0], c)) <= 0) + return ret; + +if ((ret = rtmp_parse_result(s, rt, &rpkt)) < 0) +return ret; + +ff_rtmp_packet_destroy(&rpkt); +} + return size; } -- 1.7.10.3 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/3] rtmp: Read and handle incoming packets while writing data
This makes sure all incoming packets are read and handled (and reacted to) while sending an FLV stream over RTMP to a server. If there were enough incoming data to fill the TCP buffers, this could potentially make things block at unexpected places. For the upcoming RTMPT support, we need to consume all incoming data before we can send the next request. --- libavformat/rtmppkt.c | 16 +--- libavformat/rtmppkt.h | 13 + libavformat/rtmpproto.c | 30 ++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index ed8e6b2..4ce238d 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -74,15 +74,25 @@ void ff_amf_write_object_end(uint8_t **dst) int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt) { -uint8_t hdr, t, buf[16]; +uint8_t hdr; + +if (ffurl_read(h, &hdr, 1) != 1) +return AVERROR(EIO); + +return ff_rtmp_packet_read_internal(h, p, chunk_size, prev_pkt, hdr); +} + +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket *prev_pkt, uint8_t hdr) +{ + +uint8_t t, buf[16]; int channel_id, timestamp, data_size, offset = 0; uint32_t extra = 0; enum RTMPPacketType type; int size = 0; int ret; -if (ffurl_read(h, &hdr, 1) != 1) -return AVERROR(EIO); size++; channel_id = hdr & 0x3F; diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 8372484..a83d0fe 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -115,6 +115,19 @@ void ff_rtmp_packet_destroy(RTMPPacket *pkt); */ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt); +/** + * Read internal RTMP packet sent by the server. + * + * @param h reader context + * @param p packet + * @param chunk_size current chunk size + * @param prev_pkt previously read packet headers for all channels + * (may be needed for restoring incomplete packet header) + * @param c the first byte already read + * @return number of bytes read on success, negative value otherwise + */ +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket *prev_pkt, uint8_t c); /** * Send RTMP packet to the server. diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index e64e2a3..b3ae5a2 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1287,6 +1287,7 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) int pktsize, pkttype; uint32_t ts; const uint8_t *buf_temp = buf; +uint8_t c; int ret; do { @@ -1356,6 +1357,35 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) rt->flv_header_bytes = 0; } } while (buf_temp - buf < size); + +/* set stream into nonblocking mode */ +rt->stream->flags |= AVIO_FLAG_NONBLOCK; + +/* try to read one byte from the stream */ +ret = ffurl_read(rt->stream, &c, 1); + +/* switch the stream back into blocking mode */ +rt->stream->flags &= ~AVIO_FLAG_NONBLOCK; + +if (ret == AVERROR(EAGAIN)) { +/* no incoming data to handle */ +return size; +} else if (ret < 0) { +return ret; +} else if (ret == 1) { +RTMPPacket rpkt = { 0 }; + +if ((ret = ff_rtmp_packet_read_internal(rt->stream, &rpkt, +rt->chunk_size, +rt->prev_pkt[0], c)) <= 0) + return ret; + +if ((ret = rtmp_parse_result(s, rt, &rpkt)) < 0) +return ret; + +ff_rtmp_packet_destroy(&rpkt); +} + return size; } -- 1.7.10.3 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/4 V6] libavcodec: HDMV Interactive Graphics Stream decoder
This new decoder will allow to decode menu streams found in m2ts files in Bluray or AVCHD HDMV disks. Signed-off-by: David Girault --- version 6: - rename decoder functions - more stylistical fixes version 5: - add documentation, version and changelog updates - add missing malloc checks - fixes most stylistical remarks version 4: - Added some fixes for x264 demo disk that have button without picture. - Change palette conversion to avoid convertion in avplay. Changelog |1 + doc/general.texi|9 + libavcodec/Makefile |1 + libavcodec/allcodecs.c |3 + libavcodec/avcodec.h| 55 libavcodec/igsmenudec.c | 801 +++ libavcodec/utils.c | 36 +++ libavcodec/version.h|2 +- libavutil/avutil.h |1 + 9 files changed, 908 insertions(+), 1 deletion(-) create mode 100644 libavcodec/igsmenudec.c diff --git a/Changelog b/Changelog index b80ff88..0a5de25 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,7 @@ version : be used with -of old. - Indeo Audio decoder - channelsplit audio filter +- HDMV IGS decoder version 0.8: diff --git a/doc/general.texi b/doc/general.texi index dee8f9e..370670e 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -800,6 +800,15 @@ performance on systems without hardware floating point support). @code{X} means that the feature is supported. +@section Overlay Formats + +@multitable @columnfractions .4 .1 .1 .1 .1 +@item Name @tab Muxing @tab Demuxing @tab Encoding @tab Decoding +@item IGS @tab @tab @tab @tab X +@end multitable + +@code{X} means that the feature is supported. + @section Network Protocols @multitable @columnfractions .4 .1 diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 3bfd78b..728cbc6 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -201,6 +201,7 @@ OBJS-$(CONFIG_IAC_DECODER) += imc.o OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o OBJS-$(CONFIG_IFF_BYTERUN1_DECODER)+= iff.o OBJS-$(CONFIG_IFF_ILBM_DECODER)+= iff.o +OBJS-$(CONFIG_IGSMENU_DECODER) += igsmenudec.o OBJS-$(CONFIG_IMC_DECODER) += imc.o OBJS-$(CONFIG_INDEO2_DECODER) += indeo2.o OBJS-$(CONFIG_INDEO3_DECODER) += indeo3.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 01d13d5..3e529d7 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -375,6 +375,9 @@ void avcodec_register_all(void) REGISTER_DECODER (SRT, srt); REGISTER_ENCDEC (XSUB, xsub); +/* specific data */ +REGISTER_DECODER (IGSMENU, igsmenu); + /* external libraries */ REGISTER_ENCODER (LIBFAAC, libfaac); REGISTER_ENCDEC (LIBGSM, libgsm); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 4a07d6d..1ebd7b8 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -407,6 +407,10 @@ enum CodecID { CODEC_ID_DVB_TELETEXT, CODEC_ID_SRT, +/* overlay codecs */ +CODEC_ID_FIRST_OVERLAY = 0x17800, ///< A dummy ID pointing at the start of overlay codecs. +CODEC_ID_HDMV_IGS_MENU, + /* other specific kind of codecs (generally used for attachments) */ CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. CODEC_ID_TTF = 0x18000, @@ -3096,6 +3100,30 @@ typedef struct AVSubtitle { int64_t pts;///< Same as packet pts, in AV_TIME_BASE } AVSubtitle; +typedef struct AVOverlayRect { +int x; ///< top left corner of pict, undefined when pict is not set +int y; ///< top left corner of pict, undefined when pict is not set +int w; ///< widthof pict, undefined when pict is not set +int h; ///< height of pict, undefined when pict is not set +int nb_colors; ///< number of colors in pict, undefined when pict is not set + +/** + * data+linesize for the bitmap of this overlay pic. + */ +AVPicture pict; +} AVOverlayRect; + +typedef struct AVOverlay { +uint16_t format; /* 0 = HDMV Interactive Graphic menu */ +uint32_t start_display_time; /* relative to packet pts, in ms */ +uint32_t end_display_time; /* relative to packet pts, in ms */ +unsigned num_rects; +AVOverlayRect **rects; +int64_t pts;///< Same as packet pts, in AV_TIME_BASE +void *extra;///< Extra data (format dependent) +int extra_sz; ///< Size in bytes of extra data +} AVOverlay; + /** * If c is NULL, returns the first registered codec, * if c is non-NULL, returns the next registered codec after c, @@ -3262,6 +3290,13 @@ int avcodec_close(AVCodecContext *avctx); void avsubtitle_free(AVSubtitle *sub); /** + * Free all allocated data in the given overlay struct. + * + * @param overlay AVOverlay to free. + */ +void avoverlay_free(AVOverlay *overlay); + +/** * @} */ @@ -3582,6 +3617,26 @@ int avcodec_decode_subtitl
Re: [libav-devel] [PATCH 2/3] rtmp: Read and handle incoming packets while writing data
On Thu, 14 Jun 2012, Samuel Pitoiset wrote: This makes sure all incoming packets are read and handled (and reacted to) while sending an FLV stream over RTMP to a server. If there were enough incoming data to fill the TCP buffers, this could potentially make things block at unexpected places. For the upcoming RTMPT support, we need to consume all incoming data before we can send the next request. --- libavformat/rtmppkt.c | 16 +--- libavformat/rtmppkt.h | 13 + libavformat/rtmpproto.c | 30 ++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index ed8e6b2..4ce238d 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -74,15 +74,25 @@ void ff_amf_write_object_end(uint8_t **dst) int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt) { -uint8_t hdr, t, buf[16]; +uint8_t hdr; + +if (ffurl_read(h, &hdr, 1) != 1) +return AVERROR(EIO); + +return ff_rtmp_packet_read_internal(h, p, chunk_size, prev_pkt, hdr); +} + +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket *prev_pkt, uint8_t hdr) +{ + +uint8_t t, buf[16]; int channel_id, timestamp, data_size, offset = 0; uint32_t extra = 0; enum RTMPPacketType type; int size = 0; int ret; -if (ffurl_read(h, &hdr, 1) != 1) -return AVERROR(EIO); size++; channel_id = hdr & 0x3F; diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 8372484..a83d0fe 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -115,6 +115,19 @@ void ff_rtmp_packet_destroy(RTMPPacket *pkt); */ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, int chunk_size, RTMPPacket *prev_pkt); +/** + * Read internal RTMP packet sent by the server. + * + * @param h reader context + * @param p packet + * @param chunk_size current chunk size + * @param prev_pkt previously read packet headers for all channels + * (may be needed for restoring incomplete packet header) + * @param c the first byte already read + * @return number of bytes read on success, negative value otherwise + */ +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket *prev_pkt, uint8_t c); /** * Send RTMP packet to the server. diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index e64e2a3..b3ae5a2 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -1287,6 +1287,7 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) int pktsize, pkttype; uint32_t ts; const uint8_t *buf_temp = buf; +uint8_t c; int ret; do { @@ -1356,6 +1357,35 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size) rt->flv_header_bytes = 0; } } while (buf_temp - buf < size); + +/* set stream into nonblocking mode */ +rt->stream->flags |= AVIO_FLAG_NONBLOCK; + +/* try to read one byte from the stream */ +ret = ffurl_read(rt->stream, &c, 1); + +/* switch the stream back into blocking mode */ +rt->stream->flags &= ~AVIO_FLAG_NONBLOCK; + +if (ret == AVERROR(EAGAIN)) { +/* no incoming data to handle */ +return size; +} else if (ret < 0) { +return ret; +} else if (ret == 1) { +RTMPPacket rpkt = { 0 }; + +if ((ret = ff_rtmp_packet_read_internal(rt->stream, &rpkt, +rt->chunk_size, +rt->prev_pkt[0], c)) <= 0) + return ret; + +if ((ret = rtmp_parse_result(s, rt, &rpkt)) < 0) +return ret; + +ff_rtmp_packet_destroy(&rpkt); +} + return size; } -- 1.7.10.3 Looks correct to me, I'll push this later after some brief testing. For the record, this makes sure we e.g. respond to pings and whatever other packets the server might send us while streaming - otherwise the incoming tcp buffer might eventually fill up, and the server might dislike us for not responding to pings properly. // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] rtpdec: Don't require frames to start with a Mode A packet
On 06/14/2012 02:14 PM, Martin Storsjö wrote: > packets for everything. This fixes depacketization of such streams. ok. -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] fate: add snow hpel tests
--- This demonstrates that Ronald's VLA removal in snow.c is broken. --- tests/fate/vcodec.mak|5 + tests/ref/fate/vsynth1-snow-hpel |4 tests/ref/fate/vsynth2-snow-hpel |4 3 files changed, 13 insertions(+) create mode 100644 tests/ref/fate/vsynth1-snow-hpel create mode 100644 tests/ref/fate/vsynth2-snow-hpel diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index 324320e..e9a9ad6 100644 --- a/tests/fate/vcodec.mak +++ b/tests/fate/vcodec.mak @@ -211,6 +211,11 @@ fate-vsynth%-snow: ENCOPTS = -strict -2 -qscale 2 -flags +qpel \ -me_method iter -dia_size 2 \ -cmp 12 -subcmp 12 -s 128x64 +FATE_VCODEC += snow-hpel +fate-vsynth%-snow-hpel: ENCOPTS = -strict -2 -qscale 2 \ + -me_method iter -dia_size 2 \ + -cmp 12 -subcmp 12 -s 128x64 + FATE_VCODEC += snow-ll fate-vsynth%-snow-ll:ENCOPTS = -strict -2 -qscale .001 -pred 1 \ -flags +mv4+qpel diff --git a/tests/ref/fate/vsynth1-snow-hpel b/tests/ref/fate/vsynth1-snow-hpel new file mode 100644 index 000..e2968b1 --- /dev/null +++ b/tests/ref/fate/vsynth1-snow-hpel @@ -0,0 +1,4 @@ +301755ff5dcd31c2aefc8f103cfc2917 *tests/data/fate/vsynth1-snow-hpel.avi +138712 tests/data/fate/vsynth1-snow-hpel.avi +d6845c8f1310e041afdcebc6bbfc449b *tests/data/fate/vsynth1-snow-hpel.out.rawvideo +stddev: 22.74 PSNR: 20.99 MAXDIFF: 171 bytes: 7603200/ 7603200 diff --git a/tests/ref/fate/vsynth2-snow-hpel b/tests/ref/fate/vsynth2-snow-hpel new file mode 100644 index 000..2194a13 --- /dev/null +++ b/tests/ref/fate/vsynth2-snow-hpel @@ -0,0 +1,4 @@ +ac1400b66514aa280300bba6477b4e97 *tests/data/fate/vsynth2-snow-hpel.avi +61772 tests/data/fate/vsynth2-snow-hpel.avi +8680d40905f423999d65b996c4dcb984 *tests/data/fate/vsynth2-snow-hpel.out.rawvideo +stddev: 10.45 PSNR: 27.74 MAXDIFF: 123 bytes: 7603200/ 7603200 -- 1.7.10.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 0/3] Remove some VLAs
These patches are extracted from Ronald's MSVC support patch and rebased onto master. Ronald S. Bultje (3): x86: fmtconvert: add special asm for float_to_int16_interleave_misc_* dwt: remove variable-length arrays mpegvideo: remove VLAs libavcodec/dwt.c| 109 --- libavcodec/dwt.h| 18 +++ libavcodec/error_resilience.c |2 +- libavcodec/mpegvideo.c | 11 libavcodec/mpegvideo.h |6 +++ libavcodec/ratecontrol.c|4 +- libavcodec/snow.c |4 ++ libavcodec/snow.h |2 + libavcodec/snowdec.c|2 +- libavcodec/snowenc.c| 12 ++--- libavcodec/x86/fmtconvert.asm | 79 libavcodec/x86/fmtconvert_mmx.c | 12 +++-- libavcodec/x86/snowdsp_mmx.c|6 +-- 13 files changed, 185 insertions(+), 82 deletions(-) -- 1.7.10.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/3] x86: fmtconvert: add special asm for float_to_int16_interleave_misc_*
From: "Ronald S. Bultje" This gets rid of a variable-length array and a for loop in C code. --- libavcodec/x86/fmtconvert.asm | 79 +++ libavcodec/x86/fmtconvert_mmx.c | 12 +++--- 2 files changed, 86 insertions(+), 5 deletions(-) diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm index 63befc9..5525f56 100644 --- a/libavcodec/x86/fmtconvert.asm +++ b/libavcodec/x86/fmtconvert.asm @@ -115,6 +115,85 @@ FLOAT_TO_INT16 sse, 0 FLOAT_TO_INT16 3dnow, 0 %undef cvtps2pi +;-- +; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long step); +;-- +%macro FLOAT_TO_INT16_STEP 2 +cglobal float_to_int16_step_%1, 4,7,%2, dst, src, len, step, step3, v1, v2 +add lenq, lenq +lea srcq, [srcq+2*lenq] +lea step3q, [stepq*3] +neg lenq +.loop: +%ifidn %1, sse2 +cvtps2dqm0, [srcq+2*lenq ] +cvtps2dqm1, [srcq+2*lenq+16] +packssdwm0, m1 +movd v1d, m0 +psrldq m0, 4 +movd v2d, m0 +psrldq m0, 4 +mov [dstq], v1w +mov [dstq+stepq*4], v2w +shrv1d, 16 +shrv2d, 16 +mov [dstq+stepq*2], v1w +mov [dstq+step3q*2], v2w +lea dstq, [dstq+stepq*8] +movd v1d, m0 +psrldq m0, 4 +movd v2d, m0 +psrldq m0, 4 +mov [dstq], v1w +mov [dstq+stepq*4], v2w +shrv1d, 16 +shrv2d, 16 +mov [dstq+stepq*2], v1w +mov [dstq+step3q*2], v2w +lea dstq, [dstq+stepq*8] +%else +cvtps2pim0, [srcq+2*lenq ] +cvtps2pim1, [srcq+2*lenq+ 8] +cvtps2pim2, [srcq+2*lenq+16] +cvtps2pim3, [srcq+2*lenq+24] +packssdwm0, m1 +packssdwm2, m3 +movd v1d, m0 +psrlq m0, 32 +movd v2d, m0 +mov [dstq], v1w +mov [dstq+stepq*4], v2w +shrv1d, 16 +shrv2d, 16 +mov [dstq+stepq*2], v1w +mov [dstq+step3q*2], v2w +lea dstq, [dstq+stepq*8] +movd v1d, m2 +psrlq m2, 32 +movd v2d, m2 +mov [dstq], v1w +mov [dstq+stepq*4], v2w +shrv1d, 16 +shrv2d, 16 +mov [dstq+stepq*2], v1w +mov [dstq+step3q*2], v2w +lea dstq, [dstq+stepq*8] +%endif +add lenq, 16 +js .loop +%ifnidn %1, sse2 +emms +%endif +REP_RET +%endmacro + +INIT_XMM +FLOAT_TO_INT16_STEP sse2, 2 +INIT_MMX +FLOAT_TO_INT16_STEP sse, 0 +%define cvtps2pi pf2id +FLOAT_TO_INT16_STEP 3dnow, 0 +%undef cvtps2pi ;--- ; void ff_float_to_int16_interleave2(int16_t *dst, const float **src, long len); diff --git a/libavcodec/x86/fmtconvert_mmx.c b/libavcodec/x86/fmtconvert_mmx.c index 42cb0bc..aaf634d 100644 --- a/libavcodec/x86/fmtconvert_mmx.c +++ b/libavcodec/x86/fmtconvert_mmx.c @@ -25,6 +25,7 @@ #include "libavutil/cpu.h" #include "libavutil/x86_cpu.h" #include "libavcodec/fmtconvert.h" +#include "libavcodec/dsputil.h" #if HAVE_YASM @@ -35,6 +36,10 @@ void ff_float_to_int16_3dnow(int16_t *dst, const float *src, long len); void ff_float_to_int16_sse (int16_t *dst, const float *src, long len); void ff_float_to_int16_sse2 (int16_t *dst, const float *src, long len); +void ff_float_to_int16_step_3dnow(int16_t *dst, const float *src, long len, long step); +void ff_float_to_int16_step_sse (int16_t *dst, const float *src, long len, long step); +void ff_float_to_int16_step_sse2 (int16_t *dst, const float *src, long len, long step); + void ff_float_to_int16_interleave2_3dnow(int16_t *dst, const float **src, long len); void ff_float_to_int16_interleave2_sse (int16_t *dst, const float **src, long len); void ff_float_to_int16_interleave2_sse2 (int16_t *dst, const float **src, long len); @@ -48,12 +53,9 @@ void ff_float_to_int16_interleave6_3dn2(int16_t *dst, const float **src, int len #define FLOAT_TO_INT16_INTERLEAVE(cpu) \ /* gcc pessimizes register allocation if this is in the same function as float_to_int16_interleave_sse2*/\ static av_noinline void float_to_int16_interleave_misc_##cpu(int16_t *dst, const float **src, long len, int channels){\ -DECLARE_ALIGNED(16, int16_t, tmp)[len];\ -int i,j,c;\ +int c;\ for(c=0; chttps://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/3] mpegvideo: remove VLAs
From: "Ronald S. Bultje" --- libavcodec/error_resilience.c |2 +- libavcodec/mpegvideo.c| 11 +++ libavcodec/mpegvideo.h|6 ++ libavcodec/ratecontrol.c |4 ++-- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index fa1e008..61b2866 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -388,7 +388,7 @@ static void v_block_filter(MpegEncContext *s, uint8_t *dst, int w, int h, static void guess_mv(MpegEncContext *s) { -uint8_t fixed[s->mb_stride * s->mb_height]; +uint8_t *fixed = s->fixed; #define MV_FROZEN3 #define MV_CHANGED 2 #define MV_UNCHANGED 1 diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d1c4233..610a4a8 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -798,6 +798,12 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset, 2 * 64 * sizeof(uint16_t), fail); } + +/* quantization tables */ +FF_ALLOCZ_OR_GOTO(s->avctx, s->cplx_tab, + mb_array_size * sizeof(float), fail); +FF_ALLOCZ_OR_GOTO(s->avctx, s->bits_tab, + mb_array_size * sizeof(float), fail); } } @@ -809,6 +815,8 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) } if (s->width && s->height) { +FF_ALLOCZ_OR_GOTO(s->avctx, s->fixed, + mb_array_size * sizeof(uint8_t), fail); FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table, mb_array_size * sizeof(uint8_t), fail); @@ -974,6 +982,7 @@ void ff_MPV_common_end(MpegEncContext *s) av_freep(&s->avctx->stats_out); av_freep(&s->ac_stats); av_freep(&s->error_status_table); +av_freep(&s->fixed); av_freep(&s->mb_index2xy); av_freep(&s->lambda_table); av_freep(&s->q_intra_matrix); @@ -983,6 +992,8 @@ void ff_MPV_common_end(MpegEncContext *s) av_freep(&s->input_picture); av_freep(&s->reordered_input_picture); av_freep(&s->dct_offset); +av_freep(&s->cplx_tab); +av_freep(&s->bits_tab); if (s->picture && !s->avctx->internal->is_copy) { for (i = 0; i < s->picture_count; i++) { diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index b73da41..85bf8fb 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -696,6 +696,12 @@ typedef struct MpegEncContext { int mpv_flags; ///< flags set by private options int quantizer_noise_shaping; + +/* error resilience stuff */ +uint8_t *fixed; + +/* encoder */ +float *cplx_tab, *bits_tab; } MpegEncContext; #define REBASE_PICTURE(pic, new_ctx, old_ctx) (pic ? \ diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 5e4b49a..fd8b897 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -537,8 +537,8 @@ static void adaptive_quantization(MpegEncContext *s, double q){ const float border_masking = s->avctx->border_masking; float bits_sum= 0.0; float cplx_sum= 0.0; -float cplx_tab[s->mb_num]; -float bits_tab[s->mb_num]; +float *cplx_tab = s->cplx_tab; +float *bits_tab = s->bits_tab; const int qmin= s->avctx->mb_lmin; const int qmax= s->avctx->mb_lmax; Picture * const pic= &s->current_picture; -- 1.7.10.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/3] dwt: remove variable-length arrays
From: "Ronald S. Bultje" --- libavcodec/dwt.c | 109 +- libavcodec/dwt.h | 18 +++ libavcodec/snow.c|4 ++ libavcodec/snow.h|2 + libavcodec/snowdec.c |2 +- libavcodec/snowenc.c | 12 ++--- libavcodec/x86/snowdsp_mmx.c |6 +-- 7 files changed, 79 insertions(+), 74 deletions(-) diff --git a/libavcodec/dwt.c b/libavcodec/dwt.c index d3d4f3b..56e4a57 100644 --- a/libavcodec/dwt.c +++ b/libavcodec/dwt.c @@ -243,9 +243,8 @@ static av_always_inline void inv_liftS(IDWTELEM *dst, IDWTELEM *src, } #endif /* ! liftS */ -static void horizontal_decompose53i(DWTELEM *b, int width) +static void horizontal_decompose53i(DWTELEM *b, DWTELEM *temp, int width) { -DWTELEM temp[width]; const int width2 = width >> 1; int x; const int w2 = (width + 1) >> 1; @@ -311,8 +310,8 @@ static void vertical_decompose53iL0(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, b1[i] += (b0[i] + b2[i] + 2) >> 2; } -static void spatial_decompose53i(DWTELEM *buffer, int width, int height, - int stride) +static void spatial_decompose53i(DWTELEM *buffer, DWTELEM *temp, + int width, int height, int stride) { int y; DWTELEM *b0 = buffer + mirror(-2 - 1, height - 1) * stride; @@ -323,9 +322,9 @@ static void spatial_decompose53i(DWTELEM *buffer, int width, int height, DWTELEM *b3 = buffer + mirror(y + 2, height - 1) * stride; if (y + 1 < (unsigned)height) -horizontal_decompose53i(b2, width); +horizontal_decompose53i(b2, temp, width); if (y + 2 < (unsigned)height) -horizontal_decompose53i(b3, width); +horizontal_decompose53i(b3, temp, width); if (y + 1 < (unsigned)height) vertical_decompose53iH0(b1, b2, b3, width); @@ -337,9 +336,8 @@ static void spatial_decompose53i(DWTELEM *buffer, int width, int height, } } -static void horizontal_decompose97i(DWTELEM *b, int width) +static void horizontal_decompose97i(DWTELEM *b, DWTELEM *temp, int width) { -DWTELEM temp[width]; const int w2 = (width + 1) >> 1; lift(temp + w2, b + 1, b, 1, 2, 2, width, W_AM, W_AO, W_AS, 1, 1); @@ -389,8 +387,8 @@ static void vertical_decompose97iL1(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, b1[i] += (W_DM * (b0[i] + b2[i]) + W_DO) >> W_DS; } -static void spatial_decompose97i(DWTELEM *buffer, int width, int height, - int stride) +static void spatial_decompose97i(DWTELEM *buffer, DWTELEM *temp, + int width, int height, int stride) { int y; DWTELEM *b0 = buffer + mirror(-4 - 1, height - 1) * stride; @@ -403,9 +401,9 @@ static void spatial_decompose97i(DWTELEM *buffer, int width, int height, DWTELEM *b5 = buffer + mirror(y + 4, height - 1) * stride; if (y + 3 < (unsigned)height) -horizontal_decompose97i(b4, width); +horizontal_decompose97i(b4, temp, width); if (y + 4 < (unsigned)height) -horizontal_decompose97i(b5, width); +horizontal_decompose97i(b5, temp, width); if (y + 3 < (unsigned)height) vertical_decompose97iH0(b3, b4, b5, width); @@ -423,20 +421,20 @@ static void spatial_decompose97i(DWTELEM *buffer, int width, int height, } } -void ff_spatial_dwt(DWTELEM *buffer, int width, int height, int stride, -int type, int decomposition_count) +void ff_spatial_dwt(DWTELEM *buffer, DWTELEM *temp, int width, int height, +int stride, int type, int decomposition_count) { int level; for (level = 0; level < decomposition_count; level++) { switch (type) { case DWT_97: -spatial_decompose97i(buffer, +spatial_decompose97i(buffer, temp, width >> level, height >> level, stride << level); break; case DWT_53: -spatial_decompose53i(buffer, +spatial_decompose53i(buffer, temp, width >> level, height >> level, stride << level); break; @@ -444,9 +442,8 @@ void ff_spatial_dwt(DWTELEM *buffer, int width, int height, int stride, } } -static void horizontal_compose53i(IDWTELEM *b, int width) +static void horizontal_compose53i(IDWTELEM *b, IDWTELEM *temp, int width) { -IDWTELEM temp[width]; const int width2 = width >> 1; const int w2 = (width + 1) >> 1; int x; @@ -506,6 +503,7 @@ static void spatial_compose53i_init(DWTCompose *cs, IDWTELEM *buffer, } static void spatial_compose53i_dy_buffered(DWTCompose *cs, slice_buffer *sb, + IDWTELEM *temp, int wid
Re: [libav-devel] [PATCH 3/3] mpegvideo: remove VLAs
On Thu, Jun 14, 2012 at 03:03:10PM +0100, Mans Rullgard wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/error_resilience.c |2 +- > libavcodec/mpegvideo.c| 11 +++ > libavcodec/mpegvideo.h|6 ++ > libavcodec/ratecontrol.c |4 ++-- > 4 files changed, 20 insertions(+), 3 deletions(-) LGTM ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] fate: add snow hpel tests
On 06/14/2012 03:58 PM, Mans Rullgard wrote: > --- > This demonstrates that Ronald's VLA removal in snow.c is broken. > --- > tests/fate/vcodec.mak|5 + > tests/ref/fate/vsynth1-snow-hpel |4 > tests/ref/fate/vsynth2-snow-hpel |4 > 3 files changed, 13 insertions(+) > create mode 100644 tests/ref/fate/vsynth1-snow-hpel > create mode 100644 tests/ref/fate/vsynth2-snow-hpel > Ok. -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] dwt: remove variable-length arrays
On Thu, Jun 14, 2012 at 03:03:09PM +0100, Mans Rullgard wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/dwt.c | 109 > +- > libavcodec/dwt.h | 18 +++ > libavcodec/snow.c|4 ++ > libavcodec/snow.h|2 + > libavcodec/snowdec.c |2 +- > libavcodec/snowenc.c | 12 ++--- > libavcodec/x86/snowdsp_mmx.c |6 +-- > 7 files changed, 79 insertions(+), 74 deletions(-) > > diff --git a/libavcodec/dwt.c b/libavcodec/dwt.c > index d3d4f3b..56e4a57 100644 > --- a/libavcodec/dwt.c > +++ b/libavcodec/dwt.c > @@ -243,9 +243,8 @@ static av_always_inline void inv_liftS(IDWTELEM *dst, > IDWTELEM *src, > } > #endif /* ! liftS */ > > -static void horizontal_decompose53i(DWTELEM *b, int width) > +static void horizontal_decompose53i(DWTELEM *b, DWTELEM *temp, int width) > { > -DWTELEM temp[width]; > const int width2 = width >> 1; > int x; > const int w2 = (width + 1) >> 1; > @@ -311,8 +310,8 @@ static void vertical_decompose53iL0(DWTELEM *b0, DWTELEM > *b1, DWTELEM *b2, > b1[i] += (b0[i] + b2[i] + 2) >> 2; > } > > -static void spatial_decompose53i(DWTELEM *buffer, int width, int height, > - int stride) > +static void spatial_decompose53i(DWTELEM *buffer, DWTELEM *temp, > + int width, int height, int stride) > { > int y; > DWTELEM *b0 = buffer + mirror(-2 - 1, height - 1) * stride; > @@ -323,9 +322,9 @@ static void spatial_decompose53i(DWTELEM *buffer, int > width, int height, > DWTELEM *b3 = buffer + mirror(y + 2, height - 1) * stride; > > if (y + 1 < (unsigned)height) > -horizontal_decompose53i(b2, width); > +horizontal_decompose53i(b2, temp, width); > if (y + 2 < (unsigned)height) > -horizontal_decompose53i(b3, width); > +horizontal_decompose53i(b3, temp, width); > > if (y + 1 < (unsigned)height) > vertical_decompose53iH0(b1, b2, b3, width); > @@ -337,9 +336,8 @@ static void spatial_decompose53i(DWTELEM *buffer, int > width, int height, > } > } > > -static void horizontal_decompose97i(DWTELEM *b, int width) > +static void horizontal_decompose97i(DWTELEM *b, DWTELEM *temp, int width) > { > -DWTELEM temp[width]; > const int w2 = (width + 1) >> 1; > > lift(temp + w2, b + 1, b, 1, 2, 2, width, W_AM, W_AO, W_AS, 1, > 1); > @@ -389,8 +387,8 @@ static void vertical_decompose97iL1(DWTELEM *b0, DWTELEM > *b1, DWTELEM *b2, > b1[i] += (W_DM * (b0[i] + b2[i]) + W_DO) >> W_DS; > } > > -static void spatial_decompose97i(DWTELEM *buffer, int width, int height, > - int stride) > +static void spatial_decompose97i(DWTELEM *buffer, DWTELEM *temp, > + int width, int height, int stride) > { > int y; > DWTELEM *b0 = buffer + mirror(-4 - 1, height - 1) * stride; > @@ -403,9 +401,9 @@ static void spatial_decompose97i(DWTELEM *buffer, int > width, int height, > DWTELEM *b5 = buffer + mirror(y + 4, height - 1) * stride; > > if (y + 3 < (unsigned)height) > -horizontal_decompose97i(b4, width); > +horizontal_decompose97i(b4, temp, width); > if (y + 4 < (unsigned)height) > -horizontal_decompose97i(b5, width); > +horizontal_decompose97i(b5, temp, width); > > if (y + 3 < (unsigned)height) > vertical_decompose97iH0(b3, b4, b5, width); > @@ -423,20 +421,20 @@ static void spatial_decompose97i(DWTELEM *buffer, int > width, int height, > } > } > > -void ff_spatial_dwt(DWTELEM *buffer, int width, int height, int stride, > -int type, int decomposition_count) > +void ff_spatial_dwt(DWTELEM *buffer, DWTELEM *temp, int width, int height, > +int stride, int type, int decomposition_count) > { > int level; > > for (level = 0; level < decomposition_count; level++) { > switch (type) { > case DWT_97: > -spatial_decompose97i(buffer, > +spatial_decompose97i(buffer, temp, > width >> level, height >> level, > stride << level); > break; > case DWT_53: > -spatial_decompose53i(buffer, > +spatial_decompose53i(buffer, temp, > width >> level, height >> level, > stride << level); > break; > @@ -444,9 +442,8 @@ void ff_spatial_dwt(DWTELEM *buffer, int width, int > height, int stride, > } > } > > -static void horizontal_compose53i(IDWTELEM *b, int width) > +static void horizontal_compose53i(IDWTELEM *b, IDWTELEM *temp, int width) > { > -IDWTELEM temp[width]; > const int width2 = width >> 1; > const int w
Re: [libav-devel] [PATCH 1/3] x86: fmtconvert: add special asm for float_to_int16_interleave_misc_*
On Thu, Jun 14, 2012 at 03:03:08PM +0100, Mans Rullgard wrote: > From: "Ronald S. Bultje" > > This gets rid of a variable-length array and a for loop in C code. > --- > libavcodec/x86/fmtconvert.asm | 79 > +++ > libavcodec/x86/fmtconvert_mmx.c | 12 +++--- > 2 files changed, 86 insertions(+), 5 deletions(-) > > diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm > index 63befc9..5525f56 100644 > --- a/libavcodec/x86/fmtconvert.asm > +++ b/libavcodec/x86/fmtconvert.asm > @@ -115,6 +115,85 @@ FLOAT_TO_INT16 sse, 0 > FLOAT_TO_INT16 3dnow, 0 > %undef cvtps2pi > > +;-- > +; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long > step); > +;-- > +%macro FLOAT_TO_INT16_STEP 2 > +cglobal float_to_int16_step_%1, 4,7,%2, dst, src, len, step, step3, v1, v2 > +add lenq, lenq > +lea srcq, [srcq+2*lenq] > +lea step3q, [stepq*3] > +neg lenq > +.loop: > +%ifidn %1, sse2 > +cvtps2dqm0, [srcq+2*lenq ] > +cvtps2dqm1, [srcq+2*lenq+16] > +packssdwm0, m1 > +movd v1d, m0 > +psrldq m0, 4 > +movd v2d, m0 > +psrldq m0, 4 > +mov [dstq], v1w > +mov [dstq+stepq*4], v2w > +shrv1d, 16 > +shrv2d, 16 > +mov [dstq+stepq*2], v1w > +mov [dstq+step3q*2], v2w > +lea dstq, [dstq+stepq*8] > +movd v1d, m0 > +psrldq m0, 4 > +movd v2d, m0 > +psrldq m0, 4 > +mov [dstq], v1w > +mov [dstq+stepq*4], v2w > +shrv1d, 16 > +shrv2d, 16 > +mov [dstq+stepq*2], v1w > +mov [dstq+step3q*2], v2w > +lea dstq, [dstq+stepq*8] > +%else > +cvtps2pim0, [srcq+2*lenq ] > +cvtps2pim1, [srcq+2*lenq+ 8] > +cvtps2pim2, [srcq+2*lenq+16] > +cvtps2pim3, [srcq+2*lenq+24] > +packssdwm0, m1 > +packssdwm2, m3 > +movd v1d, m0 > +psrlq m0, 32 > +movd v2d, m0 > +mov [dstq], v1w > +mov [dstq+stepq*4], v2w > +shrv1d, 16 > +shrv2d, 16 > +mov [dstq+stepq*2], v1w > +mov [dstq+step3q*2], v2w > +lea dstq, [dstq+stepq*8] > +movd v1d, m2 > +psrlq m2, 32 > +movd v2d, m2 > +mov [dstq], v1w > +mov [dstq+stepq*4], v2w > +shrv1d, 16 > +shrv2d, 16 > +mov [dstq+stepq*2], v1w > +mov [dstq+step3q*2], v2w > +lea dstq, [dstq+stepq*8] > +%endif > +add lenq, 16 > +js .loop > +%ifnidn %1, sse2 > +emms > +%endif > +REP_RET > +%endmacro > + > +INIT_XMM > +FLOAT_TO_INT16_STEP sse2, 2 > +INIT_MMX > +FLOAT_TO_INT16_STEP sse, 0 > +%define cvtps2pi pf2id > +FLOAT_TO_INT16_STEP 3dnow, 0 > +%undef cvtps2pi > > > ;--- > ; void ff_float_to_int16_interleave2(int16_t *dst, const float **src, long > len); > diff --git a/libavcodec/x86/fmtconvert_mmx.c b/libavcodec/x86/fmtconvert_mmx.c > index 42cb0bc..aaf634d 100644 > --- a/libavcodec/x86/fmtconvert_mmx.c > +++ b/libavcodec/x86/fmtconvert_mmx.c > @@ -25,6 +25,7 @@ > #include "libavutil/cpu.h" > #include "libavutil/x86_cpu.h" > #include "libavcodec/fmtconvert.h" > +#include "libavcodec/dsputil.h" > > #if HAVE_YASM > > @@ -35,6 +36,10 @@ void ff_float_to_int16_3dnow(int16_t *dst, const float > *src, long len); > void ff_float_to_int16_sse (int16_t *dst, const float *src, long len); > void ff_float_to_int16_sse2 (int16_t *dst, const float *src, long len); > > +void ff_float_to_int16_step_3dnow(int16_t *dst, const float *src, long len, > long step); > +void ff_float_to_int16_step_sse (int16_t *dst, const float *src, long len, > long step); > +void ff_float_to_int16_step_sse2 (int16_t *dst, const float *src, long len, > long step); > + > void ff_float_to_int16_interleave2_3dnow(int16_t *dst, const float **src, > long len); > void ff_float_to_int16_interleave2_sse (int16_t *dst, const float **src, > long len); > void ff_float_to_int16_interleave2_sse2 (int16_t *dst, const float **src, > long len); > @@ -48,12 +53,9 @@ void ff_float_to_int16_interleave6_3dn2(int16_t *dst, > const float **src, int len > #define FLOAT_TO_INT16_INTERLEAVE(cpu) \ > /* gcc pessimizes register allocation if this is in the same function as > float_to_int16_interleave_sse2*/\ > static av_noinline void float_to_int16_interleave_misc_##cpu(int16_t *dst, > const float **src, long len, int channels){\ > -DECLARE_ALIGNED(16, int16_t, tmp)[len];\ > -int i,j,c;\ > +int c;\ > for(c=0; c -ff_float_to_int16_##cpu(tmp, src[c], len);\ > -for(i=0, j=c; i -dst[j] = tmp[i];\ > +ff_float_to_int16_step_##cpu(dst+c, src[c]
Re: [libav-devel] [PATCH 1/3] x86: fmtconvert: add special asm for float_to_int16_interleave_misc_*
On 06/14/2012 04:03 PM, Mans Rullgard wrote: > This gets rid of a variable-length array and a for loop in C code. Seems ok. lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] dwt: remove variable-length arrays
Kostya Shishkov writes: >> diff --git a/libavcodec/snow.c b/libavcodec/snow.c >> index 384cda8..edd7d07 100644 >> --- a/libavcodec/snow.c >> +++ b/libavcodec/snow.c >> @@ -440,6 +440,8 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ >> >> s->spatial_idwt_buffer= av_mallocz(width*height*sizeof(IDWTELEM)); >> s->spatial_dwt_buffer= av_mallocz(width*height*sizeof(DWTELEM)); >> //FIXME this does not belong here >> +s->temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM)); >> +s->temp_idwt_buffer = av_mallocz(width * sizeof(IDWTELEM)); > > Uhm, are any of these checked? Doesn't look like it. Are you surprised? > The patch looks OK though. I hate adding unchecked mallocs, even next to existing ones. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] dwt: remove variable-length arrays
On Thu, Jun 14, 2012 at 03:14:08PM +0100, Måns Rullgård wrote: > Kostya Shishkov writes: > > >> diff --git a/libavcodec/snow.c b/libavcodec/snow.c > >> index 384cda8..edd7d07 100644 > >> --- a/libavcodec/snow.c > >> +++ b/libavcodec/snow.c > >> @@ -440,6 +440,8 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ > >> > >> s->spatial_idwt_buffer= av_mallocz(width*height*sizeof(IDWTELEM)); > >> s->spatial_dwt_buffer= av_mallocz(width*height*sizeof(DWTELEM)); > >> //FIXME this does not belong here > >> +s->temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM)); > >> +s->temp_idwt_buffer = av_mallocz(width * sizeof(IDWTELEM)); > > > > Uhm, are any of these checked? > > Doesn't look like it. Are you surprised? For some reason - not at all. VLAs are a case of _very_ unchecked malloc after all... > > The patch looks OK though. > > I hate adding unchecked mallocs, even next to existing ones. Just fix it later. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] mpegvideo: remove VLAs
Hi, 2012/6/14 Mans Rullgard : > static void guess_mv(MpegEncContext *s) > { > - uint8_t fixed[s->mb_stride * s->mb_height]; > + uint8_t *fixed = s->fixed; What about setting s->fixed to NULL when initializing, and only setting s->fixed to something here, like (just an example): uint8_t *fixed; if (!s->fixed) { FF_ALLOCZ_OR_GOTO(s->avctx, s->fixed, mb_array_size * sizeof(uint8_t), fail); } fixed = s->fixed; [...] fail: /* should probably return error here */ That way, no unnecessary allocation (even though it is small) is done if ER does not need to be performed. I know error handling and probably style are not correct in the above code snippet, so just take this as an example. All in all, if the above is too much of a bother, it is better to have your patch applied than nothing. > + /* quantization tables */ > + FF_ALLOCZ_OR_GOTO(s->avctx, s->cplx_tab, > + mb_array_size * sizeof(float), fail); > + FF_ALLOCZ_OR_GOTO(s->avctx, s->bits_tab, > + mb_array_size * sizeof(float), fail); They do not look like quantization tables to me, but encoder image analysis data for rate control. Also, I guess FF_ALLOC_OR_GOTO can be used (no need to zero such an array). -- Christophe ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] announce new releases for 0.5 through 0.8
On 12/06/2012 6:24 PM, Diego Biurrun wrote: > Please keep lines reasonably short where this is easily possible. Ping @ Sean. - Derek ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] segment: remove unnecessary include
--- libavformat/segment.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 8274792..8a0f136 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include #include "avformat.h" -- 1.7.8.6 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] segment: remove unnecessary include
Hi, On Thu, Jun 14, 2012 at 9:42 AM, Janne Grunau wrote: > --- > libavformat/segment.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/libavformat/segment.c b/libavformat/segment.c > index 8274792..8a0f136 100644 > --- a/libavformat/segment.c > +++ b/libavformat/segment.c > @@ -19,7 +19,6 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > */ > > -#include LGTM. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Support for MSVC.
Hi, On Thu, Jun 14, 2012 at 2:45 AM, Måns Rullgård wrote: > "Ronald S. Bultje" writes: >> - the include of mathematics.h, avconfig.h and avstring.h everywhere >> is (I think) legit, to account for snprintf(), M_PI or inline. > > I seriously doubt that those are really needed in all the places you've > added them. Depends on which one. Each mathematics.h needs them for M_PI or something alike. Now, regardless of whether MSVC has M_PI included, if mathematics.h has a fallback for M_PI where the system does not provide it, we should include mathematics.h where we use M_PI, so these should be legit. avstring.h is for snprintf() which may not be necessary. avconfig.h is for inline which we should probably discuss on its own. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] announce new releases for 0.5 through 0.8
On Thursday, June 14, 2012, Derek Buitenhuis wrote: > On 12/06/2012 6:24 PM, Diego Biurrun wrote: >> Please keep lines reasonably short where this is easily possible. > > Ping @ Sean. > > - Derek > ___ > libav-devel mailing list > libav-devel@libav.org > https://lists.libav.org/mailman/listinfo/libav-devel > I'm not near my PC at the moment, would someone else mind reformatting and applying? -- Sean McG ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] mathematics.h: remove a couple of math defines
While this defines are not defined by the C standard they are provided by the math.h header. --- libavutil/mathematics.h | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/libavutil/mathematics.h b/libavutil/mathematics.h index ec27979..a734b75 100644 --- a/libavutil/mathematics.h +++ b/libavutil/mathematics.h @@ -26,30 +26,12 @@ #include "attributes.h" #include "rational.h" -#ifndef M_E -#define M_E2.7182818284590452354 /* e */ -#endif -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 /* log_e 2 */ -#endif -#ifndef M_LN10 -#define M_LN10 2.30258509299404568402 /* log_e 10 */ -#endif #ifndef M_LOG2_10 #define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ #endif #ifndef M_PHI #define M_PHI 1.61803398874989484820 /* phi / golden ratio */ #endif -#ifndef M_PI -#define M_PI 3.14159265358979323846 /* pi */ -#endif -#ifndef M_SQRT1_2 -#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ -#endif -#ifndef M_SQRT2 -#define M_SQRT21.41421356237309504880 /* sqrt(2) */ -#endif #ifndef NAN #define NAN(0.0/0.0) #endif -- 1.7.8.6 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] announce new releases for 0.5 through 0.8
From: Sean McGovern Signed-off-by: Janne Grunau --- src/download | 95 - src/index| 74 + 2 files changed, 121 insertions(+), 48 deletions(-) diff --git a/src/download b/src/download index e6c7404..7ac5cb6 100644 --- a/src/download +++ b/src/download @@ -194,9 +194,9 @@ selected changes from the development branch, which therefore receives much more and much faster bug fixes such as additional features and security patches. -Libav 0.8.2 "Forbidden Fruit" +Libav 0.8.3 "Forbidden Fruit" -0.8.2 was released on 2012-05-04. It is the latest point release from +0.8.3 was released on 2012-06-09. It is the latest point release from the 0.8 branch, which was cut on 2012-01-21. Please give us feedback with your experiences with this release and use our new Bugzilla for filing bugs: @@ -204,80 +204,79 @@ filing bugs: -Download XZ tarball -MD5 -SHA1 -PGP signature -Download gzip tarball -MD5 -SHA1 -PGP signature -Changelog +Download XZ tarball +MD5 +SHA1 +PGP signature +Download gzip tarball +MD5 +SHA1 +PGP signature +Changelog Release Notes -Libav 0.7.5 "The Big Bump" +Libav 0.7.6 "The Big Bump" -0.7.5 was released on 2012-04-08. It is the latest point release from the 0.7 branch, +0.7.6 was released on 2012-06-09. It is the latest point release from the 0.7 branch, which was cut on 2011-06-20. -Download XZ tarball -MD5 -SHA1 -PGP signature -Download gzip tarball -MD5 -SHA1 -PGP signature -Changelog -Release Notes +Download XZ tarball +MD5 +SHA1 +PGP signature +Download gzip tarball +MD5 +SHA1 +PGP signature +Changelog +Release Notes -Libav 0.6.5 "Works with HTML5" +Libav 0.6.6 "Works with HTML5" -0.6.5 appeared on 2012-01-11. It is the latest point release from the +0.6.6 appeared on 2012-06-09. It is the latest point release from the 0.6 release branch, which was cut on 2010-05-04. -Download XZ tarball -MD5 -SHA1 -PGP signature -Download gzip tarball -MD5 -SHA1 -PGP signature -Win32 binaries -Changelog -Release Notes +Download XZ tarball +MD5 +SHA1 +PGP signature +Download gzip tarball +MD5 +SHA1 +PGP signature +Changelog +Release Notes -Libav 0.5.8 "half-way to world domination A.K.A. the belligerent blue bike +Libav 0.5.9 "half-way to world domination A.K.A. the belligerent blue bike shed" -0.5.8 appeared on 2012-05-10. It is the latest point release from the 0.5 +0.5.9 appeared on 2012-06-09. It is the latest point release from the 0.5 release branch cut on 2009-03-02. -Download XZ tarball -MD5 -SHA1 -PGP signature -Download gzip tarball -MD5 -SHA1 -PGP signature -Changelog -Release Notes +Download XZ tarball +MD5 +SHA1 +PGP signature +Download gzip tarball +MD5 +SHA1 +PGP signature +Changelog +Release Notes Distribution Status diff --git a/src/index b/src/index index 56e0e5f..1da657c 100644 --- a/src/index +++ b/src/index @@ -33,6 +33,80 @@ with the latest developments by subscribing to both the News +June 9, 2012 + +We have been busy lately! Today, we are updating all 4 of our release trees. + + + +Fresh from the release team we are introducing +0.8.3, +0.7.6, +0.6.6 and +0.5.9. + + + +The following bugs in our Bugzilla have been fixed: + + + +http://bugzilla.libav.org/show_bug.cgi?id=118";>#118: +zzufed H.261 file crashes avconv signal 11 (SIGSEGV) +http://bugzilla.libav.org/show_bug.cgi?id=145";>#145: +signal 11 (SIGSEGV) on input from corrupted file +http://bugzilla.libav.org/show_bug.cgi?id=146";>#146: +zzufed FRAPS files crashes avconv signal 11 (SIGSEGV) +http://bugzilla.libav.org/show_bug.cgi?id=197";>#197: +Read errors in kega decoder +http://bugzilla.libav.org/show_bug.cgi?id=198";>#198: +vorbis decoder infinite loop +http://bugzilla.libav.org/show_bug.cgi?id=199";>#199: +vorbis decoder FPE + + + +Several bugs and crashes have been fixed in the following codecs: AAC, +ADPCM, ATRAC3, CELP, DPCM, DXVA2, H.263, H.264, Kega, KMVC, Motion Pixels, +MJPEG-B, PNG, QDM2, Shorten, Westwood VQA + + + +Several bugs and crashes have been fixed in the following formats: ASF, +DV, EA & EAtqi, ID3v2, NSV + + + +These releases contain security fixes for the following CVEs: + + + +CVE-2012-0947 +CVE-2012-0858 +CVE-2012-0853 +CVE-2012-0852 +CVE-2012-0851 +CVE-2012-0850 +CVE-2011-4031 +CVE-2011-3952 +CVE-2011-3951 +CVE-2011-3947 +CVE-2011-3945 +CVE-2011-3940 +CVE-2011-3937 +CVE-2011-3936 +CVE-2011-3929 + + + +Distributors and system integrators are encouraged to update and share their +patches against our release branches. + + + +Enjoy! + + May 22, 2012 As every year some members from our crew will be trolling^Wattending -- 1.7.8.6 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/3] x86: fmtconvert: add special asm for float_to_int16_interleave_misc_*
On Thu, 14 Jun 2012, Mans Rullgard wrote: > --- a/libavcodec/x86/fmtconvert.asm > +++ b/libavcodec/x86/fmtconvert.asm > @@ -115,6 +115,85 @@ FLOAT_TO_INT16 sse, 0 > FLOAT_TO_INT16 3dnow, 0 > %undef cvtps2pi > > +;-- > +; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long > step); > +;-- > +%macro FLOAT_TO_INT16_STEP 2 > +cglobal float_to_int16_step_%1, 4,7,%2, dst, src, len, step, step3, v1, v2 > +add lenq, lenq > +lea srcq, [srcq+2*lenq] > +lea step3q, [stepq*3] > +neg lenq > +.loop: > +%ifidn %1, sse2 > +cvtps2dqm0, [srcq+2*lenq ] > +cvtps2dqm1, [srcq+2*lenq+16] > +packssdwm0, m1 > +movd v1d, m0 > +psrldq m0, 4 > +movd v2d, m0 > +psrldq m0, 4 > +mov [dstq], v1w > +mov [dstq+stepq*4], v2w > +shrv1d, 16 > +shrv2d, 16 > +mov [dstq+stepq*2], v1w > +mov [dstq+step3q*2], v2w > +lea dstq, [dstq+stepq*8] > +movd v1d, m0 > +psrldq m0, 4 > +movd v2d, m0 > +psrldq m0, 4 The result of this instruction is unused. > +mov [dstq], v1w > +mov [dstq+stepq*4], v2w > +shrv1d, 16 > +shrv2d, 16 > +mov [dstq+stepq*2], v1w > +mov [dstq+step3q*2], v2w > +lea dstq, [dstq+stepq*8] --Loren Merritt ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] doc: document THREAD_TYPE fate variable
--- doc/fate.texi |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/doc/fate.texi b/doc/fate.texi index 4b02505..975f40a 100644 --- a/doc/fate.texi +++ b/doc/fate.texi @@ -78,6 +78,9 @@ meaning only while running the regression tests. @item THREADS Specify how many threads to use while running regression tests, it is quite useful to detect thread-related regressions. +@item THREAD_TYPE +Specify which threading strategy test, either @var{slice} or @var{frame}, +by default @var{slice+frame} @item CPUFLAGS Specify a mask to be applied to autodetected CPU flags. @item TARGET_EXEC -- 1.7.8.rc1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: document THREAD_TYPE fate variable
Hi, On Thu, Jun 14, 2012 at 11:27 AM, Luca Barbato wrote: > --- > doc/fate.texi | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/doc/fate.texi b/doc/fate.texi > index 4b02505..975f40a 100644 > --- a/doc/fate.texi > +++ b/doc/fate.texi > @@ -78,6 +78,9 @@ meaning only while running the regression tests. > @item THREADS > Specify how many threads to use while running regression tests, it is > quite useful to detect thread-related regressions. > +@item THREAD_TYPE > +Specify which threading strategy test, either @var{slice} or @var{frame}, > +by default @var{slice+frame} OK. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] announce new releases for 0.5 through 0.8
On 06/14/2012 08:25 PM, Janne Grunau wrote: > From: Sean McGovern > > Signed-off-by: Janne Grunau > --- > src/download | 95 - > src/index| 74 + > 2 files changed, 121 insertions(+), 48 deletions(-) > Looks fine =) -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] announce new releases for 0.5 through 0.8
On Thursday, June 14, 2012, Luca Barbato wrote: > On 06/14/2012 08:25 PM, Janne Grunau wrote: >> From: Sean McGovern >> >> Signed-off-by: Janne Grunau >> --- >> src/download | 95 - >> src/index| 74 + >> 2 files changed, 121 insertions(+), 48 deletions(-) >> > > Looks fine =) > Thanks Janne. :) -- Sean McG. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] mathematics.h: remove a couple of math defines
On Thu, Jun 14, 2012 at 08:18:19PM +0200, Janne Grunau wrote: > While this defines are not defined by the C standard they are provided > by the math.h header. these defines Are the defines in glibc math.h, guaranteed by POSIX to be there or ..? Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: document THREAD_TYPE fate variable
On Thu, Jun 14, 2012 at 08:27:55PM +0200, Luca Barbato wrote: > --- a/doc/fate.texi > +++ b/doc/fate.texi > @@ -78,6 +78,9 @@ meaning only while running the regression tests. > @item THREADS > Specify how many threads to use while running regression tests, it is > quite useful to detect thread-related regressions. > +@item THREAD_TYPE > +Specify which threading strategy test, either @var{slice} or @var{frame}, > +by default @var{slice+frame} strategy to test Specify which threading strategy to test; either @var{slice}, @var{frame} or @var{slice+frame} (default). Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] announce new releases for 0.5 through 0.8
On Thu, Jun 14, 2012 at 08:25:39PM +0200, Janne Grunau wrote: > > --- a/src/index > +++ b/src/index > @@ -33,6 +33,80 @@ with the latest developments by subscribing to both the > + > + > +Several bugs and crashes have been fixed in the following formats: > ASF, > +DV, EA & EAtqi, ID3v2, NSV I'd replace "formats" by "containers" here, otherwise LGTM. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: Add missing protocols to list of supported protocols.
On Thu, Jun 14, 2012 at 11:45:32AM +0300, Martin Storsjö wrote: > On Thu, 14 Jun 2012, Diego Biurrun wrote: > >--- > >I'm not entirely sure this is fully correct as I'm not sure if things like > >"concat" should be mentioned in this list. Also, for some protocols (HLS?) > >mentioning the long name instead of the abbreviation might be better. > > > >--- a/doc/general.texi > >+++ b/doc/general.texi > >@@ -805,18 +805,34 @@ performance on systems without hardware floating point > >support). > >@multitable @columnfractions .4 .1 > >@item Name @tab Support > >@item Apple HTTP Live Streaming @tab X > >+@item concat @tab X > >+@item crypto @tab X > >@item file @tab X > >@item Gopher @tab X > >+@item HLS @tab X > >@item HTTP @tab X > >-@item MMS @tab X > >+@item HTTPPROXY@tab X > >+@item HTTPS@tab X > >+@item MD5 @tab X > >+@item MMSH @tab X > >+@item MMST @tab X > >@item pipe @tab X > >+@item RTMP @tab X > >+@item RTMPE@tab E > >+@item RTMPS@tab E > >+@item RTMPT@tab E > >+@item RTMPTE @tab E > >@item RTP @tab X > >+@item SCTP @tab X > >@item TCP @tab X > >+@item TLS @tab X > >@item UDP @tab X > >@end multitable > > I'm not sure if it's useful to list every single one of them - e.g. > httpproxy is more or less an internal detail - it's for creating a > plain connection via a http proxy, which you'd normally just use as > a implementation detail internally when connecting tls (or https) > via a proxy. But in some very special cases you could want to use it > directly, too. The rtmphttp protocol in Samuel's patch is the same > but with even less reason for anyone to ever use it directly. > > Or put another way - this list is probably most useful for a user > wondering "does libav support protocol X?", and such a user won't > really know about our own internal protocols. So which ones exactly would you drop from the list? Just HTTPPROXY? > HLS is already listed as Apple HTTP Live Streaming. What is the difference? Both exist as URLProtocol ... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] doc: document THREAD_TYPE fate variable
On 06/14/2012 11:34 PM, Diego Biurrun wrote: > On Thu, Jun 14, 2012 at 08:27:55PM +0200, Luca Barbato wrote: >> --- a/doc/fate.texi >> +++ b/doc/fate.texi >> @@ -78,6 +78,9 @@ meaning only while running the regression tests. >> @item THREADS >> Specify how many threads to use while running regression tests, it is >> quite useful to detect thread-related regressions. >> +@item THREAD_TYPE >> +Specify which threading strategy test, either @var{slice} or @var{frame}, >> +by default @var{slice+frame} > > strategy to test > > Specify which threading strategy to test; either @var{slice}, @var{frame} > or @var{slice+frame} (default). > Willing to amend it? Otherwise I'll do later myself. lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] dnxhdenc: add space between function argument type and comment.
From: "Ronald S. Bultje" --- libavcodec/dnxhdenc.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dnxhdenc.h b/libavcodec/dnxhdenc.h index 861546a..7e2f96f 100644 --- a/libavcodec/dnxhdenc.h +++ b/libavcodec/dnxhdenc.h @@ -92,7 +92,7 @@ typedef struct DNXHDEncContext { RCCMPEntry *mb_cmp; RCEntry (*mb_rc)[8160]; -void (*get_pixels_8x4_sym)(DCTELEM */*align 16*/, const uint8_t *, int); +void (*get_pixels_8x4_sym)(DCTELEM * /*align 16*/, const uint8_t *, int); } DNXHDEncContext; void ff_dnxhd_init_mmx(DNXHDEncContext *ctx); -- 1.7.9.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] dxva2: add missing include.
From: "Ronald S. Bultje" --- libavcodec/dxva2.h |1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/dxva2.h b/libavcodec/dxva2.h index c06f1f3..8df9bb0 100644 --- a/libavcodec/dxva2.h +++ b/libavcodec/dxva2.h @@ -33,6 +33,7 @@ #include #include +#include /** * @defgroup lavc_codec_hwaccel_dxva2 DXVA2 -- 1.7.9.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] snow: remove a VLA.
From: "Ronald S. Bultje" --- libavcodec/snowenc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 7b010e1..3c06f8e 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1074,8 +1074,9 @@ static void iterative_me(SnowContext *s){ BlockNode *blb= mb_x && mb_y+1block[index+b_stride-1] : NULL; BlockNode *brb= mb_x+1block[index+b_stride+1] : NULL; const int b_w= (MB_SIZE >> s->block_max_depth); -uint8_t obmc_edged[b_w*2][b_w*2]; +uint8_t obmc_edged[MB_SIZE * 2][MB_SIZE * 2]; +assert(b_w <= MB_SIZE); if(pass && (block->type & BLOCK_OPT)) continue; block->type |= BLOCK_OPT; -- 1.7.9.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] dxva2: add missing include.
On Thu, Jun 14, 2012 at 03:59:06PM -0700, Ronald S. Bultje wrote : > +#include This should break every mingw compilation. -- Jean-Baptiste Kempf http://www.jbkempf.com/ - +33 672 704 734 Sent from my Electronic Device ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] dsputilenc_mmx: split assignment of ff_sse16_sse2 to SSE2 section.
From: "Ronald S. Bultje" --- libavcodec/x86/dsputilenc_mmx.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index 2a403ba..d8a60e1 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -1127,8 +1127,8 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) #endif c->pix_norm1 = pix_norm1_mmx; -c->sse[0] = (HAVE_YASM && mm_flags & AV_CPU_FLAG_SSE2) ? ff_sse16_sse2 : sse16_mmx; - c->sse[1] = sse8_mmx; +c->sse[0] = sse16_mmx; +c->sse[1] = sse8_mmx; c->vsad[4]= vsad_intra16_mmx; c->nsse[0] = nsse16_mmx; @@ -1164,10 +1164,13 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx) if (bit_depth <= 8) c->get_pixels = get_pixels_sse2; c->sum_abs_dctelem= sum_abs_dctelem_sse2; -#if HAVE_YASM && HAVE_ALIGNED_STACK +#if HAVE_YASM +c->sse[0] = ff_sse16_sse2; +#if HAVE_ALIGNED_STACK c->hadamard8_diff[0]= ff_hadamard8_diff16_sse2; c->hadamard8_diff[1]= ff_hadamard8_diff_sse2; #endif +#endif } #if HAVE_SSSE3 -- 1.7.9.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] dxva2: add missing include.
Hi, On Thu, Jun 14, 2012 at 4:02 PM, Jean-Baptiste Kempf wrote: > On Thu, Jun 14, 2012 at 03:59:06PM -0700, Ronald S. Bultje wrote : >> +#include > > This should break every mingw compilation. Why? Is the header un-mingw'y? Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] dxva2: add missing include.
On Thu, Jun 14, 2012 at 04:05:40PM -0700, Ronald S. Bultje wrote : > > This should break every mingw compilation. > > Why? Is the header un-mingw'y? AFAIK, no Mingw installation has it. Especially since dxva.h is about DxVA, and libavcodec uses DxVA2. Best regards, -- Jean-Baptiste Kempf http://www.jbkempf.com/ - +33 672 704 734 Sent from my Electronic Device ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] dnxhdenc: add space between function argument type and comment.
On 06/15/2012 12:57 AM, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/dnxhdenc.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Ok. -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] snow: remove a VLA.
On 06/15/2012 01:02 AM, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/snowenc.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c > index 7b010e1..3c06f8e 100644 > --- a/libavcodec/snowenc.c > +++ b/libavcodec/snowenc.c > @@ -1074,8 +1074,9 @@ static void iterative_me(SnowContext *s){ > BlockNode *blb= mb_x && mb_y+1 &s->block[index+b_stride-1] : NULL; > BlockNode *brb= mb_x+1 &s->block[index+b_stride+1] : NULL; > const int b_w= (MB_SIZE >> s->block_max_depth); > -uint8_t obmc_edged[b_w*2][b_w*2]; > +uint8_t obmc_edged[MB_SIZE * 2][MB_SIZE * 2]; > > +assert(b_w <= MB_SIZE); Ok. I guess being more invasive is pointless as now. lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel