Re: [FFmpeg-devel] [PATCH]Do not ask for mxf samples with unknown field dominance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/09/14 21:45, Tomas Härdin wrote: > On Tue, 2014-08-19 at 22:30 +0200, Michael Niedermayer wrote: >> On Tue, Aug 19, 2014 at 01:30:24AM +0200, Carl Eugen Hoyos wrote: >>> Hi! >>> >>> Attached patch removes a request for samples of which we already >>> have several that all work fine. >> >> field_dominance can have 256 different values, do we have samples >> for all ? do they even exist ? > Whilst the variable may be able to contain 256 different values in reality there are only two possible states f1 first or f2 first. > As far as I recall there are only two (1, 2) and possibly "unknown" (0). > Is there a distinction between "unknown" and "progressive"? I don't have the numbers to hand. > /Tomas > [..] - -- Tim. Key Fingerprint 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAEBAgAGBQJUF+7lAAoJEAwL/ESLC/yD914H/j1iF4mec8zkiVQeySSOOkB+ mebCr5yNhwuYDGQvzCp15nVpLi1y/uyP0TCu+iCJp/pDHR+z8iSO6moKhY+hB0hp 3395I22SujmSa8ODY9NWTrZWqAKnS0Lohfkzva04Tvn31cLskWpQKxPWhBajz0dP d9G4h9O9YhsVBH1L/UhRHRDwDSeghqjTvnw3U63DoGRitFCKZAARATx0O7iH51Xv we3Mk7FAgpWfB5GVQ3VQZWkzydsoQZNjtWnGp4kjnqdONOMY8H6EbiqeQuCY2Tfs yu6OX5KowMAv7YfCrU0J1BlTsl90AA9Rh3KEFhHTjvI75KhAW0KL6x1Oxuz4XcU= =hjO4 -END PGP SIGNATURE- ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avformat/flacenc: use av_clip() instead of av_clip_c()
--- libavformat/flacenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index b3695a2..0eea942 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -95,7 +95,7 @@ static int flac_write_header(struct AVFormatContext *s) padding = 8192; /* The FLAC specification states that 24 bits are used to represent the * size of a metadata block so we must clip this value to 2^24-1. */ -padding = av_clip_c(padding, 0, 16777215); +padding = av_clip(padding, 0, 16777215); ret = ff_flac_write_header(s->pb, codec->extradata, codec->extradata_size, 0); -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] sws: use av_clip() instead of av_clip_c()
--- libswscale/swscale.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 59ead12..e54d448 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -804,9 +804,9 @@ static void xyz12Torgb48(struct SwsContext *c, uint16_t *dst, c->xyz2rgb_matrix[2][2] * z >> 12; // limit values to 12-bit depth -r = av_clip_c(r,0,4095); -g = av_clip_c(g,0,4095); -b = av_clip_c(b,0,4095); +r = av_clip(r, 0, 4095); +g = av_clip(g, 0, 4095); +b = av_clip(b, 0, 4095); // convert from sRGBlinear to RGB and scale from 12bit to 16bit if (desc->flags & AV_PIX_FMT_FLAG_BE) { @@ -860,9 +860,9 @@ static void rgb48Toxyz12(struct SwsContext *c, uint16_t *dst, c->rgb2xyz_matrix[2][2] * b >> 12; // limit values to 12-bit depth -x = av_clip_c(x,0,4095); -y = av_clip_c(y,0,4095); -z = av_clip_c(z,0,4095); +x = av_clip(x, 0, 4095); +y = av_clip(y, 0, 4095); +z = av_clip(z, 0, 4095); // convert from XYZlinear to X'Y'Z' and scale from 12bit to 16bit if (desc->flags & AV_PIX_FMT_FLAG_BE) { -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 02/14] libavcodec: Implementation of AAC_fixed_decoder (LC-module) [2/5]
On Mon, Sep 01, 2014 at 07:55:40PM +0200, Nedeljko Babic wrote: > From: Djordje Pesut > > Add float emulation > > Signed-off-by: Nedeljko Babic > --- > libavcodec/float_emu.h | 295 > + > libavcodec/float_emu_tab.c | 293 > 2 files changed, 588 insertions(+) > create mode 100644 libavcodec/float_emu.h > create mode 100644 libavcodec/float_emu_tab.c theres libavutil/softfloat I dont see why this should be re implemented in each decoder If you can improve softfloat, please do [...] > +typedef struct aac_float_t { > +int mant; > +int expo; > +} aac_float_t; float "emulation" isnt aac specific and *_t are reserved in POSIX IIRC [...] > diff --git a/libavcodec/float_emu_tab.c b/libavcodec/float_emu_tab.c > new file mode 100644 > index 000..396a7a3 > --- /dev/null > +++ b/libavcodec/float_emu_tab.c > @@ -0,0 +1,293 @@ > +/* > + * Copyright (c) 2012 > + * MIPS Technologies, Inc., California. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + *notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + *notice, this list of conditions and the following disclaimer in the > + *documentation and/or other materials provided with the distribution. > + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of is > + *contributors may be used to endorse or promote products derived from > + *this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * Author: Stanislav Ocovaj (stanislav.ocovaj imgtec com) > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +const int divTable[128] = { > + 0x3fff,0x3f80fe04,0x3f03f03f,0x3e88cb3d, > + 0x3e0f83e1,0x3d980f66,0x3d226358,0x3cae7592, > + 0x3c3c3c3c,0x3bcbadc8,0x3b5cc0ed,0x3aef6ca9, > + 0x3a83a83b,0x3a196b1f,0x39b0ad12,0x3949660b, tabs are forbidden in git, we would not be able to push this -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [WIP] lavfi: port mp/eq to a regular filter
On Tue, Sep 16, 2014 at 01:09:01AM +0200, James Darnley wrote: > On 2014-09-15 00:46, James Darnley wrote: > > ... > > Update: I've got eq2 merged into the one file and working. I would send > another WIP patch but I've made several commits, all of which should be > merged together. > > One question I do have though is: should the user options for contrast > in eq and eq2 be different? iam not sure i understand if theres one filter, how could there be 2 ways to specify contrast ? also if you have 1 filter that implements brightness/contrast/saturation/gamma correction then depending on the parameters choosen by the user the operation can be either done relativly easily in RGB&YUV or for example with gamma it really needs RGB space i dont think the eq2 gamma code make much sense > eq has the range -1..1 (-100..100 in the > original) with no change being 0. eq2 has the range -2..2 with no > change being 1 (a more obvious scaling factor) and a negative value > inverting the image. I don't know if this difference is desired or not. being able to invert contrast and saturation is certainly interresting > > There was some minor talk on IRC earlier about merging this with our > current vf_hue, which itself is a port from libmpcodecs. Is this > something that people want? is there code that could/would be shared ? is usage easier for the user ? actually i wonder if not seperate contrast/brightness an gamma filters would be easier to use. It would be rather trivial to add such filters on top of a eq filter [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/avidec: assumes that extradata begins with palette when bpp <= 8.
Some other information is stored in extradata, such that the BottomUp field. But it seems that extradata always starts with the palette. Fixes ticket #1304 --- libavformat/avidec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 5b260e2..6292952 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -745,7 +745,7 @@ static int avi_read_header(AVFormatContext *s) avio_r8(pb); /* Extract palette from extradata if bpp <= 8. - * This code assumes that extradata contains only palette. + * This code assumes that extradata begins with palette. * This is true for all paletted codecs implemented in * FFmpeg. */ if (st->codec->extradata_size && @@ -754,8 +754,7 @@ static int avi_read_header(AVFormatContext *s) const uint8_t *pal_src; pal_size = FFMIN(pal_size, st->codec->extradata_size); -pal_src = st->codec->extradata + - st->codec->extradata_size - pal_size; +pal_src = st->codec->extradata; for (i = 0; i < pal_size / 4; i++) ast->pal[i] = 0xFFU<<24 | AV_RL32(pal_src+4*i); ast->has_pal = 1; -- 2.1.0.127.g0c72b98 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] add hls_ts_option into hlsenc
In data Friday 2014-09-12 18:07:01 +0800, Steven Liu ha scritto: > I have refine the patch as Stefano's suggestion:-) [...] > From 85e2e8afff26b8aa7f45ad463b3142919bb431a8 Mon Sep 17 00:00:00 2001 > From: Steven Liu > Date: Fri, 12 Sep 2014 18:04:52 +0800 > Subject: [PATCH] add hls_ts_option into hlsenc > > same as COMMITID 4f5493fe2380ad4aba67759baa7d7d4437f2e776 > --- > doc/muxers.texi | 5 + > libavformat/hlsenc.c | 24 +++- > 2 files changed, 28 insertions(+), 1 deletion(-) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 57e81f4..cc62705dc 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -220,6 +220,11 @@ Set the segment length in seconds. Default value is 2. > Set the maximum number of playlist entries. If set to 0 the list file > will contain all the segments. Default value is 5. > > +@item hls_ts_options @var{options_list} > +Set output format options using a :-separated list of key=value > +parameters. Values containing @code{:} special characters must be > +escaped. > + > @item hls_wrap @var{wrap} > Set the number after which the segment filename number (the number > specified in each segment file) wraps. If set to 0 the number will be > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 11f1e5b..72ed45a 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -63,6 +63,8 @@ typedef struct HLSContext { > > char *basename; > char *baseurl; > +char *format_options_str; > +AVDictionary *format_options; > > AVIOContext *pb; > } HLSContext; > @@ -204,12 +206,21 @@ static int hls_write_header(AVFormatContext *s) > int ret, i; > char *p; > const char *pattern = "%d.ts"; > +AVDictionary *options = NULL; > int basename_size = strlen(s->filename) + strlen(pattern) + 1; > > hls->sequence = hls->start_sequence; > hls->recording_time = hls->time * AV_TIME_BASE; > hls->start_pts = AV_NOPTS_VALUE; > > +if (hls->format_options_str) { > +ret = av_dict_parse_string(&hls->format_options, > hls->format_options_str, "=", ":", 0); > +if (ret < 0) { > +av_log(s, AV_LOG_ERROR, "Could not parse format options list > '%s'\n", hls->format_options_str); > +goto fail; > +} > +} > + > for (i = 0; i < s->nb_streams; i++) > hls->has_video += > s->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO; > @@ -248,11 +259,21 @@ static int hls_write_header(AVFormatContext *s) > if ((ret = hls_start(s)) < 0) > goto fail; > > -if ((ret = avformat_write_header(hls->avf, NULL)) < 0) > +av_dict_copy(&options, hls->format_options, 0); > +ret = avformat_write_header(hls->avf, &options); > +if (av_dict_count(options)) { > +av_log(s, AV_LOG_ERROR, "Some of provided format options in '%s' are > not recognized\n", hls->format_options_str); > +ret = AVERROR(EINVAL); > goto fail; > +} > > +if (ret < 0) { > +goto fail; > +} > > fail: > + > +av_dict_free(&options); > if (ret) { > av_free(hls->basename); > if (hls->avf) > @@ -338,6 +359,7 @@ static const AVOption options[] = { > {"start_number", "set first number in the sequence", > OFFSET(start_sequence),AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, E}, > {"hls_time", "set segment length in seconds", > OFFSET(time),AV_OPT_TYPE_FLOAT, {.dbl = 2}, 0, FLT_MAX, E}, > {"hls_list_size", "set maximum number of playlist entries", > OFFSET(max_nb_segments),AV_OPT_TYPE_INT,{.i64 = 5}, 0, INT_MAX, > E}, > +{"hls_ts_options","set hls mpegts list of options for the container > format used for hls", OFFSET(format_options_str), AV_OPT_TYPE_STRING, {.str = > NULL}, 0, 0,E}, > {"hls_wrap", "set number after which the index wraps", > OFFSET(wrap),AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, E}, > {"hls_base_url", "url to prepend to each playlist entry", > OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, > { NULL }, > -- > 1.8.5.2 (Apple Git-48) LGTM, I'm going to push it soon. Thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc/examples/transcoding: use av_packet_rescale_ts()
On date Thursday 2014-09-11 13:44:49 +0200, Michael Niedermayer encoded: > On Wed, Sep 10, 2014 at 12:17:11PM +0200, Stefano Sabatini wrote: > > Simplify. > > --- > > doc/examples/transcoding.c | 36 +--- > > 1 file changed, 9 insertions(+), 27 deletions(-) > > should be ok Applied, thanks. -- FFmpeg = Frightening Fantastic Mastering Programmable Emblematic Gadget ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/flacenc: use av_clip() instead of av_clip_c()
On Tue, Sep 16, 2014 at 10:15:41AM +0200, Clément Bœsch wrote: > --- > libavformat/flacenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] sws: use av_clip() instead of av_clip_c()
On Tue, Sep 16, 2014 at 10:15:42AM +0200, Clément Bœsch wrote: > --- > libswscale/swscale.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] sws: use av_clip() instead of av_clip_c()
On Tue, Sep 16, 2014 at 04:56:25PM +0200, Michael Niedermayer wrote: > On Tue, Sep 16, 2014 at 10:15:42AM +0200, Clément Bœsch wrote: > > --- > > libswscale/swscale.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > LGTM > Applied, thanks -- Clément B. pgpD2mu96y5hX.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/flacenc: use av_clip() instead of av_clip_c()
On Tue, Sep 16, 2014 at 04:53:42PM +0200, Michael Niedermayer wrote: > On Tue, Sep 16, 2014 at 10:15:41AM +0200, Clément Bœsch wrote: > > --- > > libavformat/flacenc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > LGTM > Pushed, thanks -- Clément B. pgpnAHRJ8G715.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Branchpoint tags
Michael Niedermayer gmx.at> writes: > Should we add git tags to the revissions where > releases are branched off ? Yes please, this would make my life much easier. n2.5-dev sounds ok. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Status of dvdsub "forced_subs_only" patch
Ok, I seem to have a partial solution. I thought that the place to put this would be in the dvdsubenc.c. So I made the following changes (sorry for inline patch) diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index 425f0af..7cae3f4 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -30,6 +30,7 @@ typedef struct { AVClass *class; uint32_t global_palette[16]; int even_rows_fix; +int only_enc_forced; } DVDSubtitleContext; // ncnt is the nibble counter @@ -277,6 +278,9 @@ static int encode_dvd_subtitles(AVCodecContext *avctx, forced = 1; break; } +if (!forced && dvdc->only_enc_forced) + return 0; + vrect = *h->rects[0]; if (rects > 1) { @@ -453,6 +457,7 @@ static int dvdsub_encode(AVCodecContext *avctx, #define SE AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { {"even_rows_fix", "Make number of rows even (workaround for some players)", OFFSET(even_rows_fix), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SE}, +{"only_enc_forced", "Only encode forced subtitles", OFFSET(only_enc_forced), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SE}, { NULL }, }; Ok, with this change, ffmpeg compiles fine. To do my testing, I have a file called subs.mkv that just has two subtitle tracks. Both tracks have about 1000 subtitles. Track 0 has 46 forced subtitles, and track 1 has zero. The commands I am using are ffmpeg -i subs.mkv -map 0 -c:s dvdsub -only_enc_forced 1 only.mkv This produces a smaller file. (from 7.9M to 240K) If I pull out the subs & idx's using mkvextract tracks rec.mkv 0:subs-0.sub 1:subs-1.sub produces strange results. The idx's are the same size (49K & 61K) as the original idx's, but the .sub files are smaller (2.3M & 2.8M from 4.9M and 5.5M) However, something isn't right. If I try to open these new sub/idx's in BDsup2sub I get: "ERROR: Invalid control buffer size" However, if I put the only.mkv through ffmpeg again with: ffmpeg -i only.mkv -map 0 -c:s dvdsub recode.mkv And then pull the mkv's out with similar mkvextract command, it get the 46 (in 0) and 0 (in 1) subtitles I was expecting. The file sizes are also saner (idx's 2.2K & 219B, .subs 184K and 0B) So, it seems like what I am doing produces a mangled dvdsub track, but one that ffmpeg can make sense of. It isn't just some muxing thing since if I run only.mkv through mkvmerge, it doesn't get fixed. How can I finish this patch? -Nick ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] avfilter/ass: make sure the log level are in available range
On Mon, Sep 15, 2014 at 08:59:06PM +0200, Clément Bœsch wrote: > On Thu, Sep 11, 2014 at 11:53:57PM +0200, Michael Niedermayer wrote: > > On Thu, Sep 11, 2014 at 09:13:29PM +0200, Clément Bœsch wrote: > > > --- > > > libavfilter/vf_subtitles.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c > > > index 4fa1174..44273cb 100644 > > > --- a/libavfilter/vf_subtitles.c > > > +++ b/libavfilter/vf_subtitles.c > > > @@ -80,7 +80,9 @@ static const int ass_libavfilter_log_level_map[] = { > > > > > > static void ass_log(int ass_level, const char *fmt, va_list args, void > > > *ctx) > > > { > > > -int level = ass_libavfilter_log_level_map[ass_level]; > > > +const int ass_level_clip = av_clip(ass_level, 0, > > > +FF_ARRAY_ELEMS(ass_libavfilter_log_level_map) - 1); > > > +const int level = ass_libavfilter_log_level_map[ass_level_clip]; > > > > LGTM > > > > btw, in > > [2] = AV_LOG_WARNING, /* MSGL_WARN */ > > [3] = AV_LOG_WARNING, /* */ > > [4] = AV_LOG_INFO, /* MSGL_INFO */ > > [5] = AV_LOG_INFO, /* */ > > [6] = AV_LOG_VERBOSE, /* MSGL_V */ > > > > AV_LOG levels have finer level values than the named identifers > > so it would be possible to use different levels instead of using > > info and warning twice > > > > Right, but we don't really need that extra complexity with finer grain; > the entries are basically just unmapped & unused in libass so > they won't be called. > > I'll apply the patchset soon unless someone object. > Applied the 3, thanks -- Clément B. pgpU0WxYcH7eq.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] doc/filters: add geq gradient examples
On Tue, 16 Sep 2014 07:34:14 +0200, Clément Bœsch wrote: > On Mon, Sep 15, 2014 at 06:56:29PM -0800, Lou Logan wrote: > > +@item > > +Create a radial gradient that is the same size as the input: > > +@example > > +geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray > > +@end example > > + > > You may mention @ref{vignette} filter here so people don't end up using it > verbatim. Mentioned. > > +@item > > +Create a linear gradient to use as a mask for another filter, then > > +compose with @ref{overlay}: > > +@example > > +geq=lum=255*(Y/H),format=gray[grad];[0:v]boxblur=4[blur];[blur][grad]alphamerge[alpha];[0:v][alpha]overlay > > This filtergraph is complex and very input dependant; please provide a > complete command line as an example Added. I actually prefer complete examples. New version inserted below: From 3ec5557f7ffd4e2ce6ddc5c06d1e5d5d07013536 Mon Sep 17 00:00:00 2001 From: Lou Logan Date: Mon, 15 Sep 2014 18:07:09 -0800 Subject: [PATCH] doc/filters: add geq gradient examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Radial gradient by Víctor Paesa. Linear gradient by Paul Gentemann. Also-by: Víctor Paesa Also-by: Paul Gentemann Signed-off-by: Lou Logan --- doc/filters.texi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index bb486ea..1881b5c 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5124,6 +5124,20 @@ Modify RGB components depending on pixel position: @example geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)' @end example + +@item +Create a radial gradient that is the same size as the input (also see +the @ref{vignette} filter): +@example +geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray +@end example + +@item +Create a linear gradient to use as a mask for another filter, then +compose with @ref{overlay}: +@example +ffmpeg -i input.mp4 -filter_complex "geq=lum=255*(Y/H),format=gray[grad];[0:v]boxblur=4[blur];[blur][grad]alphamerge[alpha];[0:v][alpha]overlay" output.mp4 +@end example @end itemize @section gradfun -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/assdec: output ASS packets
On Sun, Sep 14, 2014 at 10:01:55AM +0200, Clément Bœsch wrote: > After this the order from the original file is stored through readorder > when doing ffmpeg -i input.ass -c copy output.mkv. > > And now that the ASS muxer honors the ReadOrder, extracting the ass back > (without transcoding) restores the original order. > > TODO: micro bump? > --- > libavformat/assdec.c | 37 + > 1 file changed, 33 insertions(+), 4 deletions(-) > ping [...] -- Clément B. pgpT5emYwrOMD.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Make high bit-depth libvpx samples show the correct bit depth
Hi! Attached patch fixes ffmpeg -i output for high-bitrate vp9 files here. Please comment, Carl Eugen diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 8312460..6b6e899 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -56,7 +56,9 @@ static av_cold int vpx_init(AVCodecContext *avctx, return AVERROR(EINVAL); } +#if !defined(VPX_IMG_FMT_HIGHBITDEPTH) avctx->pix_fmt = AV_PIX_FMT_YUV420P; +#endif return 0; } ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Allow using libopenjpeg 2.x
Hi! Attached patch allows using libopenjpeg 2.x (tested with 2.1) here. Based on a patch by mcirsta. Please comment, Carl Eugen diff --git a/configure b/configure index 392cbb1..47fca96 100755 --- a/configure +++ b/configure @@ -4827,6 +4827,7 @@ enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D enabled libopencv && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader enabled libopenjpeg && { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC || check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC || + check_lib openjpeg.h opj_version -lopenmj2 -DOPJ_STATIC || die "ERROR: libopenjpeg not found"; } enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse pulse/pulseaudio.h pa_context_new ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] web/contact: clarify mailing list descriptions
On Mon, 15 Sep 2014 14:03:16 -0800, Lou Logan wrote: > Also organize mailing lists by development, help, then logs. > Also link some phrases to relevant pages. > > Signed-off-by: Lou Logan > --- > src/contact | 26 +- > 1 file changed, 13 insertions(+), 13 deletions(-) Pushed after removing the broken links-within-links that I neglected to notice earlier. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/assdec: output ASS packets
On Tue, 16 Sep 2014 21:37:08 +0200 Clément Bœsch wrote: > On Sun, Sep 14, 2014 at 10:01:55AM +0200, Clément Bœsch wrote: > > After this the order from the original file is stored through readorder > > when doing ffmpeg -i input.ass -c copy output.mkv. > > > > And now that the ASS muxer honors the ReadOrder, extracting the ass back > > (without transcoding) restores the original order. > > > > TODO: micro bump? > > --- > > libavformat/assdec.c | 37 + > > 1 file changed, 33 insertions(+), 4 deletions(-) > > > > ping I can just say that it looks reasonable to me. One problem was whether ReadOrder starts with 0 or 1. The "spec" seems to imply it's 1 (never clearly stated, but an example uses 1), but all real world files use 0, and we concluded that it must be 0. One minor detail: could it be that the layer field has whitespace between the number and the ','? AFAIK strtol() doesn't skip trailing whitespace. It's also a bit annoying that the code looks at the event lines twice (read_ts and reformat_line). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/assdec: output ASS packets
On Tue, Sep 16, 2014 at 10:44:32PM +0200, wm4 wrote: > On Tue, 16 Sep 2014 21:37:08 +0200 > Clément Bœsch wrote: > > > On Sun, Sep 14, 2014 at 10:01:55AM +0200, Clément Bœsch wrote: > > > After this the order from the original file is stored through readorder > > > when doing ffmpeg -i input.ass -c copy output.mkv. > > > > > > And now that the ASS muxer honors the ReadOrder, extracting the ass back > > > (without transcoding) restores the original order. > > > > > > TODO: micro bump? > > > --- > > > libavformat/assdec.c | 37 + > > > 1 file changed, 33 insertions(+), 4 deletions(-) > > > > > > > ping > > I can just say that it looks reasonable to me. > > One problem was whether ReadOrder starts with 0 or 1. The "spec" seems > to imply it's 1 (never clearly stated, but an example uses 1), but all > real world files use 0, and we concluded that it must be 0. > Indeed I confirm that, every samples I looked at started at 0; I believe it's a better choice that 1. But I actually made the "mistake" to follow the specifications in the ass encoder; I'll probably need to change that at some point. > One minor detail: could it be that the layer field has whitespace > between the number and the ','? AFAIK strtol() doesn't skip trailing > whitespace. Mmh. Yeah I'll adjust the code just in case. > It's also a bit annoying that the code looks at the event > lines twice (read_ts and reformat_line). Ah, didn't even thought of merging them. Alright, I'll send a new version in the next days. Thanks -- Clément B. pgptKD9pCK7JE.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] doc/filters: add geq gradient examples
On Tue, Sep 16, 2014 at 11:25:19AM -0800, Lou Logan wrote: > On Tue, 16 Sep 2014 07:34:14 +0200, Clément Bœsch wrote: > > > On Mon, Sep 15, 2014 at 06:56:29PM -0800, Lou Logan wrote: > > > +@item > > > +Create a radial gradient that is the same size as the input: > > > +@example > > > +geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray > > > +@end example > > > + > > > > You may mention @ref{vignette} filter here so people don't end up using it > > verbatim. > > Mentioned. > > > > +@item > > > +Create a linear gradient to use as a mask for another filter, then > > > +compose with @ref{overlay}: > > > +@example > > > +geq=lum=255*(Y/H),format=gray[grad];[0:v]boxblur=4[blur];[blur][grad]alphamerge[alpha];[0:v][alpha]overlay > > > > This filtergraph is complex and very input dependant; please provide a > > complete command line as an example > > Added. I actually prefer complete examples. > > > New version inserted below: > > From 3ec5557f7ffd4e2ce6ddc5c06d1e5d5d07013536 Mon Sep 17 00:00:00 2001 > From: Lou Logan > Date: Mon, 15 Sep 2014 18:07:09 -0800 > Subject: [PATCH] doc/filters: add geq gradient examples > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > Radial gradient by Víctor Paesa. > Linear gradient by Paul Gentemann. > > Also-by: Víctor Paesa > Also-by: Paul Gentemann > Signed-off-by: Lou Logan LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] doc/filters: add geq gradient examples
On Tue, 16 Sep 2014 23:57:29 +0200, Michael Niedermayer wrote: > LGTM Pushed with an expanded description of the second example after discussing with ubitux in #ffmpeg-devel IRC. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] ffplay: factorize frame queue operations
On Sat, 6 Sep 2014, Marton Balint wrote: Create a generic frame and a frame queue struct to handle video picture queues and subtitle picture queues with common code. Also add the possibility to queue AVFrames, however at the moment we only use SDL_Overlay buffers for video and AVSubtitles for subtitles. Signed-off-by: Marton Balint --- ffplay.c | 357 +++ 1 file changed, 199 insertions(+), 158 deletions(-) diff --git a/ffplay.c b/ffplay.c index 833b5b1..c59065f 100644 Hello Michael, Please merge from my stable branch for the ffplay patches: 5a5128b ffplay: factorize frame queue operations 1643764 ffplay: use frame queue to determine last used pos Thanks, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] x86/me_cmp: port mmxext and sse2 sad functions to yasm
Also add a missing c->pix_abs[0][0] initialization, and sse2 versions of sad16_x2, sad16_y2 and sad16_xy2 (%15 to %20 faster than mmxext). Since the _xy2 versions are not bitexact, they are accordingly marked as approximate. Signed-off-by: James Almer --- libavcodec/x86/me_cmp.asm| 330 +++ libavcodec/x86/me_cmp_init.c | 203 +++--- 2 files changed, 379 insertions(+), 154 deletions(-) diff --git a/libavcodec/x86/me_cmp.asm b/libavcodec/x86/me_cmp.asm index b0741f3..27176f4 100644 --- a/libavcodec/x86/me_cmp.asm +++ b/libavcodec/x86/me_cmp.asm @@ -23,6 +23,10 @@ %include "libavutil/x86/x86util.asm" +SECTION_RODATA + +cextern pb_1 + SECTION .text %macro DIFF_PIXELS_1 4 @@ -465,3 +469,329 @@ cglobal hf_noise%1, 3,3,0, pix1, lsize, h INIT_MMX mmx HF_NOISE 8 HF_NOISE 16 + +;--- +;int ff_sad_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int stride, int h); +;--- +INIT_MMX mmxext +cglobal sad8, 4, 4, 0, v, pix1, pix2, stride +movu m2, [pix2q] +movu m1, [pix2q+strideq] +psadbwm2, [pix1q] +psadbwm1, [pix1q+strideq] +paddw m2, m1 + +%rep 3 +leapix1q, [pix1q+strideq*2] +leapix2q, [pix2q+strideq*2] +movu m0, [pix2q] +movu m1, [pix2q+strideq] +psadbwm0, [pix1q] +psadbwm1, [pix1q+strideq] +paddw m2, m0 +paddw m2, m1 +%endrep +movd eax, m2 +RET + +%macro SAD16 0 +cglobal sad16, 5, 5, 3, v, pix1, pix2, stride, h +pxor m2, m2 + +align 16 +.loop +movu m0, [pix2q] +movu m1, [pix2q+strideq] +psadbwm0, [pix1q] +psadbwm1, [pix1q+strideq] +paddw m2, m0 +paddw m2, m1 +%if mmsize == 8 +movu m0, [pix2q+8] +movu m1, [pix2q+strideq+8] +psadbwm0, [pix1q+8] +psadbwm1, [pix1q+strideq+8] +paddw m2, m0 +paddw m2, m1 +%endif +leapix1q, [pix1q+strideq*2] +leapix2q, [pix2q+strideq*2] +sub hd, 2 +jg .loop +%if mmsize == 16 +movhlps m0, m2 +paddw m2, m0 +%endif +movd eax, m2 +RET +%endmacro + +INIT_MMX mmxext +SAD16 +INIT_XMM sse2 +SAD16 + +;-- +;int ff_sad_x2_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int stride, int h); +;-- +INIT_MMX mmxext +cglobal sad8_x2, 4, 4, 0, v, pix1, pix2, stride +movu m0, [pix2q] +movu m2, [pix2q+strideq] +pavgb m0, [pix2q+1] +pavgb m2, [pix2q+strideq+1] +psadbwm0, [pix1q] +psadbwm2, [pix1q+strideq] +paddw m0, m2 + +%rep 3 +leapix1q, [pix1q+2*strideq] +leapix2q, [pix2q+2*strideq] +movu m1, [pix2q] +movu m2, [pix2q+strideq] +pavgb m1, [pix2q+1] +pavgb m2, [pix2q+strideq+1] +psadbwm1, [pix1q] +psadbwm2, [pix1q+strideq] +paddw m0, m1 +paddw m0, m2 +%endrep +movd eax, m0 +RET + +%macro SAD16_X2 0 +cglobal sad16_x2, 5, 5, 5, v, pix1, pix2, stride, h +pxor m0, m0 + +align 16 +.loop: +movu m1, [pix2q] +movu m2, [pix2q+strideq] +%if mmsize == 16 +movu m3, [pix2q+1] +movu m4, [pix2q+strideq+1] +pavgb m1, m3 +pavgb m2, m4 +%else +pavgb m1, [pix2q+1] +pavgb m2, [pix2q+strideq+1] +%endif +psadbwm1, [pix1q] +psadbwm2, [pix1q+strideq] +paddw m0, m1 +paddw m0, m2 +%if mmsize == 8 +movu m1, [pix2q+8] +movu m2, [pix2q+strideq+8] +pavgb m1, [pix2q+9] +pavgb m2, [pix2q+strideq+9] +psadbwm1, [pix1q+8] +psadbwm2, [pix1q+strideq+8] +paddw m0, m1 +paddw m0, m2 +%endif +leapix1q, [pix1q+2*strideq] +leapix2q, [pix2q+2*strideq] +sub hd, 2 +jg .loop +%if mmsize == 16 +movhlps m1, m0 +paddw m0, m1 +%endif +movd eax, m0 +RET +%endmacro + +INIT_MMX mmxext +SAD16_X2 +INIT_XMM sse2 +SAD16_X2 + +;-- +;int ff_sad_y2_(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int stride, int h); +;-- +INIT_MMX mmxext +cglobal sad8_y2, 4, 4, 0, v, pix1, pix2, stride +movu m1, [pix2q] +movu m0, [pix2q+strideq] +movu m3, [pix2q+2*strideq] +pavgb m1, m0 +pavgb m0, m3 +addpix2q, strideq +psadbwm1, [pix1q] +psadbwm0, [pix1q+strideq] +paddw m0, m1 +mova m1, m3 + +%rep 3 +leapix1q, [pix1q+2*strideq] +leapix2q,
Re: [FFmpeg-devel] [PATCH 1/2] ffplay: factorize frame queue operations
On Wed, Sep 17, 2014 at 12:19:49AM +0200, Marton Balint wrote: > > On Sat, 6 Sep 2014, Marton Balint wrote: > > >Create a generic frame and a frame queue struct to handle video picture > >queues > >and subtitle picture queues with common code. Also add the possibility to > >queue > >AVFrames, however at the moment we only use SDL_Overlay buffers for video and > >AVSubtitles for subtitles. > > > >Signed-off-by: Marton Balint > >--- > >ffplay.c | 357 > >+++ > >1 file changed, 199 insertions(+), 158 deletions(-) > > > >diff --git a/ffplay.c b/ffplay.c > >index 833b5b1..c59065f 100644 > > Hello Michael, > > Please merge from my stable branch for the ffplay patches: > > 5a5128b ffplay: factorize frame queue operations > 1643764 ffplay: use frame queue to determine last used pos merged thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] ffplay: factorize frame queue operations
On Wed, Sep 17, 2014 at 03:47:09AM +0200, Michael Niedermayer wrote: > On Wed, Sep 17, 2014 at 12:19:49AM +0200, Marton Balint wrote: > > > > On Sat, 6 Sep 2014, Marton Balint wrote: > > > > >Create a generic frame and a frame queue struct to handle video picture > > >queues > > >and subtitle picture queues with common code. Also add the possibility to > > >queue > > >AVFrames, however at the moment we only use SDL_Overlay buffers for video > > >and > > >AVSubtitles for subtitles. > > > > > >Signed-off-by: Marton Balint > > >--- > > >ffplay.c | 357 > > >+++ > > >1 file changed, 199 insertions(+), 158 deletions(-) > > > > > >diff --git a/ffplay.c b/ffplay.c > > >index 833b5b1..c59065f 100644 > > > > Hello Michael, > > > > Please merge from my stable branch for the ffplay patches: > > > > 5a5128b ffplay: factorize frame queue operations > > 1643764 ffplay: use frame queue to determine last used pos > > merged Seems this causes problems on apple: http://fate.ffmpeg.org/report.cgi?time=20140917022057&slot=x86_64-darwin-gcc-4.9 ill commit something that might fix the build in a moment so its not left broken but please check it when you have time [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel