Re: [FFmpeg-devel] [PATCH] libutvideo: remove libutvideo wrapper
On Sat, Oct 18, 2014 at 3:05 PM, Michael Niedermayer michae...@gmx.at wrote: On Sat, Oct 18, 2014 at 03:30:33AM -0400, Stephen Hutchinson wrote: The wrappers also don't support the 10-bit variants of Ut Video's 4:2:2 codec, but when I last checked, the native one didn't either. where can i find a sample utvideo file with 422 10b ? I rendered one out and uploaded it as per the instructions on trac.ffmpeg.org: http://www.datafilehost.com/d/4b9fafa5 It's 5 seconds of output from the testsrc lavfi filter. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] vf_idet frame metadata
The attached patch adds the cumulative tff / bff / progressive / undetermined counts to the AVFrame metadata. The use case is to decide which deinterlacing filter to insert in an mpv lua script. From a06cf8a453139964bc7dd7c27612692a3f660b0d Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 19 Oct 2014 04:11:25 -0700 Subject: [PATCH] avfilter/vf_idet: add counts to frame metadata --- libavfilter/vf_idet.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index f8d71de..ebbc7d2 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -154,6 +154,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) { AVFilterContext *ctx = link-dst; IDETContext *idet = ctx-priv; +AVDictionary **metadata = avpriv_frame_get_metadatap(picref); if (idet-prev) av_frame_free(idet-prev); @@ -177,6 +178,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) filter(ctx); +av_dict_set_int(metadata, lavfi.idet.tff, idet-prestat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.bff, idet-prestat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.progressive, idet-prestat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.undetermined, idet-prestat[UNDETERMINED], 0); + return ff_filter_frame(ctx-outputs[0], av_frame_clone(idet-cur)); } -- 2.1.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavd: export all symbols with av prefix
Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavdevice/libavdevice.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/libavdevice.v b/libavdevice/libavdevice.v index 663af85..d7c86ba 100644 --- a/libavdevice/libavdevice.v +++ b/libavdevice/libavdevice.v @@ -1,4 +1,4 @@ LIBAVDEVICE_$MAJOR { -global: avdevice_*; +global: av*; local: *; }; -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: Add support for color_trc/color_pri/chroma_loc
On date Friday 2014-10-10 05:29:00 +0200, Michael Niedermayer encoded: Idea from: a2c00d22e71d13b72828147be86aa9e961c6cae6 Signed-off-by: Michael Niedermayer michae...@gmx.at --- doc/ffprobe.xsd|3 +++ ffprobe.c | 16 tests/ref/fate/ffprobe_compact |4 ++-- tests/ref/fate/ffprobe_csv |4 ++-- tests/ref/fate/ffprobe_default |6 ++ tests/ref/fate/ffprobe_flat|6 ++ tests/ref/fate/ffprobe_ini |6 ++ 7 files changed, 41 insertions(+), 4 deletions(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 84b3810..2cbb9c2 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -167,6 +167,9 @@ xsd:attribute name=leveltype=xsd:int/ xsd:attribute name=color_range type=xsd:string/ xsd:attribute name=color_space type=xsd:string/ + xsd:attribute name=color_trctype=xsd:string/ + xsd:attribute name=color_pritype=xsd:string/ + xsd:attribute name=chroma_loc type=xsd:string/ xsd:attribute name=timecode type=xsd:string/ !-- audio attributes -- diff --git a/ffprobe.c b/ffprobe.c index 304ec8e..df10493 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2118,6 +2118,22 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id s = av_get_colorspace_name(dec_ctx-colorspace); if (s) print_str(color_space, s); else print_str_opt(color_space, unknown); + +if (dec_ctx-color_trc != AVCOL_TRC_UNSPECIFIED) +print_str(color_trc, av_color_transfer_name(dec_ctx-color_trc)); +else +print_str_opt(color_trc, av_color_transfer_name(dec_ctx-color_trc)); + +if (dec_ctx-color_primaries != AVCOL_PRI_UNSPECIFIED) +print_str(color_pri, av_color_primaries_name(dec_ctx-color_primaries)); +else +print_str_opt(color_pri, av_color_primaries_name(dec_ctx-color_primaries)); + +if (dec_ctx-chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED) +print_str(chroma_loc, av_chroma_location_name(dec_ctx-chroma_sample_location)); +else +print_str_opt(chroma_loc, av_chroma_location_name(dec_ctx-chroma_sample_location)); Alternatively, more descriptive names (color_transfer, color_primaries, chroma_location). + if (dec_ctx-timecode_frame_start = 0) { char tcbuf[AV_TIMECODE_STR_SIZE]; av_timecode_make_mpeg_tc_string(tcbuf, dec_ctx-timecode_frame_start); diff --git a/tests/ref/fate/ffprobe_compact b/tests/ref/fate/ffprobe_compact index 3db868d..cc34011 100644 --- a/tests/ref/fate/ffprobe_compact +++ b/tests/ref/fate/ffprobe_compact @@ -27,6 +27,6 @@ frame|media_type=video|key_frame=1|pkt_pts=6144|pkt_pts_time=0.12|pkt_dts=61 packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.12|dts=6144|dts_time=0.12|duration=2048|duration_time=0.04|convergence_duration=N/A|convergence_duration_time=N/A|size=3|pos=1024801|flags=K frame|media_type=video|key_frame=1|pkt_pts=6144|pkt_pts_time=0.12|pkt_dts=6144|pkt_dts_time=0.12|best_effort_timestamp=6144|best_effort_timestamp_time=0.12|pkt_duration=2048|pkt_duration_time=0.04|pkt_pos=1024801|pkt_size=3|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0 stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.00|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le
[FFmpeg-devel] [PATCH] rtmpproto: Don't mistake app for playpath.
App is always first in the url path. This commit fixes the case when URL is provides as rtmp://server[:port]/app and playpath is declared in AVOption. Signed-off-by: Kacper Michajłow kaspe...@gmail.com --- libavformat/rtmpproto.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 286e9e8..36dbfcf 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2594,7 +2594,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) { RTMPContext *rt = s-priv_data; char proto[8], hostname[256], path[1024], auth[100], *fname; -char *old_app, *qmark, fname_buffer[1024]; +char *old_app, *qmark, *n, fname_buffer[1024]; uint8_t buf[2048]; int port; AVDictionary *opts = NULL; @@ -2609,11 +2609,13 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) hostname, sizeof(hostname), port, path, sizeof(path), s-filename); -if (strchr(path, ' ')) { +n = strchr(path, ' '); +if (n) { av_log(s, AV_LOG_WARNING, Detected librtmp style URL parameters, these aren't supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.\n); +*n = '\0'; // Trim not supported part } if (auth[0]) { @@ -2712,8 +2714,8 @@ reconnect: char *next = *path ? path + 1 : path; char *p = strchr(next, '/'); if (!p) { -fname = next; -rt-app[0] = '\0'; +fname = NULL; +av_strlcpy(rt-app, next, APP_MAX_LENGTH); } else { // make sure we do not mismatch a playpath for an application instance char *c = strchr(p + 1, ':'); @@ -2739,24 +2741,27 @@ reconnect: } if (!rt-playpath) { -int len = strlen(fname); - rt-playpath = av_malloc(PLAYPATH_MAX_LENGTH); if (!rt-playpath) { ret = AVERROR(ENOMEM); goto fail; } -if (!strchr(fname, ':') len = 4 -(!strcmp(fname + len - 4, .f4v) || - !strcmp(fname + len - 4, .mp4))) { -memcpy(rt-playpath, mp4:, 5); +if (fname) { +int len = strlen(fname); +if (!strchr(fname, ':') len = 4 +(!strcmp(fname + len - 4, .f4v) || + !strcmp(fname + len - 4, .mp4))) { +memcpy(rt-playpath, mp4:, 5); +} else { +if (len = 4 !strcmp(fname + len - 4, .flv)) +fname[len - 4] = '\0'; +rt-playpath[0] = 0; +} +av_strlcat(rt-playpath, fname, PLAYPATH_MAX_LENGTH); } else { -if (len = 4 !strcmp(fname + len - 4, .flv)) -fname[len - 4] = '\0'; -rt-playpath[0] = 0; +rt-playpath[0] = '\0'; } -av_strlcat(rt-playpath, fname, PLAYPATH_MAX_LENGTH); } if (!rt-tcurl) { -- 2.1.1.308.gd29e9c8 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/libutvideodec: Support YUV422P10
Based on ConvertToPlanar() from libutvideo libutvideo sadly does not seem to support exporting its internal planar buffers Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libutvideodec.cpp | 55 +- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp index 36dc952..f76a53a 100644 --- a/libavcodec/libutvideodec.cpp +++ b/libavcodec/libutvideodec.cpp @@ -39,7 +39,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx) int format; int begin_ret; -if (avctx-extradata_size != 4*4) { +if (avctx-extradata_size != 16 avctx-extradata_size != 8 ) { av_log(avctx, AV_LOG_ERROR, Extradata size (%d) mismatch.\n, avctx-extradata_size); return -1; } @@ -80,6 +80,12 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx) avctx-pix_fmt = AV_PIX_FMT_RGB32; format = UTVF_NFCC_BGRA_BU; break; +#ifdef UTVF_UQY2 +case MKTAG('U', 'Q', 'Y', '2'): +avctx-pix_fmt = AV_PIX_FMT_YUV422P10; +format = UTVF_v210; +break; +#endif default: av_log(avctx, AV_LOG_ERROR, Not a Ut Video FOURCC: %X\n, avctx-codec_tag); @@ -88,6 +94,8 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx) /* Only allocate the buffer once */ utv-buf_size = avpicture_get_size(avctx-pix_fmt, avctx-width, avctx-height); +if (format == UTVF_v210) +utv-buf_size += avctx-height * ((avctx-width + 47) / 48) * 128; utv-buffer = (uint8_t *)av_malloc(utv-buf_size * sizeof(uint8_t)); if (utv-buffer == NULL) { @@ -155,6 +163,51 @@ static int utvideo_decode_frame(AVCodecContext *avctx, void *data, pic-linesize[0] = w * 2; pic-data[0] = utv-buffer; break; +case AV_PIX_FMT_YUV422P10: { +uint16_t *y, *u, *v; +int i,j; +int linesize = ((w + 47) / 48) * 128; + +pic-linesize[0] = w * 2; +pic-linesize[1] = +pic-linesize[2] = w; +pic-data[0] = utv-buffer + linesize * h; +pic-data[1] = pic-data[0] + h*pic-linesize[0]; +pic-data[2] = pic-data[1] + h*pic-linesize[1]; +y = (uint16_t*)pic-data[0]; +u = (uint16_t*)pic-data[1]; +v = (uint16_t*)pic-data[2]; +for (j = 0; j h; j++) { +const uint8_t *in = utv-buffer + j * linesize; + +for (i = 0; i + 1 w; i += 6, in += 4) { +*u++ = (AV_RL32(in+0)) 0x3FF; +*y++ = (AV_RL32(in+0)10) 0x3FF; +*v++ = (AV_RL32(in+0)20) 0x3FF; +*y++ = (AV_RL32(in+4)) 0x3FF; +in += 4; + +if (i + 3 = w) +break; + +*u++ = (AV_RL32(in+0)10) 0x3FF; +*y++ = (AV_RL32(in+0)20) 0x3FF; +*v++ = (AV_RL32(in+4)) 0x3FF; +*y++ = (AV_RL32(in+4)10) 0x3FF; +in += 4; + +if (i + 5 = w) +break; + +*u++ = (AV_RL32(in+0)20) 0x3FF; +*y++ = (AV_RL32(in+4)) 0x3FF; +*v++ = (AV_RL32(in+4)10) 0x3FF; +*y++ = (AV_RL32(in+4)20) 0x3FF; +in += 4; +} +} +break; +} case AV_PIX_FMT_BGR24: case AV_PIX_FMT_RGB32: /* Make the linesize negative, since Ut Video uses bottom-up BGR */ -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/libutvideodec: print extradata size if unsupported
Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/libutvideodec.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp index 60dbd15..36dc952 100644 --- a/libavcodec/libutvideodec.cpp +++ b/libavcodec/libutvideodec.cpp @@ -40,7 +40,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx) int begin_ret; if (avctx-extradata_size != 4*4) { -av_log(avctx, AV_LOG_ERROR, Extradata size mismatch.\n); +av_log(avctx, AV_LOG_ERROR, Extradata size (%d) mismatch.\n, avctx-extradata_size); return -1; } -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] rtmpproto: Don't mistake app for playpath.
On Sun, Oct 19, 2014 at 02:12:14PM +0200, Kacper Michajłow wrote: App is always first in the url path. This commit fixes the case when URL is provides as rtmp://server[:port]/app and playpath is declared in AVOption. Signed-off-by: Kacper Michajłow kaspe...@gmail.com --- libavformat/rtmpproto.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 286e9e8..36dbfcf 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2594,7 +2594,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) { RTMPContext *rt = s-priv_data; char proto[8], hostname[256], path[1024], auth[100], *fname; -char *old_app, *qmark, fname_buffer[1024]; +char *old_app, *qmark, *n, fname_buffer[1024]; uint8_t buf[2048]; int port; AVDictionary *opts = NULL; @@ -2609,11 +2609,13 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) hostname, sizeof(hostname), port, path, sizeof(path), s-filename); -if (strchr(path, ' ')) { +n = strchr(path, ' '); +if (n) { av_log(s, AV_LOG_WARNING, Detected librtmp style URL parameters, these aren't supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.\n); +*n = '\0'; // Trim not supported part } if (auth[0]) { @@ -2712,8 +2714,8 @@ reconnect: char *next = *path ? path + 1 : path; char *p = strchr(next, '/'); if (!p) { -fname = next; -rt-app[0] = '\0'; +fname = NULL; +av_strlcpy(rt-app, next, APP_MAX_LENGTH); } else { // make sure we do not mismatch a playpath for an application instance char *c = strchr(p + 1, ':'); this breaks urls like: -rtmp_app myapp -rtmp_live 0 -i rtmp://11.22.33.44/foo [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB DNS cache poisoning attacks, popular search engine, Google internet authority dont be evil, please signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] tiffenc: properly compute packet size
Hi, the attached patch fixes part of ticket #3874, for the part ffmpeg's encoder is responsible for. The remainder of the issue is decoders not correctly handling unusual chroma subsamplings. Note: I have kept the computation from the width in raw bytes as I suspect this can be the worst case for lzw code expansion. -- Christophe From 9ec9a913fbfc6238de915c360df2324c309636fb Mon Sep 17 00:00:00 2001 From: Christophe Gisquet christophe.gisq...@gmail.com Date: Sun, 12 Oct 2014 21:10:54 +0200 Subject: [PATCH] tiffenc: properly compute packet size The bytes per row is a better indication of it. Helps resolving ticket #3874 by fixing ffmpeg's encoder and transforming the issue in a issue with non-compliant decoders. ffmpeg's one is ok, but unfortunately, many aren't handling correctling unusual chroma samplings. --- libavcodec/tiffenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 5a61f1a..138d214 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -305,7 +305,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, strips = (s-height - 1) / s-rps + 1; -packet_size = avctx-height * ((avctx-width * s-bpp + 7) 3) * 2 + +bytes_per_row = (((s-width - 1) / s-subsampling[0] + 1) * s-bpp * + s-subsampling[0] * s-subsampling[1] + 7) 3; +packet_size = avctx-height * bytes_per_row * 2 + avctx-height * 4 + FF_MIN_BUFFER_SIZE; if ((ret = ff_alloc_packet2(avctx, pkt, packet_size)) 0) @@ -333,8 +335,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, goto fail; } -bytes_per_row = (((s-width - 1) / s-subsampling[0] + 1) * s-bpp * - s-subsampling[0] * s-subsampling[1] + 7) 3; if (is_yuv) { av_fast_padded_malloc(s-yuv_line, s-yuv_line_size, bytes_per_row); if (s-yuv_line == NULL) { -- 1.9.2.msysgit.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] rtmpproto: Don't mistake app for playpath.
2014-10-19 16:40 GMT+02:00 Michael Niedermayer michae...@gmx.at: On Sun, Oct 19, 2014 at 02:12:14PM +0200, Kacper Michajłow wrote: App is always first in the url path. This commit fixes the case when URL is provides as rtmp://server[:port]/app and playpath is declared in AVOption. Signed-off-by: Kacper Michajłow kaspe...@gmail.com --- libavformat/rtmpproto.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 286e9e8..36dbfcf 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2594,7 +2594,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) { RTMPContext *rt = s-priv_data; char proto[8], hostname[256], path[1024], auth[100], *fname; -char *old_app, *qmark, fname_buffer[1024]; +char *old_app, *qmark, *n, fname_buffer[1024]; uint8_t buf[2048]; int port; AVDictionary *opts = NULL; @@ -2609,11 +2609,13 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) hostname, sizeof(hostname), port, path, sizeof(path), s-filename); -if (strchr(path, ' ')) { +n = strchr(path, ' '); +if (n) { av_log(s, AV_LOG_WARNING, Detected librtmp style URL parameters, these aren't supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.\n); +*n = '\0'; // Trim not supported part } if (auth[0]) { @@ -2712,8 +2714,8 @@ reconnect: char *next = *path ? path + 1 : path; char *p = strchr(next, '/'); if (!p) { -fname = next; -rt-app[0] = '\0'; +fname = NULL; +av_strlcpy(rt-app, next, APP_MAX_LENGTH); } else { // make sure we do not mismatch a playpath for an application instance char *c = strchr(p + 1, ':'); this breaks urls like: -rtmp_app myapp -rtmp_live 0 -i rtmp://11.22.33.44/foo Indeed. It is little bizarre to me to use url with playpath, but without app name. It feels inconsistent to have rtmp://server/app/playpath url syntax and allow to cut middle part. I will send a path in a sec which will take this into account and assume that app part is missing when user already provided it. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ffprobe: Add support for color_trc/color_pri/chroma_loc
On Sun, Oct 19, 2014 at 01:40:38PM +0200, Stefano Sabatini wrote: On date Friday 2014-10-10 05:29:00 +0200, Michael Niedermayer encoded: Idea from: a2c00d22e71d13b72828147be86aa9e961c6cae6 Signed-off-by: Michael Niedermayer michae...@gmx.at --- doc/ffprobe.xsd|3 +++ ffprobe.c | 16 tests/ref/fate/ffprobe_compact |4 ++-- tests/ref/fate/ffprobe_csv |4 ++-- tests/ref/fate/ffprobe_default |6 ++ tests/ref/fate/ffprobe_flat|6 ++ tests/ref/fate/ffprobe_ini |6 ++ 7 files changed, 41 insertions(+), 4 deletions(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 84b3810..2cbb9c2 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -167,6 +167,9 @@ xsd:attribute name=leveltype=xsd:int/ xsd:attribute name=color_range type=xsd:string/ xsd:attribute name=color_space type=xsd:string/ + xsd:attribute name=color_trctype=xsd:string/ + xsd:attribute name=color_pritype=xsd:string/ + xsd:attribute name=chroma_loc type=xsd:string/ xsd:attribute name=timecode type=xsd:string/ !-- audio attributes -- diff --git a/ffprobe.c b/ffprobe.c index 304ec8e..df10493 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -2118,6 +2118,22 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id s = av_get_colorspace_name(dec_ctx-colorspace); if (s) print_str(color_space, s); else print_str_opt(color_space, unknown); + +if (dec_ctx-color_trc != AVCOL_TRC_UNSPECIFIED) +print_str(color_trc, av_color_transfer_name(dec_ctx-color_trc)); +else +print_str_opt(color_trc, av_color_transfer_name(dec_ctx-color_trc)); + +if (dec_ctx-color_primaries != AVCOL_PRI_UNSPECIFIED) +print_str(color_pri, av_color_primaries_name(dec_ctx-color_primaries)); +else +print_str_opt(color_pri, av_color_primaries_name(dec_ctx-color_primaries)); + +if (dec_ctx-chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED) +print_str(chroma_loc, av_chroma_location_name(dec_ctx-chroma_sample_location)); +else +print_str_opt(chroma_loc, av_chroma_location_name(dec_ctx-chroma_sample_location)); Alternatively, more descriptive names (color_transfer, color_primaries, chroma_location). changed, applied [...] @@ -552,6 +555,9 @@ streams.stream.2.pix_fmt=rgb24 streams.stream.2.level=-99 streams.stream.2.color_range=N/A streams.stream.2.color_space=unknown +streams.stream.2.color_trc=unknown +streams.stream.2.color_pri=unknown +streams.stream.2.chroma_loc=unspecified LGTM even if I don't know why there is no consistency between enum names and strings. iam not opposed to change them if people think changing them is a good idea ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/makefile: prevent from installing disabled headers.
On Mon, Oct 20, 2014 at 05:53:05AM +1100, Matt Oliver wrote: This stops headers based on disabled functionality from being installed. Things like VDA and VDPAU dont work on windows etc. So any attempt to use these headers will result in compilation errors so best not to install them to avoid confusion. Also no point having a header for functionality that wasnt built into the libs. So exclude headers if they cannot be used. Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) 4532d3d0c3c6f4283a4d04e79d6f892950f29e2e 0001-libavcodec-makefile-prevent-from-installing-disabled.patch From 1e0e9bde9f0785d129fa31436d20e74532704c9c Mon Sep 17 00:00:00 2001 From: Matthew Oliver protogo...@gmail.com Date: Mon, 20 Oct 2014 05:51:58 +1100 Subject: [PATCH] libavcodec/makefile: prevent from installing disabled headers. this might make sense but it breaks API as a unconditional #include would break, thus if this is done it should only happen when major versions are bumped [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB it is not once nor twice but times without number that the same ideas make their appearance in the world. -- Aristotle 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/5] Introduce new error codes for 4XX and 5XX replies from remote servers
On Sat, Oct 18, 2014 at 12:23:59AM +0400, Andrey Utkin wrote: --- libavutil/error.c | 6 ++ libavutil/error.h | 7 +++ 2 files changed, 13 insertions(+) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] add both single and mutiple frame detection metadata in vf_idet
Thanks for the quick merge. Unfortunately, i realized i only added the metadata for single frame detection. This patch adds both single and multiple frame detection. From 61bd64c4c408c6842e5599fdaed9a4353696c337 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 19 Oct 2014 13:32:56 -0700 Subject: [PATCH] avfilter/vf_idet: add both multiple and single frame detection metadata --- libavfilter/vf_idet.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index ebbc7d2..8a842a1 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -178,10 +178,15 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) filter(ctx); -av_dict_set_int(metadata, lavfi.idet.tff, idet-prestat[TFF], 0); -av_dict_set_int(metadata, lavfi.idet.bff, idet-prestat[BFF], 0); -av_dict_set_int(metadata, lavfi.idet.progressive, idet-prestat[PROGRESSIVE], 0); -av_dict_set_int(metadata, lavfi.idet.undetermined, idet-prestat[UNDETERMINED], 0); +av_dict_set_int(metadata, lavfi.idet.single_tff, idet-prestat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.single_bff, idet-prestat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.single.progressive, idet-prestat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.single.undetermined, idet-prestat[UNDETERMINED], 0); + +av_dict_set_int(metadata, lavfi.idet.multiple.tff, idet-poststat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.bff, idet-poststat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.progressive, idet-poststat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.undetermined, idet-poststat[UNDETERMINED], 0); return ff_filter_frame(ctx-outputs[0], av_frame_clone(idet-cur)); } -- 2.1.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] add both single and mutiple frame detection metadata in vf_idet
On Sun, Oct 19, 2014 at 02:34:40PM -0700, Kevin Mitchell wrote: Doh. Not having a good day. Use consistent metadata tags. On Sun, Oct 19, 2014 at 1:37 PM, Kevin Mitchell kevmi...@gmail.com wrote: Thanks for the quick merge. Unfortunately, i realized i only added the metadata for single frame detection. This patch adds both single and multiple frame detection. From 36235c82dee67b568aacee919f5b357102c0e2f6 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 19 Oct 2014 13:32:56 -0700 Subject: [PATCH] avfilter/vf_idet: add both multiple and single frame detection metadata --- libavfilter/vf_idet.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index ebbc7d2..339f4a6 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -178,10 +178,15 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) filter(ctx); -av_dict_set_int(metadata, lavfi.idet.tff, idet-prestat[TFF], 0); -av_dict_set_int(metadata, lavfi.idet.bff, idet-prestat[BFF], 0); -av_dict_set_int(metadata, lavfi.idet.progressive, idet-prestat[PROGRESSIVE], 0); -av_dict_set_int(metadata, lavfi.idet.undetermined, idet-prestat[UNDETERMINED], 0); +av_dict_set_int(metadata, lavfi.idet.single.tff, idet-prestat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.single.bff, idet-prestat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.single.progressive, idet-prestat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.single.undetermined, idet-prestat[UNDETERMINED], 0); + +av_dict_set_int(metadata, lavfi.idet.multiple.tff, idet-poststat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.bff, idet-poststat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.progressive, idet-poststat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.undetermined, idet-poststat[UNDETERMINED], 0); Can you bump minor avfilter version this time? And complete documentation, please. [...] -- Clément B. pgpbNBFUTX_OZ.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] mxfdec: minor simplification.
On Sat, 2014-10-18 at 15:26 +0200, Reimar Döffinger wrote: Signed-off-by: Reimar Döffinger reimar.doeffin...@gmx.de --- libavformat/mxfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 9306cc6..f916d01 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -2442,7 +2442,7 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt) pkt-stream_index = index; pkt-pos = klv.offset; -codec = s-streams[index]-codec; +codec = st-codec; if (codec-codec_type == AVMEDIA_TYPE_VIDEO next_ofs = 0) { /* mxf-current_edit_unit good - see if we have an OK signature.asc Description: This is a digitally signed message part ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] add both single and mutiple frame detection metadata in vf_idet
I've bumped the minor (not micro) version. I hope that's what was wanted. I also added the requested documentation of the metadata fields. Sorry I guess I was following the bad convention that most of the filter metadata isn't documented. On Sun, Oct 19, 2014 at 2:38 PM, Clément Bœsch u...@pkh.me wrote: On Sun, Oct 19, 2014 at 02:34:40PM -0700, Kevin Mitchell wrote: Doh. Not having a good day. Use consistent metadata tags. On Sun, Oct 19, 2014 at 1:37 PM, Kevin Mitchell kevmi...@gmail.com wrote: Thanks for the quick merge. Unfortunately, i realized i only added the metadata for single frame detection. This patch adds both single and multiple frame detection. From 36235c82dee67b568aacee919f5b357102c0e2f6 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 19 Oct 2014 13:32:56 -0700 Subject: [PATCH] avfilter/vf_idet: add both multiple and single frame detection metadata --- libavfilter/vf_idet.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index ebbc7d2..339f4a6 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -178,10 +178,15 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) filter(ctx); -av_dict_set_int(metadata, lavfi.idet.tff, idet-prestat[TFF], 0); -av_dict_set_int(metadata, lavfi.idet.bff, idet-prestat[BFF], 0); -av_dict_set_int(metadata, lavfi.idet.progressive, idet-prestat[PROGRESSIVE], 0); -av_dict_set_int(metadata, lavfi.idet.undetermined, idet-prestat[UNDETERMINED], 0); +av_dict_set_int(metadata, lavfi.idet.single.tff, idet-prestat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.single.bff, idet-prestat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.single.progressive, idet-prestat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.single.undetermined, idet-prestat[UNDETERMINED], 0); + +av_dict_set_int(metadata, lavfi.idet.multiple.tff, idet-poststat[TFF], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.bff, idet-poststat[BFF], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.progressive, idet-poststat[PROGRESSIVE], 0); +av_dict_set_int(metadata, lavfi.idet.multiple.undetermined, idet-poststat[UNDETERMINED], 0); Can you bump minor avfilter version this time? And complete documentation, please. [...] -- Clément B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel From 4bee6ec641d09fd9454b2ae9f1e40cc8352c4208 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell kevmi...@gmail.com Date: Sun, 19 Oct 2014 13:32:56 -0700 Subject: [PATCH] avfilter/vf_idet: add both multiple and single frame detection metadata --- doc/filters.texi | 28 libavfilter/version.h | 2 +- libavfilter/vf_idet.c | 13 + 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index c612052..c70ddf3 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5573,6 +5573,34 @@ Detect video interlacing type. This filter tries to detect if the input is interlaced or progressive, top or bottom field first. +The filter will log these metadata values: + +@table @option +@item single.tff +Cumulative number of frames detected as top field first using single-frame detection. + +@item multiple.tff +Cumulative number of frames detected as top field first using multiple-frame detection. + +@item single.bff +Cumulative number of frames detected as bottom field first using single-frame detection. + +@item multiple.bff +Cumulative number of frames detected as bottom field first using multiple-frame detection. + +@item single.progressive +Cumulative number of frames detected as progressive using single-frame detection. + +@item multiple.progressive +Cumulative number of frames detected as progressive using multiple-frame detection. + +@item single.undetermined +Cumulative number of frames that could not be classified using single-frame detection. + +@item multiple.undetermined +Cumulative number of frames that could not be classified using multiple-frame detection. +@end table + The filter accepts the following options: @table @option diff --git a/libavfilter/version.h b/libavfilter/version.h index 5d97f65..7dcdad6 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include libavutil/version.h #define LIBAVFILTER_VERSION_MAJOR 5 -#define LIBAVFILTER_VERSION_MINOR 1 +#define LIBAVFILTER_VERSION_MINOR 2 #define LIBAVFILTER_VERSION_MICRO 106 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index ebbc7d2..339f4a6 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -178,10 +178,15 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
Re: [FFmpeg-devel] [PATCH] matroskadec: execute seekheads recursively
On Oct 17, 2014, at 17:40, Michael Niedermayer michae...@gmx.at wrote: On Fri, Oct 17, 2014 at 03:27:49PM +0200, Michael Niedermayer wrote: On Fri, Oct 17, 2014 at 01:55:35AM -0500, Rodger Combs wrote: On Oct 17, 2014, at 01:52, Rodger Combs rodger.co...@gmail.com wrote: On Oct 17, 2014, at 01:16, Rodger Combs rodger.co...@gmail.com mailto:rodger.co...@gmail.com wrote: This fixes https://trac.ffmpeg.org/ticket/3934 https://trac.ffmpeg.org/ticket/3934, but I'm not sure if there was a good reason for this to be here to begin with. Perhaps a protection against infinite recursion (though I believe EBML_MAX_DEPTH serves that purpose to some degree)? 0001-matroskadec-execute-seekheads-recursively.patch Evidently either I or my mail client screwed up and the patch didn't get attached. Whoops. 0001-matroskadec-execute-seekheads-recursively.patch Let's try that again... Welp, apparently my email client's borked badly in some way. Here's a gist link instead: https://gist.github.com/08f111e72b8b5ddba078 copy and pasted so our archives dont depend on external links as well as for easy revieweing From 4cf14a9d117da69b64c267e6f982931cfa60a300 Mon Sep 17 00:00:00 2001 From: Rodger Combs rodger.co...@gmail.com Date: Fri, 17 Oct 2014 00:35:12 -0500 Subject: [PATCH] matroskadec: execute seekheads recursively Fixes https://trac.ffmpeg.org/ticket/3934 --- libavformat/matroskadec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b742319..b437e74 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1368,7 +1368,6 @@ static int matroska_parse_seekhead_entry(MatroskaDemuxContext *matroska, int ret = 0; if (idx = seekhead_list-nb_elem|| -seekhead[idx].id == MATROSKA_ID_SEEKHEAD || seekhead[idx].id == MATROSKA_ID_CLUSTER) return 0; ebml_parse() that gets called as a result of this change does not succeed and causes the one and only seekhead entry to return failure so i think this doesnt execute seekheads recursively [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org mailto:ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Just stepped through this; I also see ebml_parse() failing with the clip I originally uploaded, but not with the original source file, which I've uploaded to Dropbox: https://www.dropbox.com/s/32ve4hp567ukikt/Maken-Ki%21%20-%20S01E02.mkv?dl=0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] v4l2: Make use of the VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD
Make use of the V4L2 VIDIOC_ENUM_FRAMESIZES ioctl on OpenBSD. diff --git a/configure b/configure index 5b16af9..790a5eb 100755 --- a/configure +++ b/configure @@ -4967,6 +4967,7 @@ check_header linux/videodev2.h check_code cc linux/videodev2.h struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0; enable_safe struct_v4l2_frmivalenum_discrete check_header sys/videoio.h +check_code cc sys/videoio.h struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0; enable_safe struct_v4l2_frmivalenum_discrete check_func_headers windows.h vfw.h capCreateCaptureWindow $vfwcap_indev_extralibs # check that WM_CAP_DRIVER_CONNECT is defined to the proper value -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel