[FFmpeg-cvslog] configure: fix ldl dependency for new nvenc encoder names
ffmpeg | branch: master | Timo Rothenpieler | Wed Aug 31 16:39:59 2016 +0200| [2b1d316ff68a3f973d8f342db6bf9755eb78ec10] | committer: Timo Rothenpieler configure: fix ldl dependency for new nvenc encoder names > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b1d316ff68a3f973d8f342db6bf9755eb78ec10 --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index e30ddd2..6741f83 100755 --- a/configure +++ b/configure @@ -2676,6 +2676,7 @@ vaapi_encode_deps="vaapi" hwupload_cuda_filter_deps="cuda" scale_npp_filter_deps="cuda libnpp" +nvenc_deps_any="dlopen LoadLibrary" nvenc_encoder_deps="nvenc" h264_cuvid_decoder_deps="cuda cuvid CUVIDH264PICPARAMS" h264_cuvid_decoder_select="h264_mp4toannexb_bsf h264_cuvid_hwaccel" @@ -5388,7 +5389,7 @@ decklink_indev_extralibs="$decklink_indev_extralibs $ldl" frei0r_filter_extralibs='$ldl' frei0r_src_filter_extralibs='$ldl' ladspa_filter_extralibs='$ldl' -nvenc_encoder_extralibs='$ldl' +nvenc_extralibs='$ldl' coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework OpenGL" coreimagesrc_filter_extralibs="-framework QuartzCore -framework AppKit -framework OpenGL" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: fix nvenc detection logic
ffmpeg | branch: master | Timo Rothenpieler | Wed Aug 31 15:40:00 2016 +0200| [20f09020108e4283270d168f4ceed8ed34e11ab6] | committer: Timo Rothenpieler configure: fix nvenc detection logic > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20f09020108e4283270d168f4ceed8ed34e11ab6 --- configure | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 52931c3..e30ddd2 100755 --- a/configure +++ b/configure @@ -3205,7 +3205,7 @@ enable audiotoolbox enable d3d11va dxva2 vaapi vda vdpau videotoolbox_hwaccel xvmc enable xlib -enable vda_framework videotoolbox videotoolbox_encoder +enable nvenc vda_framework videotoolbox videotoolbox_encoder # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' @@ -5992,22 +5992,26 @@ enabled vdpau && enabled xlib && check_lib2 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau && enable vdpau_x11 -case $target_os in -mingw32*|mingw64*|win32|win64|linux|cygwin*) -disabled nvenc || enable nvenc -;; -*) -disable nvenc -;; -esac - -if enabled nvenc; then -{ -echo '#include "compat/nvenc/nvEncodeAPI.h"' -echo 'int main(void) { return 0; }' -} | check_cc -I$source_path || disable nvenc +if enabled x86; then +case $target_os in +mingw32*|mingw64*|win32|win64|linux|cygwin*) +;; +*) +disable nvenc +;; +esac +else +disable nvenc fi +enabled nvenc && +check_cc -I$source_path
[FFmpeg-cvslog] avfilter/vf_psnr: Add max value output option to psnr stats log.
ffmpeg | branch: master | Lucas Cooper | Wed Aug 31 12:40:41 2016 -0700| [aabe12eba3758d6f393ba754a54307d5c705084c] | committer: Michael Niedermayer avfilter/vf_psnr: Add max value output option to psnr stats log. This allows retroactive calculation/aggregation of PSNR from the stats log. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aabe12eba3758d6f393ba754a54307d5c705084c --- doc/filters.texi | 10 ++ libavfilter/vf_psnr.c | 20 2 files changed, 30 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index b50d7a6..88c6f65 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10832,6 +10832,12 @@ standard output. Specifies which version of the stats file format to use. Details of each format are written below. Default value is 1. + +@item stats_add_max +Determines whether the max value is output to the stats log. +Default value is 0. +Requires stats_version >= 2. If this is set and stats_version < 2, +the filter will return an error. @end table The file printed if @var{stats_file} is selected, contains a sequence of @@ -10868,6 +10874,10 @@ frames for the component specified by the suffix. @item psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a Peak Signal to Noise ratio of the compared frames for the component specified by the suffix. + +@item max_avg, max_y, max_u, max_v +Maximum allowed value for each channel, and average over all +channels. @end table For example: diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 3bec747..320f433 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -45,6 +45,7 @@ typedef struct PSNRContext { char *stats_file_str; int stats_version; int stats_header_written; +int stats_add_max; int max[4], average_max; int is_rgb; uint8_t rgba_map[4]; @@ -63,6 +64,7 @@ static const AVOption psnr_options[] = { {"stats_file", "Set file where to store per-frame difference information", OFFSET(stats_file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, {"f", "Set file where to store per-frame difference information", OFFSET(stats_file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, {"stats_version", "Set the format version for the stats file.", OFFSET(stats_version), AV_OPT_TYPE_INT,{.i64=1},1, 2, FLAGS }, +{"output_max", "Add raw stats (max values) to the output log.", OFFSET(stats_add_max), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, { NULL } }; @@ -182,6 +184,12 @@ static AVFrame *do_psnr(AVFilterContext *ctx, AVFrame *main, for (j = 0; j < s->nb_components; j++) { fprintf(s->stats_file, ",psnr_%c", s->comps[j]); } +if (s->stats_add_max) { +fprintf(s->stats_file, ",max_avg"); +for (j = 0; j < s->nb_components; j++) { +fprintf(s->stats_file, ",max_%c", s->comps[j]); +} +} fprintf(s->stats_file, "\n"); s->stats_header_written = 1; } @@ -196,6 +204,13 @@ static AVFrame *do_psnr(AVFilterContext *ctx, AVFrame *main, fprintf(s->stats_file, "psnr_%c:%0.2f ", s->comps[j], get_psnr(comp_mse[c], 1, s->max[c])); } +if (s->stats_version == 2 && s->stats_add_max) { +fprintf(s->stats_file, "max_avg:%d ", s->average_max); +for (j = 0; j < s->nb_components; j++) { +c = s->is_rgb ? s->rgba_map[j] : j; +fprintf(s->stats_file, "max_%c:%d ", s->comps[j], s->max[c]); +} +} fprintf(s->stats_file, "\n"); } @@ -210,6 +225,11 @@ static av_cold int init(AVFilterContext *ctx) s->max_mse = -INFINITY; if (s->stats_file_str) { +if (s->stats_version < 2 && s->stats_add_max) { +av_log(ctx, AV_LOG_ERROR, +"stats_add_max was specified but stats_version < 2.\n" ); +return AVERROR(EINVAL); +} if (!strcmp(s->stats_file_str, "-")) { s->stats_file = stdout; } else { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/movenc: added ability to use original stream ids as track ids instead of regenerating them
ffmpeg | branch: master | Erkki Seppälä | Wed Aug 31 14:35:44 2016 +0300| [499e8b0952b2888e2defda7a2c9914dcdf1cfa8d] | committer: Michael Niedermayer avformat/movenc: added ability to use original stream ids as track ids instead of regenerating them Sometimes it's useful to be able to define the exact track numbers in the generated track, instead of always beginning at track id 1. Using the option use_stream_ids_as_track_ids now copies the use stream ids to track ids. Dynamically generated tracks (ie. tmcd) have their track numbers defined as continuing from the highest numbered stream id. Signed-off-by: Erkki Seppälä Signed-off-by: OZOPlayer Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=499e8b0952b2888e2defda7a2c9914dcdf1cfa8d --- libavformat/movenc.c | 61 ++-- libavformat/movenc.h | 2 ++ 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 9bf3a04..b82bfea 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -89,6 +89,7 @@ static const AVOption options[] = { { "encryption_scheme","Configures the encryption scheme, allowed values are none, cenc-aes-ctr", offsetof(MOVMuxContext, encryption_scheme_str), AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM }, { "encryption_key", "The media encryption key (hex)", offsetof(MOVMuxContext, encryption_key), AV_OPT_TYPE_BINARY, .flags = AV_OPT_FLAG_ENCODING_PARAM }, { "encryption_kid", "The media encryption key identifier (hex)", offsetof(MOVMuxContext, encryption_kid), AV_OPT_TYPE_BINARY, .flags = AV_OPT_FLAG_ENCODING_PARAM }, +{ "use_stream_ids_as_track_ids", "use stream ids as track ids", offsetof(MOVMuxContext, use_stream_ids_as_track_ids), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, { NULL }, }; @@ -3435,6 +3436,52 @@ static void build_chunks(MOVTrack *trk) } } +/** + * Assign track ids. If option "use_stream_ids_as_track_ids" is set, + * the stream ids are used as track ids. + * + * This assumes mov->tracks and s->streams are in the same order and + * there are no gaps in either of them (so mov->tracks[n] refers to + * s->streams[n]). + * + * As an exception, there can be more entries in + * s->streams than in mov->tracks, in which case new track ids are + * generated (starting after the largest found stream id). + */ +static int mov_setup_track_ids(MOVMuxContext *mov, AVFormatContext *s) +{ +int i; + +if (mov->track_ids_ok) +return 0; + +if (mov->use_stream_ids_as_track_ids) { +int next_generated_track_id = 0; +for (i = 0; i < s->nb_streams; i++) { +if (s->streams[i]->id > next_generated_track_id) +next_generated_track_id = s->streams[i]->id; +} + +for (i = 0; i < mov->nb_streams; i++) { +if (mov->tracks[i].entry <= 0 && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) +continue; + +mov->tracks[i].track_id = i >= s->nb_streams ? ++next_generated_track_id : s->streams[i]->id; +} +} else { +for (i = 0; i < mov->nb_streams; i++) { +if (mov->tracks[i].entry <= 0 && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) +continue; + +mov->tracks[i].track_id = i + 1; +} +} + +mov->track_ids_ok = 1; + +return 0; +} + static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s) { @@ -3443,12 +3490,13 @@ static int mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, avio_wb32(pb, 0); /* size placeholder*/ ffio_wfourcc(pb, "moov"); +mov_setup_track_ids(mov, s); + for (i = 0; i < mov->nb_streams; i++) { if (mov->tracks[i].entry <= 0 && !(mov->flags & FF_MOV_FLAG_FRAGMENT)) continue; mov->tracks[i].time = mov->time; -mov->tracks[i].track_id = i + 1; if (mov->tracks[i].entry) build_chunks(&mov->tracks[i]); @@ -3529,7 +3577,7 @@ static void param_write_hex(AVIOContext *pb, const char *name, const uint8_t *va avio_printf(pb, "\n", name, buf); } -static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) +static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s) { int64_t pos = avio_tell(pb); int i; @@ -3552,12 +3600,13 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) avio_printf(pb, "\n"); avio_printf(pb, "\n"); avio_printf(pb, "\n"); + +mov_setup_track_ids(mov, s); + for (i = 0; i < mov->nb_streams; i++) { MOVTrack *track = &mov->tracks[i]; const char *type; -/* track->track_id is initialized in write_moov, and thus isn't known - * here yet */ -int track_id = i + 1; +int track_id = track->track_id; if (
[FFmpeg-cvslog] configure: add missing check for LoadLibrary
ffmpeg | branch: master | James Almer | Thu Sep 1 13:50:38 2016 -0300| [f66abefefecfb7fb08bf5ec6f79d8c558a043d29] | committer: James Almer configure: add missing check for LoadLibrary Commit 2b1d316ff68a3f973d8f342db6bf9755eb78ec10 made nvenc depend on LoadLibrary, but the availability of the latter was never checked. This fixes nvenc on Windows platforms Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f66abefefecfb7fb08bf5ec6f79d8c558a043d29 --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 6741f83..4bed6f2 100755 --- a/configure +++ b/configure @@ -1921,6 +1921,7 @@ SYSTEM_FUNCS=" isatty jack_port_get_latency_range kbhit +LoadLibrary localtime_r lstat lzo1x_999_compress @@ -5493,6 +5494,7 @@ check_func_headers windows.h CoTaskMemFree -lole32 check_func_headers windows.h GetProcessAffinityMask check_func_headers windows.h GetProcessTimes check_func_headers windows.h GetSystemTimeAsFileTime +check_func_headers windows.h LoadLibrary check_func_headers windows.h MapViewOfFile check_func_headers windows.h PeekNamedPipe check_func_headers windows.h SetConsoleTextAttribute ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavcodec/opus: Fix spelling in error message
ffmpeg | branch: master | Michael Graczyk | Thu Sep 1 11:24:31 2016 -0700| [5d054a1ac45248db9fd9ba4ea192147ad35aa54c] | committer: Lou Logan libavcodec/opus: Fix spelling in error message > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d054a1ac45248db9fd9ba4ea192147ad35aa54c --- libavcodec/opus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/opus.c b/libavcodec/opus.c index 703d2e8..29854fc 100644 --- a/libavcodec/opus.c +++ b/libavcodec/opus.c @@ -328,7 +328,7 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, channels = avctx->extradata ? extradata[9] : (avctx->channels == 1) ? 1 : 2; if (!channels) { -av_log(avctx, AV_LOG_ERROR, "Zero channel count specified in the extadata\n"); +av_log(avctx, AV_LOG_ERROR, "Zero channel count specified in the extradata\n"); return AVERROR_INVALIDDATA; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavu/timestamp: Avoid C++-unfriendly code in user header
ffmpeg | branch: master | Mark Thompson | Wed Aug 31 20:48:45 2016 +0100| [a2c912c3b6b833f2aacf414264c566f86f0a4e7c] | committer: Mark Thompson lavu/timestamp: Avoid C++-unfriendly code in user header Including this header in a C++11 program (inside extern "C") will throw an error because it looks like a user-defined literal. Add a space between the two tokens to avoid the problem. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2c912c3b6b833f2aacf414264c566f86f0a4e7c --- libavutil/timestamp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/timestamp.h b/libavutil/timestamp.h index f010a7e..e082f01 100644 --- a/libavutil/timestamp.h +++ b/libavutil/timestamp.h @@ -43,7 +43,7 @@ static inline char *av_ts_make_string(char *buf, int64_t ts) { if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); -else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64, ts); +else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%" PRId64, ts); return buf; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavcodec/opus: Add channel mapping 2 to extradata parser
ffmpeg | branch: master | Michael Graczyk | Thu Sep 1 11:17:30 2016 -0700| [be07c25896bb608ee84a902e6a470b87c741115b] | committer: Michael Niedermayer libavcodec/opus: Add channel mapping 2 to extradata parser This allows libavcodec/opus to demux ambisonics in an ogg/opus container. Channel mapping family 2 is being added in this standards track IETF draft: tools.ietf.org/html/draft-ietf-codec-ambisonics-00 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be07c25896bb608ee84a902e6a470b87c741115b --- libavcodec/opus.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavcodec/opus.c b/libavcodec/opus.c index 29854fc..08d94b6 100644 --- a/libavcodec/opus.c +++ b/libavcodec/opus.c @@ -347,7 +347,7 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, streams= 1; stereo_streams = channels - 1; channel_map= default_channel_map; -} else if (map_type == 1 || map_type == 255) { +} else if (map_type == 1 || map_type == 2 || map_type == 255) { if (extradata_size < 21 + channels) { av_log(avctx, AV_LOG_ERROR, "Invalid extradata size: %d\n", extradata_size); @@ -371,6 +371,15 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, } layout = ff_vorbis_channel_layouts[channels - 1]; channel_reorder = channel_reorder_vorbis; +} else if (map_type == 2) { +int ambisonic_order = ff_sqrt(channels) - 1; +if (channels != (ambisonic_order + 1) * (ambisonic_order + 1)) { +av_log(avctx, AV_LOG_ERROR, + "Channel mapping 2 is only specified for channel counts" + " which can be written as (n + 1)^2 for nonnegative integer n\n"); +return AVERROR_INVALIDDATA; +} +layout = 0; } else layout = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog