Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support
On 6/26/16, Carl Eugen Hoyos wrote: > Muhammad Faiz gmail.com> writes: > >> I think it's not because of bit-exact problem. >> But because fate probes supported formats (with >> libavfilter/tests/filtfmts) >> On BE machine, code with native formats will generate error >> because fate-ref contains yuv*le entries but fate expects yuv*be > > We control the fate test, so we can require an additional > (bit-exact) conversion from BE to LE to make the fate > test pass. Really, even for pixfmts? I will apply this as is. Feel free to add your hacks if you want, after. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avfilter/dualinput: Add support to skip initial unpaired frames
On 6/26/16, Michael Niedermayer wrote: > On Sat, Jun 25, 2016 at 12:43:35AM +0200, Michael Niedermayer wrote: >> Signed-off-by: Michael Niedermayer >> --- >> libavfilter/dualinput.c |3 +++ >> libavfilter/dualinput.h |1 + >> 2 files changed, 4 insertions(+) > > applied > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > It is what and why we do it that matters, not just one of them. > You could wait for Nicolas reply. Now I can commmit my own patches after 5 minutes nobody replied, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support
On Sun, Jun 26, 2016 at 9:30 AM, Paul B Mahol wrote: > On 6/26/16, Carl Eugen Hoyos wrote: >> Muhammad Faiz gmail.com> writes: >> >>> I think it's not because of bit-exact problem. >>> But because fate probes supported formats (with >>> libavfilter/tests/filtfmts) >>> On BE machine, code with native formats will generate error >>> because fate-ref contains yuv*le entries but fate expects yuv*be >> >> We control the fate test, so we can require an additional >> (bit-exact) conversion from BE to LE to make the fate >> test pass. > > Really, even for pixfmts? > > I will apply this as is. Feel free to add your hacks if you want, after. You force a conversion before your filter now for everyone on BE, the alternative is to make fate force a conversion after your filter and only for fate (same conversion, just at a different point in the filter graph) Most high-bitdepth tests already do this, simply by requesting a defined pixfmt in the fate test. Clearly less forced conversions is better? - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support
On Sun, Jun 26, 2016 at 2:30 PM, Paul B Mahol wrote: > On 6/26/16, Carl Eugen Hoyos wrote: >> Muhammad Faiz gmail.com> writes: >> >>> I think it's not because of bit-exact problem. >>> But because fate probes supported formats (with >>> libavfilter/tests/filtfmts) >>> On BE machine, code with native formats will generate error >>> because fate-ref contains yuv*le entries but fate expects yuv*be Another problem is that drawutils only support LE format. >> >> We control the fate test, so we can require an additional >> (bit-exact) conversion from BE to LE to make the fate >> test pass. > > Really, even for pixfmts? > > I will apply this as is. Feel free to add your hacks if you want, after. In the perspective of code correctness, this should be OK. But performance on BE machine will be unoptimal because: - reading/writing in foreign endian is probably slower - I guess most decoders' output frame is native endian. This will make unnecessary format conversion - some other filters only support native endian formats. This will also make unnecessary format conversion. Of course, the problem is not in your patch. Thank's ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avfilter/dualinput: Add support to skip initial unpaired frames
On Sun, Jun 26, 2016 at 09:31:33AM +0200, Paul B Mahol wrote: > On 6/26/16, Michael Niedermayer wrote: > > On Sat, Jun 25, 2016 at 12:43:35AM +0200, Michael Niedermayer wrote: > >> Signed-off-by: Michael Niedermayer > >> --- > >> libavfilter/dualinput.c |3 +++ > >> libavfilter/dualinput.h |1 + > >> 2 files changed, 4 insertions(+) > > > > applied > > > > [...] > > -- > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > > > It is what and why we do it that matters, not just one of them. > > > > You could wait for Nicolas reply. I waited 24h, and this fixes a crash in the upcoming release should i revert the 2 patches ? > > Now I can commmit my own patches after 5 minutes nobody replied, thanks. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- 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
Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support
On 6/26/16, Muhammad Faiz wrote: > On Sun, Jun 26, 2016 at 2:30 PM, Paul B Mahol wrote: >> On 6/26/16, Carl Eugen Hoyos wrote: >>> Muhammad Faiz gmail.com> writes: >>> I think it's not because of bit-exact problem. But because fate probes supported formats (with libavfilter/tests/filtfmts) On BE machine, code with native formats will generate error because fate-ref contains yuv*le entries but fate expects yuv*be > > Another problem is that drawutils only support LE format. > >>> >>> We control the fate test, so we can require an additional >>> (bit-exact) conversion from BE to LE to make the fate >>> test pass. >> >> Really, even for pixfmts? >> >> I will apply this as is. Feel free to add your hacks if you want, after. > > In the perspective of code correctness, this should be OK. > But performance on BE machine will be unoptimal because: > - reading/writing in foreign endian is probably slower > - I guess most decoders' output frame is native endian. This will >make unnecessary format conversion > - some other filters only support native endian formats. This will >also make unnecessary format conversion. > > Of course, the problem is not in your patch. Yes. BE is dead. > > Thank's > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avfilter/dualinput: Add support to skip initial unpaired frames
On 6/26/16, Michael Niedermayer wrote: > On Sun, Jun 26, 2016 at 09:31:33AM +0200, Paul B Mahol wrote: >> On 6/26/16, Michael Niedermayer wrote: >> > On Sat, Jun 25, 2016 at 12:43:35AM +0200, Michael Niedermayer wrote: >> >> Signed-off-by: Michael Niedermayer >> >> --- >> >> libavfilter/dualinput.c |3 +++ >> >> libavfilter/dualinput.h |1 + >> >> 2 files changed, 4 insertions(+) >> > >> > applied >> > >> > [...] >> > -- >> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB >> > >> > It is what and why we do it that matters, not just one of them. >> > >> >> You could wait for Nicolas reply. > > I waited 24h, and this fixes a crash in the upcoming release > should i revert the 2 patches ? Then why that is not mentioned in the commit log? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avfilter/dualinput: Add support to skip initial unpaired frames
On Sun, Jun 26, 2016 at 10:23:35AM +0200, Paul B Mahol wrote: > On 6/26/16, Michael Niedermayer wrote: > > On Sun, Jun 26, 2016 at 09:31:33AM +0200, Paul B Mahol wrote: > >> On 6/26/16, Michael Niedermayer wrote: > >> > On Sat, Jun 25, 2016 at 12:43:35AM +0200, Michael Niedermayer wrote: > >> >> Signed-off-by: Michael Niedermayer > >> >> --- > >> >> libavfilter/dualinput.c |3 +++ > >> >> libavfilter/dualinput.h |1 + > >> >> 2 files changed, 4 insertions(+) > >> > > >> > applied > >> > > >> > [...] > >> > -- > >> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > >> > > >> > It is what and why we do it that matters, not just one of them. > >> > > >> > >> You could wait for Nicolas reply. > > > > I waited 24h, and this fixes a crash in the upcoming release > > should i revert the 2 patches ? > > Then why that is not mentioned in the commit log? Its mentioned in the other patch of this 2 patch series, which depends on this one -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope 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/8] avdevice/decklink_dec: fix bitrate calculations
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_dec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 1c305f3..3b5d4be 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -563,15 +563,16 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) st->time_base.den = ctx->bmd_tb_den; st->time_base.num = ctx->bmd_tb_num; -st->codecpar->bit_rate= av_image_get_buffer_size((AVPixelFormat)st->codecpar->format, ctx->bmd_width, ctx->bmd_height, 1) * 1/av_q2d(st->time_base) * 8; if (cctx->v210) { st->codecpar->codec_id= AV_CODEC_ID_V210; st->codecpar->codec_tag = MKTAG('V', '2', '1', '0'); +st->codecpar->bit_rate= av_rescale(ctx->bmd_width * ctx->bmd_height * 64, st->time_base.den, st->time_base.num * 3); } else { st->codecpar->codec_id= AV_CODEC_ID_RAWVIDEO; st->codecpar->format = AV_PIX_FMT_UYVY422; st->codecpar->codec_tag = MKTAG('U', 'Y', 'V', 'Y'); +st->codecpar->bit_rate= av_rescale(ctx->bmd_width * ctx->bmd_height * 16, st->time_base.den, st->time_base.num); } avpriv_set_pts_info(st, 64, 1, 100); /* 64 bits pts in us */ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/8] avdevice/decklink: factorize cleanup function to common code
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_common.cpp | 13 + libavdevice/decklink_common.h | 1 + libavdevice/decklink_dec.cpp| 11 ++- libavdevice/decklink_enc.cpp| 10 ++ 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index ac7964c..43599b6 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -239,3 +239,16 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct return 0; } + +void ff_decklink_cleanup(AVFormatContext *avctx) +{ +struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; +struct decklink_ctx *ctx = (struct decklink_ctx *) cctx->ctx; + +if (ctx->dli) +ctx->dli->Release(); +if (ctx->dlo) +ctx->dlo->Release(); +if (ctx->dl) +ctx->dl->Release(); +} diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index dff4fc1..1a9feeb 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -105,5 +105,6 @@ int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction, int num); int ff_decklink_list_devices(AVFormatContext *avctx); int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction = DIRECTION_OUT); +void ff_decklink_cleanup(AVFormatContext *avctx); #endif /* AVDEVICE_DECKLINK_COMMON_H */ diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 3b5d4be..8b57e0c 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -419,11 +419,7 @@ av_cold int ff_decklink_read_close(AVFormatContext *avctx) ctx->dli->DisableAudioInput(); } -if (ctx->dli) -ctx->dli->Release(); -if (ctx->dl) -ctx->dl->Release(); - +ff_decklink_cleanup(avctx); avpacket_queue_end(&ctx->queue); av_freep(&cctx->ctx); @@ -620,10 +616,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) return 0; error: - -ctx->dli->Release(); -ctx->dl->Release(); - +ff_decklink_cleanup(avctx); return AVERROR(EIO); } diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 6c5450f..4d00a53 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -193,10 +193,7 @@ av_cold int ff_decklink_write_trailer(AVFormatContext *avctx) ctx->dlo->DisableAudioOutput(); } -if (ctx->dlo) -ctx->dlo->Release(); -if (ctx->dl) -ctx->dl->Release(); +ff_decklink_cleanup(avctx); if (ctx->output_callback) delete ctx->output_callback; @@ -400,10 +397,7 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) return 0; error: - -ctx->dlo->Release(); -ctx->dl->Release(); - +ff_decklink_cleanup(avctx); return AVERROR(EIO); } ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 5/8] avdevice/decklink: always free decklink resources on error
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_dec.cpp | 18 -- libavdevice/decklink_enc.cpp | 12 ++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 0d78942..371be20 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -486,21 +486,21 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) if (ctx->dl->QueryInterface(IID_IDeckLinkInput, (void **) &ctx->dli) != S_OK) { av_log(avctx, AV_LOG_ERROR, "Could not open output device from '%s'\n", avctx->filename); -ctx->dl->Release(); -return AVERROR(EIO); +ret = AVERROR(EIO); +goto error; } /* List supported formats. */ if (ctx->list_formats) { ff_decklink_list_formats(avctx, DIRECTION_IN); -ctx->dli->Release(); -ctx->dl->Release(); -return AVERROR_EXIT; +ret = AVERROR_EXIT; +goto error; } if (mode_num > 0) { if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) { av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", mode_num, fname); +ret = AVERROR(EIO); goto error; } } @@ -509,6 +509,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) st = avformat_new_stream(avctx, NULL); if (!st) { av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n"); +ret = AVERROR(ENOMEM); goto error; } st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; @@ -521,6 +522,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) st = avformat_new_stream(avctx, NULL); if (!st) { av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n"); +ret = AVERROR(ENOMEM); goto error; } st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; @@ -549,6 +551,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) st = avformat_new_stream(avctx, NULL); if (!st) { av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n"); +ret = AVERROR(ENOMEM); goto error; } st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; @@ -564,6 +567,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) if (result != S_OK) { av_log(avctx, AV_LOG_ERROR, "Cannot enable audio input\n"); +ret = AVERROR(EIO); goto error; } @@ -573,6 +577,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) if (result != S_OK) { av_log(avctx, AV_LOG_ERROR, "Cannot enable video input\n"); +ret = AVERROR(EIO); goto error; } @@ -580,6 +585,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) if (decklink_start_input (avctx) != S_OK) { av_log(avctx, AV_LOG_ERROR, "Cannot start input stream\n"); +ret = AVERROR(EIO); goto error; } @@ -587,7 +593,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) error: ff_decklink_cleanup(avctx); -return AVERROR(EIO); +return ret; } int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt) diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index f59bd82..5e796fa 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -337,19 +337,19 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) if (ctx->dl->QueryInterface(IID_IDeckLinkOutput, (void **) &ctx->dlo) != S_OK) { av_log(avctx, AV_LOG_ERROR, "Could not open output device from '%s'\n", avctx->filename); -ctx->dl->Release(); -return AVERROR(EIO); +ret = AVERROR(EIO); +goto error; } /* List supported formats. */ if (ctx->list_formats) { ff_decklink_list_formats(avctx); -ctx->dlo->Release(); -ctx->dl->Release(); -return AVERROR_EXIT; +ret = AVERROR_EXIT; +goto error; } /* Setup streams. */ +ret = AVERROR(EIO); for (n = 0; n < avctx->nb_streams; n++) { AVStream *st = avctx->streams[n]; AVCodecContext *c = st->codec; @@ -369,7 +369,7 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) error: ff_decklink_cleanup(avctx); -return AVERROR(EIO); +return ret; } int ff_decklink_write_packet(AVFormatContext *avctx, AVPacket *pkt) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/8] avdevice/decklink: remove unused itermode iterators
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_dec.cpp | 9 - libavdevice/decklink_enc.cpp | 8 2 files changed, 17 deletions(-) diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 8b57e0c..0d652bc 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -431,7 +431,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) { struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; struct decklink_ctx *ctx; -IDeckLinkDisplayModeIterator *itermode; IDeckLinkIterator *iter; IDeckLink *dl = NULL; AVStream *st; @@ -520,12 +519,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) return AVERROR_EXIT; } -if (ctx->dli->GetDisplayModeIterator(&itermode) != S_OK) { -av_log(avctx, AV_LOG_ERROR, "Could not get Display Mode Iterator\n"); -ctx->dl->Release(); -return AVERROR(EIO); -} - if (mode_num > 0) { if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) { av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", mode_num, fname); @@ -533,8 +526,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) } } -itermode->Release(); - /* Setup streams. */ st = avformat_new_stream(avctx, NULL); if (!st) { diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 4d00a53..3f4b22c 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -312,7 +312,6 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) { struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; struct decklink_ctx *ctx; -IDeckLinkDisplayModeIterator *itermode; IDeckLinkIterator *iter; IDeckLink *dl = NULL; unsigned int n; @@ -371,12 +370,6 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) return AVERROR_EXIT; } -if (ctx->dlo->GetDisplayModeIterator(&itermode) != S_OK) { -av_log(avctx, AV_LOG_ERROR, "Could not get Display Mode Iterator\n"); -ctx->dl->Release(); -return AVERROR(EIO); -} - /* Setup streams. */ for (n = 0; n < avctx->nb_streams; n++) { AVStream *st = avctx->streams[n]; @@ -392,7 +385,6 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) goto error; } } -itermode->Release(); return 0; ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 6/8] avdevice/decklink: add support for setting duplex mode
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: This patch also makes BlackMagic drivers v10.6.1 a hard requirement. Signed-off-by: Marton Balint --- configure | 3 ++- doc/indevs.texi | 4 libavdevice/decklink_common.cpp | 33 + libavdevice/decklink_common.h | 3 +++ libavdevice/decklink_common_c.h | 1 + libavdevice/decklink_dec.cpp| 1 + libavdevice/decklink_dec_c.c| 4 7 files changed, 48 insertions(+), 1 deletion(-) diff --git a/configure b/configure index e6ebd3b..4028cd1 100755 --- a/configure +++ b/configure @@ -5619,7 +5619,8 @@ enabled cuvid && { check_lib cuviddec.h cuvidCreateDecoder -lnvcuvid enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint enabled coreimage_filter && { check_header_objcc QuartzCore/CoreImage.h || disable coreimage_filter; } enabled coreimagesrc_filter && { check_header_objcc QuartzCore/CoreImage.h || disable coreimagesrc_filter; } -enabled decklink && { check_header DeckLinkAPI.h || die "ERROR: DeckLinkAPI.h header not found"; } +enabled decklink && { { check_header DeckLinkAPI.h || die "ERROR: DeckLinkAPI.h header not found"; } && + { check_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API version must be >= 10.6.1."; } } enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h header not found"; } enabled gmp && require2 gmp gmp.h mpz_export -lgmp enabled gnutls&& require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init diff --git a/doc/indevs.texi b/doc/indevs.texi index 3fb852b..479932a 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -251,6 +251,10 @@ To use this option, ffmpeg needs to be compiled with @code{--enable-libzvbi}. Defines number of audio channels to capture. Must be @samp{2}, @samp{8} or @samp{16}. Defaults to @samp{2}. +@item duplex_mode +Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}. +Defaults to @samp{unset}. + @end table @subsection Examples diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 2711fc1..c6e127e 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -111,6 +111,23 @@ int ff_decklink_set_format(AVFormatContext *avctx, int i = 1; HRESULT res; +if (ctx->duplex_mode) { +bool duplex_supported = false; + +if (ctx->attr->GetFlag(BMDDeckLinkSupportsDuplexModeConfiguration, &duplex_supported) != S_OK) +duplex_supported = false; + +if (duplex_supported) { +res = ctx->cfg->SetInt(bmdDeckLinkConfigDuplexMode, ctx->duplex_mode == 2 ? bmdDuplexModeFull : bmdDuplexModeHalf); +if (res != S_OK) +av_log(avctx, AV_LOG_WARNING, "Setting duplex mode failed.\n"); +else +av_log(avctx, AV_LOG_VERBOSE, "Succesfully set duplex mode to %s duplex.\n", ctx->duplex_mode == 2 ? "full" : "half"); +} else { +av_log(avctx, AV_LOG_WARNING, "Unable to set duplex mode, because it is not supported.\n"); +} +} + if (direction == DIRECTION_IN) { res = ctx->dli->GetDisplayModeIterator (&itermode); } else { @@ -249,6 +266,10 @@ void ff_decklink_cleanup(AVFormatContext *avctx) ctx->dli->Release(); if (ctx->dlo) ctx->dlo->Release(); +if (ctx->attr) +ctx->attr->Release(); +if (ctx->cfg) +ctx->cfg->Release(); if (ctx->dl) ctx->dl->Release(); } @@ -279,5 +300,17 @@ int ff_decklink_init_device(AVFormatContext *avctx, const char* name) if (!ctx->dl) return AVERROR(ENXIO); +if (ctx->dl->QueryInterface(IID_IDeckLinkConfiguration, (void **)&ctx->cfg) != S_OK) { +av_log(avctx, AV_LOG_ERROR, "Could not get configuration interface for '%s'\n", name); +ff_decklink_cleanup(avctx); +return AVERROR_EXTERNAL; +} + +if (ctx->dl->QueryInterface(IID_IDeckLinkAttributes, (void **)&ctx->attr) != S_OK) { +av_log(avctx, AV_LOG_ERROR, "Could not get attributes interaface for '%s'\n", name); +ff_decklink_cleanup(avctx); +return AVERROR_EXTERNAL; +} + return 0; } diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index ee39ff2..201eb15 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -44,6 +44,8 @@ struct decklink_ctx { IDeckLink *dl; IDeckLinkOutput *dlo; IDeckLinkInput *dli; +IDeckLinkConfiguration *cfg; +IDeckLinkAttributes *attr; decklink_output_callback *output_callback; decklink_input_callback *input_callback; @@ -77,6 +79,7 @@ struct decklink_ctx { int list_formats; int64_t teletext_lines; double prerol
Re: [FFmpeg-devel] [PATCH 4/8] avdevice/decklink: factorize device finder function
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_common.cpp | 29 + libavdevice/decklink_common.h | 1 + libavdevice/decklink_dec.cpp| 29 - libavdevice/decklink_enc.cpp| 29 - 4 files changed, 38 insertions(+), 50 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 43599b6..2711fc1 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -252,3 +252,32 @@ void ff_decklink_cleanup(AVFormatContext *avctx) if (ctx->dl) ctx->dl->Release(); } + +int ff_decklink_init_device(AVFormatContext *avctx, const char* name) +{ +struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data; +struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; +IDeckLink *dl = NULL; +IDeckLinkIterator *iter = CreateDeckLinkIteratorInstance(); +if (!iter) { +av_log(avctx, AV_LOG_ERROR, "Could not create DeckLink iterator\n"); +return AVERROR_EXTERNAL; +} + +while (iter->Next(&dl) == S_OK) { +const char *displayName; +ff_decklink_get_display_name(dl, &displayName); +if (!strcmp(name, displayName)) { +av_free((void *)displayName); +ctx->dl = dl; +break; +} +av_free((void *)displayName); +dl->Release(); +} +iter->Release(); +if (!ctx->dl) +return AVERROR(ENXIO); + +return 0; +} diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index 1a9feeb..ee39ff2 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -106,5 +106,6 @@ int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t directio int ff_decklink_list_devices(AVFormatContext *avctx); int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction = DIRECTION_OUT); void ff_decklink_cleanup(AVFormatContext *avctx); +int ff_decklink_init_device(AVFormatContext *avctx, const char* name); #endif /* AVDEVICE_DECKLINK_COMMON_H */ diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 0d652bc..0d78942 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -431,13 +431,12 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) { struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; struct decklink_ctx *ctx; -IDeckLinkIterator *iter; -IDeckLink *dl = NULL; AVStream *st; HRESULT result; char fname[1024]; char *tmp; int mode_num = 0; +int ret; ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx)); if (!ctx) @@ -466,12 +465,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) return AVERROR(EINVAL); } -iter = CreateDeckLinkIteratorInstance(); -if (!iter) { -av_log(avctx, AV_LOG_ERROR, "Could not create DeckLink iterator\n"); -return AVERROR(EIO); -} - /* List available devices. */ if (ctx->list_devices) { ff_decklink_list_devices(avctx); @@ -485,23 +478,9 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) *tmp = 0; } -/* Open device. */ -while (iter->Next(&dl) == S_OK) { -const char *displayName; -ff_decklink_get_display_name(dl, &displayName); -if (!strcmp(fname, displayName)) { -av_free((void *) displayName); -ctx->dl = dl; -break; -} -av_free((void *) displayName); -dl->Release(); -} -iter->Release(); -if (!ctx->dl) { -av_log(avctx, AV_LOG_ERROR, "Could not open '%s'\n", fname); -return AVERROR(EIO); -} +ret = ff_decklink_init_device(avctx, fname); +if (ret < 0) +return ret; /* Get input device. */ if (ctx->dl->QueryInterface(IID_IDeckLinkInput, (void **) &ctx->dli) != S_OK) { diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 3f4b22c..f59bd82 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -312,9 +312,8 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) { struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; struct decklink_ctx *ctx; -IDeckLinkIterator *iter; -IDeckLink *dl = NULL; unsigned int n; +int ret; ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx)); if (!ctx) @@ -324,35 +323,15 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx) ctx->preroll = cctx->preroll; cctx->ctx = ctx; -iter = CreateDeckLinkIteratorInstance(); -if (!iter) { -av_log(avctx, AV_LOG_ERROR, "Could not create DeckLink iterator\n"); -return AVERROR(EIO); -} - /* List available devices. */ if (
Re: [FFmpeg-devel] [PATCH 7/8] avdevice/decklink: add support for audio and video input selection
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- doc/indevs.texi | 10 ++ libavdevice/decklink_common.cpp | 43 + libavdevice/decklink_common.h | 21 libavdevice/decklink_common_c.h | 2 ++ libavdevice/decklink_dec.cpp| 5 + libavdevice/decklink_dec_c.c| 16 +++ 6 files changed, 97 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index 479932a..5239287 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -255,6 +255,16 @@ Defaults to @samp{2}. Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or @samp{full}. Defaults to @samp{unset}. +@item video_input +Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi}, +@samp{optical_sdi}, @samp{component}, @samp{composite} or @samp{s_video}. +Defaults to @samp{unset}. + +@item audio_input +Sets the audio input source. Must be @samp{unset}, @samp{embedded}, +@samp{aes_ebu}, @samp{analog}, @samp{analog_xlr}, @samp{analog_rca} or +@samp{microphone}. Defaults to @samp{unset}. + @end table @subsection Examples diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index c6e127e..1ef521b 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -98,6 +98,35 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) return hr; } +static int decklink_select_input(AVFormatContext *avctx, BMDDeckLinkConfigurationID cfg_id) +{ +struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; +struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; +BMDDeckLinkAttributeID attr_id = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? BMDDeckLinkAudioInputConnections : BMDDeckLinkVideoInputConnections; +int64_t bmd_input = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? ctx->audio_input : ctx->video_input; +const char *type_name = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? "audio" : "video"; +int64_t supported_connections = 0; +HRESULT res; + +if (bmd_input) { +res = ctx->attr->GetInt(attr_id, &supported_connections); +if (res != S_OK) { +av_log(avctx, AV_LOG_ERROR, "Failed to query supported %s inputs.\n", type_name); +return AVERROR_EXTERNAL; +} +if ((supported_connections & bmd_input) != bmd_input) { +av_log(avctx, AV_LOG_ERROR, "Device does not support selected %s input.\n", type_name); +return AVERROR(ENOSYS); +} +res = ctx->cfg->SetInt(cfg_id, bmd_input); +if (res != S_OK) { +av_log(avctx, AV_LOG_WARNING, "Failed to select %s input.\n", type_name); +return AVERROR_EXTERNAL; +} +} +return 0; +} + int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, @@ -129,6 +158,13 @@ int ff_decklink_set_format(AVFormatContext *avctx, } if (direction == DIRECTION_IN) { +int ret; +ret = decklink_select_input(avctx, bmdDeckLinkConfigAudioInputConnection); +if (ret < 0) +return ret; +ret = decklink_select_input(avctx, bmdDeckLinkConfigVideoInputConnection); +if (ret < 0) +return ret; res = ctx->dli->GetDisplayModeIterator (&itermode); } else { res = ctx->dlo->GetDisplayModeIterator (&itermode); @@ -224,6 +260,13 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct HRESULT res; if (direction == DIRECTION_IN) { +int ret; +ret = decklink_select_input(avctx, bmdDeckLinkConfigAudioInputConnection); +if (ret < 0) +return ret; +ret = decklink_select_input(avctx, bmdDeckLinkConfigVideoInputConnection); +if (ret < 0) +return ret; res = ctx->dli->GetDisplayModeIterator (&itermode); } else { res = ctx->dlo->GetDisplayModeIterator (&itermode); diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index 201eb15..44edf19 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -53,6 +53,8 @@ struct decklink_ctx { BMDTimeValue bmd_tb_den; BMDTimeValue bmd_tb_num; BMDDisplayMode bmd_mode; +BMDVideoConnection video_input; +BMDAudioConnection audio_input; int bmd_width; int bmd_height; int bmd_field_dominance; @@ -102,6 +104,25 @@ IDeckLinkIterator *CreateDeckLinkIteratorInstance(void); typedef uint32_t buffercount_type; #endif +static const BMDAudioConnection decklink_audio_connection_map[] = { +0, +bmdAudioConnectionEmbedded, +bmdAudioConnectionAESEBU, +bmdAudioConnectionAnalog, +bmdAudioConnectionAnalogXLR, +bmdAudioConnecti
Re: [FFmpeg-devel] [PATCH 8/8] avdevice/decklink: add support for setting input packet timestamp source
Patch accepted, please apply. On 23/06/16 02:47, Marton Balint wrote: Signed-off-by: Marton Balint --- doc/indevs.texi | 8 ++ libavdevice/decklink_common.h | 2 ++ libavdevice/decklink_common_c.h | 9 ++ libavdevice/decklink_dec.cpp| 62 +++-- libavdevice/decklink_dec_c.c| 6 5 files changed, 73 insertions(+), 14 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 5239287..9e91455 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -265,6 +265,14 @@ Sets the audio input source. Must be @samp{unset}, @samp{embedded}, @samp{aes_ebu}, @samp{analog}, @samp{analog_xlr}, @samp{analog_rca} or @samp{microphone}. Defaults to @samp{unset}. +@item video_pts +Sets the video packet timestamp source. Must @samp{video}, @samp{audio}, +@samp{reference} or @samp{wallclock}. Defaults to @samp{video}. + +@item audio_pts +Sets the audio packet timestamp source. Must @samp{video}, @samp{audio}, +@samp{reference} or @samp{wallclock}. Defaults to @samp{audio}. + @end table @subsection Examples diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index 44edf19..a4ac303 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -82,6 +82,8 @@ struct decklink_ctx { int64_t teletext_lines; double preroll; int duplex_mode; +DecklinkPtsSource audio_pts_source; +DecklinkPtsSource video_pts_source; int frames_preroll; int frames_buffer; diff --git a/libavdevice/decklink_common_c.h b/libavdevice/decklink_common_c.h index 8de853d..3c5f218 100644 --- a/libavdevice/decklink_common_c.h +++ b/libavdevice/decklink_common_c.h @@ -22,6 +22,13 @@ #ifndef AVDEVICE_DECKLINK_COMMON_C_H #define AVDEVICE_DECKLINK_COMMON_C_H +typedef enum DecklinkPtsSource { +PTS_SRC_AUDIO = 1, +PTS_SRC_VIDEO = 2, +PTS_SRC_REFERENCE = 3, +PTS_SRC_WALLCLOCK = 4, +} DecklinkPtsSource; + struct decklink_cctx { const AVClass *cclass; @@ -35,6 +42,8 @@ struct decklink_cctx { int v210; int audio_channels; int duplex_mode; +DecklinkPtsSource audio_pts_source; +DecklinkPtsSource video_pts_source; int audio_input; int video_input; }; diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 7f45224..fcb024e 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -28,8 +28,11 @@ extern "C" { #include "config.h" #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavutil/avutil.h" #include "libavutil/common.h" #include "libavutil/imgutils.h" +#include "libavutil/time.h" +#include "libavutil/mathematics.h" #if CONFIG_LIBZVBI #include #endif @@ -237,6 +240,44 @@ ULONG decklink_input_callback::Release(void) return (ULONG)m_refCount; } +static int64_t get_pkt_pts(IDeckLinkVideoInputFrame *videoFrame, + IDeckLinkAudioInputPacket *audioFrame, + int64_t wallclock, + DecklinkPtsSource pts_src, + AVRational time_base, int64_t *initial_pts) +{ +int64_t pts = AV_NOPTS_VALUE; +BMDTimeValue bmd_pts; +BMDTimeValue bmd_duration; +HRESULT res = E_INVALIDARG; +switch (pts_src) { +case PTS_SRC_AUDIO: +if (audioFrame) +res = audioFrame->GetPacketTime(&bmd_pts, time_base.den); +break; +case PTS_SRC_VIDEO: +if (videoFrame) +res = videoFrame->GetStreamTime(&bmd_pts, &bmd_duration, time_base.den); +break; +case PTS_SRC_REFERENCE: +if (videoFrame) +res = videoFrame->GetHardwareReferenceTimestamp(time_base.den, &bmd_pts, &bmd_duration); +break; +case PTS_SRC_WALLCLOCK: +pts = av_rescale_q(wallclock, AV_TIME_BASE_Q, time_base); +break; +} +if (res == S_OK) +pts = bmd_pts / time_base.num; + +if (pts != AV_NOPTS_VALUE && *initial_pts == AV_NOPTS_VALUE) +*initial_pts = pts; +if (*initial_pts != AV_NOPTS_VALUE) +pts -= *initial_pts; + +return pts; +} + HRESULT decklink_input_callback::VideoInputFrameArrived( IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioFrame) { @@ -244,8 +285,11 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( void *audioFrameBytes; BMDTimeValue frameTime; BMDTimeValue frameDuration; +int64_t wallclock = 0; ctx->frameCount++; +if (ctx->audio_pts_source == PTS_SRC_WALLCLOCK || ctx->video_pts_source == PTS_SRC_WALLCLOCK) +wallclock = av_gettime_relative(); // Handle Video Frame if (videoFrame) { @@ -292,13 +336,7 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( no_video = 0; } -pkt.pts = frameTime / ctx->video_st->time_base.num; - -if (initial_video_pts == AV_NOPTS_VALUE) { -
[FFmpeg-devel] [PATCH] tests/checkasm/pixblockdsp: Test only aligned by 8 diff/get pixels
They are documented as requiring 8 byte aligned source Signed-off-by: Michael Niedermayer --- tests/checkasm/pixblockdsp.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/pixblockdsp.c b/tests/checkasm/pixblockdsp.c index 66bfdb7..28ee500 100644 --- a/tests/checkasm/pixblockdsp.c +++ b/tests/checkasm/pixblockdsp.c @@ -49,7 +49,7 @@ int i; \ declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);\ \ -for (i = 0; i < BUF_UNITS; i++) { \ +for (i = 0; i < BUF_UNITS; i+=8) { \ int src_offset = i * 64 * sizeof(type) + i; /* Test various alignments */ \ int dst_offset = i * 64; /* dst must be aligned */ \ randomize_buffers(); \ @@ -66,7 +66,7 @@ int i; \ declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, int stride); \ \ -for (i = 0; i < BUF_UNITS; i++) { \ +for (i = 0; i < BUF_UNITS; i+=8) { \ int src_offset = i * 64 * sizeof(type) + i; /* Test various alignments */ \ int dst_offset = i * 64; /* dst must be aligned */ \ randomize_buffers(); \ -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/vf_rotate: add >8 bit depth support
On Sun, Jun 26, 2016 at 3:22 PM, Paul B Mahol wrote: > On 6/26/16, Muhammad Faiz wrote: >> On Sun, Jun 26, 2016 at 2:30 PM, Paul B Mahol wrote: >>> On 6/26/16, Carl Eugen Hoyos wrote: Muhammad Faiz gmail.com> writes: > I think it's not because of bit-exact problem. > But because fate probes supported formats (with > libavfilter/tests/filtfmts) > On BE machine, code with native formats will generate error > because fate-ref contains yuv*le entries but fate expects yuv*be >> >> Another problem is that drawutils only support LE format. >> We control the fate test, so we can require an additional (bit-exact) conversion from BE to LE to make the fate test pass. >>> >>> Really, even for pixfmts? >>> >>> I will apply this as is. Feel free to add your hacks if you want, after. >> >> In the perspective of code correctness, this should be OK. >> But performance on BE machine will be unoptimal because: >> - reading/writing in foreign endian is probably slower >> - I guess most decoders' output frame is native endian. This will >>make unnecessary format conversion >> - some other filters only support native endian formats. This will >>also make unnecessary format conversion. >> >> Of course, the problem is not in your patch. > > Yes. BE is dead. The problem is in drawutils. I think, it should support native endian or support both little/big endian. Thank's ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] fate/webp : add test for lossy files
Hello, in attach a patch to add test for lossy decoding of webp. Compare with dwebp tool, the result of ffmpeg in yuv is exactly the same than the official decoder. (trouble report in my previous email, concern rgb/rgba output (because the filtering yuv420 -> yuv444 of libwebp is not implemented). Samples can be found here : https://we.tl/QKy6uyDJpx and need to be put in ./fate-suite/webp/ The patch need to be apply after the previous one (call : 0001-fate-webp-add-test-for-webp-lossless-decoding-rgb-an.patch") Martin From cfdc3a559207308840f96e201b4190903c4bcab2 Mon Sep 17 00:00:00 2001 From: Martin Vignali Date: Sun, 26 Jun 2016 12:42:44 +0200 Subject: [PATCH 2/2] fate/webp : add test for lossy compression. the result of ffmpeg decoding is binary exact with the yuv output of official decoder (dwbep) --- tests/fate/image.mak | 6 ++ tests/ref/fate/webp-rgb-lossy-q80 | 6 ++ tests/ref/fate/webp-rgba-lossy-q80 | 6 ++ 3 files changed, 18 insertions(+) create mode 100644 tests/ref/fate/webp-rgb-lossy-q80 create mode 100644 tests/ref/fate/webp-rgba-lossy-q80 diff --git a/tests/fate/image.mak b/tests/fate/image.mak index 2087c10..77fd626 100644 --- a/tests/fate/image.mak +++ b/tests/fate/image.mak @@ -253,6 +253,12 @@ fate-webp-rgb-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_lossless.we FATE_WEBP += fate-webp-rgba-lossless fate-webp-rgba-lossless: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgba_lossless.webp +FATE_WEBP += fate-webp-rgb-lossy-q80 +fate-webp-rgb-lossy-q80: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgb_q80.webp + +FATE_WEBP += fate-webp-rgba-lossy-q80 +fate-webp-rgba-lossy-q80: CMD = framecrc -i $(TARGET_SAMPLES)/webp/rgba_q80.webp + FATE_WEBP-$(call DEMDEC, IMAGE2, WEBP) += $(FATE_WEBP) FATE_IMAGE += $(FATE_WEBP-yes) fate-webp: $(FATE_WEBP-yes) diff --git a/tests/ref/fate/webp-rgb-lossy-q80 b/tests/ref/fate/webp-rgb-lossy-q80 new file mode 100644 index 000..f61d75a --- /dev/null +++ b/tests/ref/fate/webp-rgb-lossy-q80 @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 12x8 +#sar 0: 0/1 +0, 0, 0,1, 144, 0xf38b5307 diff --git a/tests/ref/fate/webp-rgba-lossy-q80 b/tests/ref/fate/webp-rgba-lossy-q80 new file mode 100644 index 000..d2c2aa3 --- /dev/null +++ b/tests/ref/fate/webp-rgba-lossy-q80 @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 12x8 +#sar 0: 0/1 +0, 0, 0,1, 240, 0xc56c96c3 -- 1.9.3 (Apple Git-50) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] tests/checkasm/pixblockdsp: Test only aligned by 8 diff/get pixels
On Sun, Jun 26, 2016 at 11:16 AM, Michael Niedermayer wrote: > They are documented as requiring 8 byte aligned source > > Signed-off-by: Michael Niedermayer > --- > tests/checkasm/pixblockdsp.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/checkasm/pixblockdsp.c b/tests/checkasm/pixblockdsp.c > index 66bfdb7..28ee500 100644 > --- a/tests/checkasm/pixblockdsp.c > +++ b/tests/checkasm/pixblockdsp.c > @@ -49,7 +49,7 @@ > int i; > \ > declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *block, const > uint8_t *pixels, ptrdiff_t line_size);\ > > \ > -for (i = 0; i < BUF_UNITS; i++) { > \ > +for (i = 0; i < BUF_UNITS; i+=8) { >\ > int src_offset = i * 64 * sizeof(type) + i; /* Test various > alignments */ \ > int dst_offset = i * 64; /* dst must be aligned */ > \ > randomize_buffers(); > \ > @@ -66,7 +66,7 @@ > int i; > \ > declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *av_restrict block, > const uint8_t *s1, const uint8_t *s2, int stride); \ > > \ > -for (i = 0; i < BUF_UNITS; i++) { > \ > +for (i = 0; i < BUF_UNITS; i+=8) { >\ > int src_offset = i * 64 * sizeof(type) + i; /* Test various > alignments */ \ > int dst_offset = i * 64; /* dst must be aligned */ > \ > randomize_buffers(); > \ > -- > 1.7.9.5 > BUF_UNITS is 8, so that change would entirely eliminate the loop. Maybe src_offset should just be changed to be aligned properly, keeping the loop? Or is the only purpose of the loop to test alignment? - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavcodec/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing
Am Samstag, den 25.06.2016, 12:52 +0200 schrieb Michael Niedermayer: > On Fri, Jun 24, 2016 at 06:27:38PM +0200, Jens Ziller wrote: > > > > Hello, > > > > deinterlacing need frame->interlaced_frame and format struct. This > > patch added this to AVFrame. > > > > Regards Jens. > > > > mmaldec.c | 16 > > 1 file changed, 16 insertions(+) > > 6351a54c36d98d1f6ffdaeea96af8c0db1305358 0001-for-deinterlacing- > > needed.patch > > From 8a8961a4fab0da2bd98ef6cbfaf55462a00d3450 Mon Sep 17 00:00:00 > > 2001 > > From: Jens Ziller > > Date: Fri, 24 Jun 2016 18:18:12 +0200 > > > > Subject: [PATCH] for deinterlacing needed > This commit message is not ok > > The message should describe > 1. what is changed > 2. why it is changed > 3. how it is changed > > When in doubt always write a longer commit message than a short one > > [...] > > > > if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { > > if (!ctx->pool_out) > > +// in data[2] give the format struct for configure > > deinterlacer and renderer > > +frame->data[2] = ctx->decoder->output[0]->format; > This is not how AV_PIX_FMT_MMAL is documented: > > /** > * HW acceleration though MMAL, data[3] contains a pointer to the > * MMAL_BUFFER_HEADER_T structure. > */ > AV_PIX_FMT_MMAL, > > also where is the code that uses data[2] ? > > [...] > Attached is the new Version. Hints and comments are welcome. Regards Jens. > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-develFrom eb6b4d03b258789b4b7baafe89fec1a8feae00f7 Mon Sep 17 00:00:00 2001 From: Jens Ziller Date: Sun, 26 Jun 2016 17:01:34 +0200 Subject: [PATCH] v2 fill AVFrame->interlaced_frame with MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T, add a pointer data[2] to MMAL_ES_FORMAT_T that user application can invoke MMAL components like deinterlacer and renderer with it --- libavcodec/mmaldec.c | 16 libavutil/pixfmt.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 099a8c5..b38a3bd 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -88,6 +88,7 @@ typedef struct MMALDecodeContext { int eos_received; int eos_sent; int extradata_sent; +int interlaced_frame; } MMALDecodeContext; // Assume decoder is guaranteed to produce output after at least this many @@ -274,6 +275,7 @@ static int ffmal_update_format(AVCodecContext *avctx) int ret = 0; MMAL_COMPONENT_T *decoder = ctx->decoder; MMAL_ES_FORMAT_T *format_out = decoder->output[0]->format; +MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T interlace_type; ffmmal_poolref_unref(ctx->pool_out); if (!(ctx->pool_out = av_mallocz(sizeof(*ctx->pool_out { @@ -300,6 +302,15 @@ static int ffmal_update_format(AVCodecContext *avctx) if ((status = mmal_port_format_commit(decoder->output[0]))) goto fail; +interlace_type.hdr.id = MMAL_PARAMETER_VIDEO_INTERLACE_TYPE; +interlace_type.hdr.size = sizeof(MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T); +status = mmal_port_parameter_get(decoder->output[0], &interlace_type.hdr); +if (status != MMAL_SUCCESS) { +av_log(avctx, AV_LOG_ERROR, "Cannot read MMAL interlace information!\n"); +} else { +ctx->interlaced_frame = !(interlace_type.eMode == MMAL_InterlaceProgressive); +} + if ((ret = ff_set_dimensions(avctx, format_out->es->video.crop.x + format_out->es->video.crop.width, format_out->es->video.crop.y + format_out->es->video.crop.height)) < 0) goto fail; @@ -609,8 +620,13 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, MMALDecodeContext *ctx = avctx->priv_data; int ret = 0; +frame->interlaced_frame = ctx->interlaced_frame; + if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { if (!ctx->pool_out) +// in data[2] give the format struct for configure deinterlacer and renderer +frame->data[2] = ctx->decoder->output[0]->format; + return AVERROR_UNKNOWN; // format change code failed with OOM previously if ((ret = ff_decode_frame_props(avctx, frame)) < 0) diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 0ed01c4..98982f8 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -235,7 +235,8 @@ enum AVPixelFormat { AV_PIX_FMT_QSV, /** * HW acceleration though MMAL, data[3] contains a pointer to the - * MMAL_BUFFER_HEADER_T structure. + * MMAL_BUFFER_HEADER_T structure and data[2] contains a pointer to the + * MMAL_ES_FORMAT_T structure. */ AV_PIX_FMT_MMAL, -- 2.7.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 01/10] lavf: add a flag to enable/disable automatic bitstream filtering
On Sat, Jun 25, 2016 at 04:01:50PM -0500, Rodger Combs wrote: > This is mostly useful for muxers that wrap other muxers, such as dashenc > and segment. The actual duplicated bitstream filtering is largely harmless, > but delaying the header can cause problems when the muxer intended the header > to be written to a separate file. > --- > libavformat/avformat.h | 1 + > libavformat/mux.c | 4 ++-- > libavformat/options_table.h | 3 ++- > 3 files changed, 5 insertions(+), 3 deletions(-) you have posted this patch 8 times and it has been reviewed and appoved twice already can you mark patches which have been reviewed/approved already somehow ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 3 "Rare item" - "Common item with rare defect or maybe just a lie" "Professional" - "'Toy' made in china, not functional except as doorstop" "Experts will know" - "The seller hopes you are not an expert" 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/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing
On Sun, Jun 26, 2016 at 5:12 PM, Jens Ziller wrote: > Am Samstag, den 25.06.2016, 12:52 +0200 schrieb Michael Niedermayer: >> On Fri, Jun 24, 2016 at 06:27:38PM +0200, Jens Ziller wrote: >> > >> > Hello, >> > >> > deinterlacing need frame->interlaced_frame and format struct. This >> > patch added this to AVFrame. >> > >> > Regards Jens. >> > >> > mmaldec.c | 16 >> > 1 file changed, 16 insertions(+) >> > 6351a54c36d98d1f6ffdaeea96af8c0db1305358 0001-for-deinterlacing- >> > needed.patch >> > From 8a8961a4fab0da2bd98ef6cbfaf55462a00d3450 Mon Sep 17 00:00:00 >> > 2001 >> > From: Jens Ziller >> > Date: Fri, 24 Jun 2016 18:18:12 +0200 >> > >> > Subject: [PATCH] for deinterlacing needed >> This commit message is not ok >> >> The message should describe >> 1. what is changed >> 2. why it is changed >> 3. how it is changed >> >> When in doubt always write a longer commit message than a short one >> >> [...] >> > >> > if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { >> > if (!ctx->pool_out) >> > +// in data[2] give the format struct for configure >> > deinterlacer and renderer >> > +frame->data[2] = ctx->decoder->output[0]->format; >> This is not how AV_PIX_FMT_MMAL is documented: >> >> /** >> * HW acceleration though MMAL, data[3] contains a pointer to the >> * MMAL_BUFFER_HEADER_T structure. >> */ >> AV_PIX_FMT_MMAL, >> >> also where is the code that uses data[2] ? >> >> [...] >> > > Attached is the new Version. Hints and comments are welcome. > > Regards Jens. > MMAL_ES_FORMAT_T looks like it contains information about the encoded stream, and pretty trivial information at that - things that are in AVCodecContext anyway. Maybe whoever needs such a struct should just re-assemble it instead of re-definining the pixel format definition here? - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 03/10] lavf/segment: add deinit function
On Sat, Jun 25, 2016 at 04:01:52PM -0500, Rodger Combs wrote: > --- > libavformat/segment.c | 47 --- > 1 file changed, 20 insertions(+), 27 deletions(-) probably ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 8/8] avdevice/decklink: add support for setting input packet timestamp source
On Sun, 26 Jun 2016, Deti Fliegl wrote: Patch accepted, please apply. Thanks, I have applied the whole series with some minor fixes and an AVDEVICE micro version bump. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 05/10] lavf/movenc: add deinit function
On Sat, Jun 25, 2016 at 04:01:54PM -0500, Rodger Combs wrote: > --- > libavformat/movenc.c | 70 > ++-- > 1 file changed, 30 insertions(+), 40 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 08/10] fate/h264: add automatic bsf test
On Sat, Jun 25, 2016 at 04:01:57PM -0500, Rodger Combs wrote: > --- > tests/fate/h264.mak | 2 ++ > tests/ref/fate/h264-autobsf-mp4toannexb | 1 + > 2 files changed, 3 insertions(+) > create mode 100644 tests/ref/fate/h264-autobsf-mp4toannexb still LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 09/10] fate/aac: add automatic bsf test
On Sat, Jun 25, 2016 at 04:01:58PM -0500, Rodger Combs wrote: > --- > tests/fate/aac.mak | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB He who knows, does not speak. He who speaks, does not know. -- Lao Tsu signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 10/10] fate/hevc: add automatic bsf test
On Sat, Jun 25, 2016 at 04:01:59PM -0500, Rodger Combs wrote: > --- > tests/fate/hevc.mak | 11 +++ > 1 file changed, 11 insertions(+) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] fate/webp : add test for lossy files
On Sun, Jun 26, 2016 at 12:52:00PM +0200, Martin Vignali wrote: > Hello, > > in attach a patch to add test for lossy decoding of webp. > > Compare with dwebp tool, the result of ffmpeg in yuv is exactly the same > than the official decoder. > > (trouble report in my previous email, concern rgb/rgba output (because the > filtering yuv420 -> yuv444 of libwebp is not implemented). > > Samples can be found here : https://we.tl/QKy6uyDJpx > > and need to be put in ./fate-suite/webp/ uploaded thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] fate/exr : add test for file with half and float channels
On Sat, Jun 25, 2016 at 08:24:21PM +0200, Martin Vignali wrote: > Hello, > > In attach patch in order to add several tests for tile and scanline exr file > who have half and float channels. > > > It also cover compression in tile (except for piz) > and now cover the layer option of exr. > (reason why each file have two tests (one for each layer)) > > There is more tests for pxr24 and b44 compression, because there is more > "special" case for theses compressions. > > Samples can be download here : https://we.tl/yfpn8eTjpi > > And need to be put inside : > ./fate-suite/exr/ > > Martin > Jokyo Images > > > -- > Martin Vignali > Jokyo Images > 18 rue du Transvaal > 69008 Lyon > 06 99 89 33 30 > m.vign...@jokyo-images.com > http://www.jokyo-images.com/ > fate/image.mak | 108 > + > ref/fate/exr-rgb-scanline-b44-half-float-12x8-l1 |6 + > ref/fate/exr-rgb-scanline-b44-half-float-12x8-l2 |6 + > ref/fate/exr-rgb-scanline-pxr24-float-half-l1 |6 + > ref/fate/exr-rgb-scanline-pxr24-float-half-l2 |6 + > ref/fate/exr-rgb-scanline-pxr24-half-float-l1 |6 + > ref/fate/exr-rgb-scanline-pxr24-half-float-l2 |6 + > ref/fate/exr-rgb-scanline-raw-half-float-l1|6 + > ref/fate/exr-rgb-scanline-raw-half-float-l2|6 + > ref/fate/exr-rgb-scanline-rle-half-float-l1|6 + > ref/fate/exr-rgb-scanline-rle-half-float-l2|6 + > ref/fate/exr-rgb-scanline-zip-half-float-l1|6 + > ref/fate/exr-rgb-scanline-zip-half-float-l2|6 + > ref/fate/exr-rgb-scanline-zip1-half-float-l1 |6 + > ref/fate/exr-rgb-scanline-zip1-half-float-l2 |6 + > ref/fate/exr-rgb-tile-half-float-b44-12x8-l1 |6 + > ref/fate/exr-rgb-tile-half-float-b44-12x8-l2 |6 + > ref/fate/exr-rgb-tile-pxr24-float-half-l1 |6 + > ref/fate/exr-rgb-tile-pxr24-float-half-l2 |6 + > ref/fate/exr-rgb-tile-pxr24-half-float-l1 |6 + > ref/fate/exr-rgb-tile-pxr24-half-float-l2 |6 + > ref/fate/exr-rgb-tile-raw-half-float-l1|6 + > ref/fate/exr-rgb-tile-raw-half-float-l2|6 + > ref/fate/exr-rgb-tile-rle-half-float-l1|6 + > ref/fate/exr-rgb-tile-rle-half-float-l2|6 + > ref/fate/exr-rgb-tile-zip-half-float-l1|6 + > ref/fate/exr-rgb-tile-zip-half-float-l2|6 + > ref/fate/exr-rgb-tile-zip1-half-float-l1 |6 + > ref/fate/exr-rgb-tile-zip1-half-float-l2 |6 + > ref/fate/exr-rgba-scanline-float-half-b44-12x8-l1 |6 + > ref/fate/exr-rgba-scanline-float-half-b44-12x8-l2 |6 + > ref/fate/exr-rgba-scanline-float-half-b44-13x9-l1 |6 + > ref/fate/exr-rgba-scanline-float-half-b44-13x9-l2 |6 + > ref/fate/exr-rgba-scanline-float-half-b44a-12x8-l1 |6 + > ref/fate/exr-rgba-scanline-float-half-b44a-12x8-l2 |6 + > ref/fate/exr-rgba-scanline-float-half-b44a-13x9-l1 |6 + > ref/fate/exr-rgba-scanline-float-half-b44a-13x9-l2 |6 + > 37 files changed, 324 insertions(+) > 44e8d909c52707fe170b74271568200479ad0d71 > 0001-fate-exr-add-tests-for-file-with-half-and-float-chan.patch > From 5d61fb691447016217f7b421afa748b3698d8dfa Mon Sep 17 00:00:00 2001 > From: Martin Vignali > Date: Sat, 25 Jun 2016 20:16:01 +0200 > Subject: [PATCH] fate/exr : add tests for file with half and float channels patch applied thx [...] -- 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] fate/webp : add test for webp lossless rgb decoding
On Sat, Jun 25, 2016 at 09:56:15PM +0200, Martin Vignali wrote: > 2016-06-25 21:52 GMT+02:00 Martin Vignali : > > > > > > > 2016-06-25 21:47 GMT+02:00 James Almer : > > > >> On 6/25/2016 4:43 PM, Martin Vignali wrote: > >> > Hello, > >> > > >> > In attach a patch to add a fate test for WebP lossless rgb > >> > > >> > Sample can be found here : https://we.tl/dmPsitbwXK > >> > > >> > and need to be put inside ./fate-suite/webp (the webp folder doesn't > >> exists) > >> > > >> > to test : > >> > make fate-webp SAMPLES=fate-suite/ > >> > > >> > > >> > I doesn't make fate test, for lossy rgb/rgba, because the actual default > >> > output of ffmpeg > >> > have a lower image quality than the official decoder (google dwebp) on > >> my > >> > samples > >> > > >> > for lossless rgba, i doesn't make fate test, because the alpha value > >> seems > >> > to not be the right value > >> > >> This is a bug and should be addressed, then. Lossless should mean > >> lossless. > >> Can you fix it, or open a ticket on trac with a testcase? > >> > >> > > Sorry, in fact rgba lossless is ok (my mistake) > > > > i will open a ticket on trac for lossy > > > > and i will make another patch for fate for rgb and rgba lossless webP > > > > Martin > > > > > > New patch in attach, with rgb, and rgba lossless tests : > samples can be found here : https://we.tl/98mxCyIkhv > > and need to be put inside ./fate-suite/webp (the webp folder doesn't exists) > > to test : > make fate-webp SAMPLES=fate-suite/ > > > Martin > fate/image.mak | 10 ++ > ref/fate/webp-rgb-lossless |6 ++ > ref/fate/webp-rgba-lossless |6 ++ > 3 files changed, 22 insertions(+) > 2ae459d785fb28fcc94555b021d5d76a26394801 > 0001-fate-webp-add-test-for-webp-lossless-decoding-rgb-an.patch > From 9ec694ad16a680650c8618226c516a6d4ba9889c Mon Sep 17 00:00:00 2001 > From: Martin Vignali > Date: Sat, 25 Jun 2016 21:53:23 +0200 > Subject: [PATCH] fate/webp : add test for webp lossless decoding (rgb and > rgba) > > output have been compared with official decoding tool output (dwebp) > --- > tests/fate/image.mak | 10 ++ > tests/ref/fate/webp-rgb-lossless | 6 ++ > tests/ref/fate/webp-rgba-lossless | 6 ++ > 3 files changed, 22 insertions(+) > create mode 100644 tests/ref/fate/webp-rgb-lossless > create mode 100644 tests/ref/fate/webp-rgba-lossless applied thankx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. 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/mmaldec.c: add interlaced_frame and format struct to AVFrame for deinterlacing
Am Sonntag, den 26.06.2016, 18:08 +0200 schrieb Hendrik Leppkes: > On Sun, Jun 26, 2016 at 5:12 PM, Jens Ziller wrote: > > > > Am Samstag, den 25.06.2016, 12:52 +0200 schrieb Michael > > Niedermayer: > > > > > > On Fri, Jun 24, 2016 at 06:27:38PM +0200, Jens Ziller wrote: > > > > > > > > > > > > Hello, > > > > > > > > deinterlacing need frame->interlaced_frame and format struct. > > > > This > > > > patch added this to AVFrame. > > > > > > > > Regards Jens. > > > > > > > > mmaldec.c | 16 > > > > 1 file changed, 16 insertions(+) > > > > 6351a54c36d98d1f6ffdaeea96af8c0db1305358 0001-for- > > > > deinterlacing- > > > > needed.patch > > > > From 8a8961a4fab0da2bd98ef6cbfaf55462a00d3450 Mon Sep 17 > > > > 00:00:00 > > > > 2001 > > > > From: Jens Ziller > > > > Date: Fri, 24 Jun 2016 18:18:12 +0200 > > > > > > > > Subject: [PATCH] for deinterlacing needed > > > This commit message is not ok > > > > > > The message should describe > > > 1. what is changed > > > 2. why it is changed > > > 3. how it is changed > > > > > > When in doubt always write a longer commit message than a short > > > one > > > > > > [...] > > > > > > > > > > > > if (avctx->pix_fmt == AV_PIX_FMT_MMAL) { > > > > if (!ctx->pool_out) > > > > +// in data[2] give the format struct for configure > > > > deinterlacer and renderer > > > > +frame->data[2] = ctx->decoder->output[0]->format; > > > This is not how AV_PIX_FMT_MMAL is documented: > > > > > > /** > > > * HW acceleration though MMAL, data[3] contains a pointer to > > > the > > > * MMAL_BUFFER_HEADER_T structure. > > > */ > > > AV_PIX_FMT_MMAL, > > > > > > also where is the code that uses data[2] ? > > > > > > [...] > > > > > Attached is the new Version. Hints and comments are welcome. > > > > Regards Jens. > > > MMAL_ES_FORMAT_T looks like it contains information about the encoded > stream, and pretty trivial information at that - things that are in > AVCodecContext anyway. > Maybe whoever needs such a struct should just re-assemble it instead > of re-definining the pixel format definition here? > > - Hendrik > Yes, AVCodecContext is similise to MMAL_ES_FORMAT_T. But copy the data from MMAL_ES_FORMAT_T to AVCodecContext and the user app copy the data to a new structure MMAL_ES_FORMAT_T is not smart. I think give a pointer from the existing MMAL_ES_FORMAT_T to user app is nicer. I don't have find a better solution to give a pointer to user app. It's not a re-definining. It's an addition. The structure MMAL_ES_FORMAT_T is only used with AV_PIX_FMT_MMAL format. MMAL is RaspberryPi specific. Regards Jens. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [FFmpeg-cvslog] lavd/decklink: Fix compile issue on OS X
On 6/23/2016 8:08 PM, Rick Kern wrote: > Fixes #4124: Invalid argument '-std=c99' not allowed with 'C++/ObjC++' > C++ files fail to compile. This adds '-std=c++11' to CXX_FLAGS to fix. > > Signed-off-by: Rick Kern > --- > common.mak | 2 +- > configure | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/common.mak b/common.mak > index 59b039f..3f2096d 100644 > --- a/common.mak > +++ b/common.mak > @@ -39,7 +39,7 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) > OBJCFLAGS += $(EOBJCFLAGS) > OBJCCFLAGS = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS) > ASFLAGS:= $(CPPFLAGS) $(ASFLAGS) > -CXXFLAGS += $(CPPFLAGS) $(CFLAGS) > +CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) > YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm > > HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) > diff --git a/configure b/configure > index 94a0a6c..3787894 100755 > --- a/configure > +++ b/configure > @@ -4519,6 +4519,7 @@ fi > > add_cppflags -D_ISOC99_SOURCE > add_cxxflags -D__STDC_CONSTANT_MACROS > +add_cxxflags -std=c++11 Is the c++ code in our tree actually c++11? Or just standard c++98? The -std=c++11 option is relatively recent. Very old compilers may not recognize it. If it is, then you should check if it's supported using check_cxxflags(), then try the same with c++0x (the original value for the standard back when it was planned to be finished in the last decade, and a compatibility alias for c++11 on newer compilers). If neither work then configure should abort. If it's not, then change it to use c++98. > check_cflags -std=c99 > check_cc -D_FILE_OFFSET_BITS=64 < #include > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] libavcodec/exr : rename variable in b44_uncompress func
Hello, in attach patch to rename variables use in b44_uncompress func to be more consistent, to the rest of ffmpeg code. also rename variable who was incorrectly named (named from french word). indexHG_x -> index_tl_x (tl for top left) pass exr fate-tests Martin Jokyo Images From ca4c7f2ce8ffdb5b8bb166e2a7d792f5451c3b89 Mon Sep 17 00:00:00 2001 From: Martin Vignali Date: Sun, 26 Jun 2016 22:27:37 +0200 Subject: [PATCH] libavcodec/exr : cosmetics, rename variable in b44_uncompress func --- libavcodec/exr.c | 66 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index c87187c..a66023c 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -925,74 +925,74 @@ static void unpack_3(const uint8_t b[3], uint16_t s[16]) static int b44_uncompress(EXRContext *s, const uint8_t *src, int compressed_size, int uncompressed_size, EXRThreadData *td) { const int8_t *sr = src; -int stayToUncompress = compressed_size; -int nbB44BlockW, nbB44BlockH; -int indexHgX, indexHgY, indexOut, indexTmp; -uint16_t tmpBuffer[16]; /* B44 use 4x4 half float pixel */ +int stay_to_uncompress = compressed_size; +int nb_b44_block_w, nb_b44_block_h; +int index_tl_x, index_tl_y, index_out, index_tmp; +uint16_t tmp_buffer[16]; /* B44 use 4x4 half float pixel */ int c, iY, iX, y, x; int target_channel_offset = 0; /* calc B44 block count */ -nbB44BlockW = td->xsize / 4; +nb_b44_block_w = td->xsize / 4; if ((td->xsize % 4) != 0) -nbB44BlockW++; +nb_b44_block_w++; -nbB44BlockH = td->ysize / 4; +nb_b44_block_h = td->ysize / 4; if ((td->ysize % 4) != 0) -nbB44BlockH++; +nb_b44_block_h++; for (c = 0; c < s->nb_channels; c++) { if (s->channels[c].pixel_type == EXR_HALF) {/* B44 only compress half float data */ -for (iY = 0; iY < nbB44BlockH; iY++) { -for (iX = 0; iX < nbB44BlockW; iX++) {/* For each B44 block */ -if (stayToUncompress < 3) { -av_log(s, AV_LOG_ERROR, "Not enough data for B44A block: %d", stayToUncompress); +for (iY = 0; iY < nb_b44_block_h; iY++) { +for (iX = 0; iX < nb_b44_block_w; iX++) {/* For each B44 block */ +if (stay_to_uncompress < 3) { +av_log(s, AV_LOG_ERROR, "Not enough data for B44A block: %d", stay_to_uncompress); return AVERROR_INVALIDDATA; } -if (src[compressed_size - stayToUncompress + 2] == 0xfc) { /* B44A block */ -unpack_3(sr, tmpBuffer); +if (src[compressed_size - stay_to_uncompress + 2] == 0xfc) { /* B44A block */ +unpack_3(sr, tmp_buffer); sr += 3; -stayToUncompress -= 3; +stay_to_uncompress -= 3; } else {/* B44 Block */ -if (stayToUncompress < 14) { -av_log(s, AV_LOG_ERROR, "Not enough data for B44 block: %d", stayToUncompress); +if (stay_to_uncompress < 14) { +av_log(s, AV_LOG_ERROR, "Not enough data for B44 block: %d", stay_to_uncompress); return AVERROR_INVALIDDATA; } -unpack_14(sr, tmpBuffer); +unpack_14(sr, tmp_buffer); sr += 14; -stayToUncompress -= 14; +stay_to_uncompress -= 14; } /* copy data to uncompress buffer (B44 block can exceed target resolution)*/ -indexHgX = iX * 4; -indexHgY = iY * 4; - -for (y = indexHgY; y < FFMIN(indexHgY + 4, td->ysize); y++) { -for (x = indexHgX; x < FFMIN(indexHgX + 4, td->xsize); x++) { -indexOut = target_channel_offset * td->xsize + y * td->channel_line_size + 2 * x; -indexTmp = (y-indexHgY) * 4 + (x-indexHgX); -td->uncompressed_data[indexOut] = tmpBuffer[indexTmp] & 0xff; -td->uncompressed_data[indexOut + 1] = tmpBuffer[indexTmp] >> 8; +index_tl_x = iX * 4; +index_tl_y = iY * 4; + +for (y = index_tl_y; y < FFMIN(index_tl_y + 4, td->ysize); y++) { +for (x = index_tl_x; x < FFMIN(index_tl_x + 4, td->xsize); x++) { +index_out = target_channel_offset * td->xsize + y * td->channel_line_size + 2 * x; +index_tmp = (y-index_tl_y) * 4 + (x-index_tl_x); +td->uncompressed_d
[FFmpeg-devel] libavcodec/webp : fix return code check in lossy decoding
Hello, in attach patch to fix ret code check in webp lossy decoding (when files have alpha) before this patch, if an error occured during rgb decoding the return code was ignored. And a useless ret test was made after alpha decoding. after this patch, the return code of rgb is test before trying to decode alpha. Comments welcome Martin Jokyo Images From 4b7a1b3c03ec1a9062d3100d79668d905f6226fe Mon Sep 17 00:00:00 2001 From: Martin Vignali Date: Sun, 26 Jun 2016 22:36:23 +0200 Subject: [PATCH] libavcodec/webp : fix return code check in lossy decoding before this patch, if an error occured during rgb decoding the return code was ignored. And an useless ret test was made after alpha decoding. after this patch, the return code of rgb is test before trying to decode alpha. --- libavcodec/webp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index e715c4b..b119d8a 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -1342,10 +1342,10 @@ static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p, ret = ff_vp8_decode_frame(avctx, p, got_frame, &pkt); if (s->has_alpha) { -ret = vp8_lossy_decode_alpha(avctx, p, s->alpha_data, - s->alpha_data_size); if (ret < 0) return ret; +ret = vp8_lossy_decode_alpha(avctx, p, s->alpha_data, + s->alpha_data_size); } return ret; } -- 1.9.3 (Apple Git-50) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [FFmpeg-cvslog] lavd/decklink: Fix compile issue on OS X
> On Jun 26, 2016, at 4:10 PM, James Almer wrote: > > On 6/23/2016 8:08 PM, Rick Kern wrote: >> Fixes #4124: Invalid argument '-std=c99' not allowed with 'C++/ObjC++' >> C++ files fail to compile. This adds '-std=c++11' to CXX_FLAGS to fix. >> >> Signed-off-by: Rick Kern >> --- >> common.mak | 2 +- >> configure | 1 + >> 2 files changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/common.mak b/common.mak >> index 59b039f..3f2096d 100644 >> --- a/common.mak >> +++ b/common.mak >> @@ -39,7 +39,7 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) >> OBJCFLAGS += $(EOBJCFLAGS) >> OBJCCFLAGS = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS) >> ASFLAGS:= $(CPPFLAGS) $(ASFLAGS) >> -CXXFLAGS += $(CPPFLAGS) $(CFLAGS) >> +CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) >> YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm >> >> HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) >> diff --git a/configure b/configure >> index 94a0a6c..3787894 100755 >> --- a/configure >> +++ b/configure >> @@ -4519,6 +4519,7 @@ fi >> >> add_cppflags -D_ISOC99_SOURCE >> add_cxxflags -D__STDC_CONSTANT_MACROS >> +add_cxxflags -std=c++11 > > Is the c++ code in our tree actually c++11? Or just standard c++98? The > -std=c++11 > option is relatively recent. Very old compilers may not recognize it. > > If it is, then you should check if it's supported using check_cxxflags(), > then try the > same with c++0x (the original value for the standard back when it was planned > to > be finished in the last decade, and a compatibility alias for c++11 on newer > compilers). If neither work then configure should abort. > > If it's not, then change it to use c++98. Ok, submitted a patch to use c++98. It’s simple, but can you take a look to make sure we’re on the same wavelength? > >> check_cflags -std=c99 >> check_cc -D_FILE_OFFSET_BITS=64 <> #include >> > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
Use c++98 standard instead of c++11. Signed-off-by: Rick Kern --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 19aea61..76d2d27 100755 --- a/configure +++ b/configure @@ -4529,7 +4529,7 @@ fi add_cppflags -D_ISOC99_SOURCE add_cxxflags -D__STDC_CONSTANT_MACROS -add_cxxflags -std=c++11 +add_cxxflags -std=c++98 check_cflags -std=c99 check_cc -D_FILE_OFFSET_BITS=64 < -- 2.9.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/mov: parse rtmd track timecode
On 6/25/16, Paul B Mahol wrote: > On 6/25/16, Clement Boesch wrote: >> On Sat, Jun 25, 2016 at 11:36:05AM +0200, Paul B Mahol wrote: >>> Hi, >>> >>> patch attached. >> >>> From fbf2d600e048a417183ab32fdb2e7e2bcf238071 Mon Sep 17 00:00:00 2001 >>> From: Paul B Mahol >>> Date: Sat, 25 Jun 2016 11:33:46 +0200 >>> Subject: [PATCH] avformat/mov: parse rtmd track timecode >>> >>> Signed-off-by: Paul B Mahol >>> --- >>> libavformat/mov.c | 30 +- >>> 1 file changed, 29 insertions(+), 1 deletion(-) >>> >>> diff --git a/libavformat/mov.c b/libavformat/mov.c >>> index d75605d..34ce246 100644 >>> --- a/libavformat/mov.c >>> +++ b/libavformat/mov.c >>> @@ -4674,6 +4674,31 @@ static int >>> parse_timecode_in_framenum_format(AVFormatContext *s, AVStream *st, >>> return 0; >>> } >>> >>> +static int mov_read_rtmd_track(AVFormatContext *s, AVStream *st) >>> +{ >>> +MOVStreamContext *sc = st->priv_data; >>> +char buf[AV_TIMECODE_STR_SIZE]; >>> +int64_t cur_pos = avio_tell(sc->pb); >>> +int dd, hh, mm, ss; >>> + >>> +if (!st->nb_index_entries) >>> +return -1; >>> + >>> +avio_seek(sc->pb, st->index_entries->pos, SEEK_SET); >>> +avio_skip(s->pb, 13); >>> +dd = avio_r8(s->pb); >>> +hh = avio_r8(s->pb); >>> +mm = avio_r8(s->pb); >> >>> +avio_skip(s->pb, 1); >> >> isn't this the drop flag? if so you should probably honor it as as ';' in >> the timecode string > > Fixed locally. Will apply, if nobody is against. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: > Use c++98 standard instead of c++11. > > Signed-off-by: Rick Kern > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 19aea61..76d2d27 100755 > --- a/configure > +++ b/configure > @@ -4529,7 +4529,7 @@ fi > > add_cppflags -D_ISOC99_SOURCE > add_cxxflags -D__STDC_CONSTANT_MACROS > -add_cxxflags -std=c++11 > +add_cxxflags -std=c++98 should this not be check_cxxflags ? [...] -- 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] configure: use c++98 for c++ files
> On Jun 26, 2016, at 5:10 PM, Michael Niedermayer > wrote: > > On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: >> Use c++98 standard instead of c++11. >> >> Signed-off-by: Rick Kern >> --- >> configure | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index 19aea61..76d2d27 100755 >> --- a/configure >> +++ b/configure >> @@ -4529,7 +4529,7 @@ fi >> >> add_cppflags -D_ISOC99_SOURCE >> add_cxxflags -D__STDC_CONSTANT_MACROS >> -add_cxxflags -std=c++11 >> +add_cxxflags -std=c++98 > > should this not be check_cxxflags ? Some c++ standard needs to be there to override the -std=c99 that gets pulled in from CFLAGS. > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Democracy is the form of government in which you can choose your dictator > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
On Sun, Jun 26, 2016 at 11:10:00PM +0200, Michael Niedermayer wrote: > On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: > > Use c++98 standard instead of c++11. > > > > Signed-off-by: Rick Kern > > --- > > configure | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/configure b/configure > > index 19aea61..76d2d27 100755 > > --- a/configure > > +++ b/configure > > @@ -4529,7 +4529,7 @@ fi > > > > add_cppflags -D_ISOC99_SOURCE > > add_cxxflags -D__STDC_CONSTANT_MACROS > > -add_cxxflags -std=c++11 > > +add_cxxflags -std=c++98 > > should this not be check_cxxflags ? either way add_cxxflags -std=c++98 is better than before, so ill apply and backport your patch unless you are quicker [...] -- 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
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
On Sun, Jun 26, 2016 at 05:22:01PM -0400, Richard Kern wrote: > > > On Jun 26, 2016, at 5:10 PM, Michael Niedermayer > > wrote: > > > > On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: > >> Use c++98 standard instead of c++11. > >> > >> Signed-off-by: Rick Kern > >> --- > >> configure | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/configure b/configure > >> index 19aea61..76d2d27 100755 > >> --- a/configure > >> +++ b/configure > >> @@ -4529,7 +4529,7 @@ fi > >> > >> add_cppflags -D_ISOC99_SOURCE > >> add_cxxflags -D__STDC_CONSTANT_MACROS > >> -add_cxxflags -std=c++11 > >> +add_cxxflags -std=c++98 > > > > should this not be check_cxxflags ? > > Some c++ standard needs to be there to override the -std=c99 that gets pulled > in from CFLAGS. but does every compiler support -stc=... ? if one doesnt the c99 case would not have been added [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship: All citizens are under surveillance, all their steps and actions recorded, for the politicians to enforce control. Democracy: All politicians are under surveillance, all their steps and actions recorded, for the citizens to enforce control. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
> On Jun 26, 2016, at 5:26 PM, Michael Niedermayer > wrote: > > On Sun, Jun 26, 2016 at 05:22:01PM -0400, Richard Kern wrote: >> >>> On Jun 26, 2016, at 5:10 PM, Michael Niedermayer >>> wrote: >>> >>> On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: Use c++98 standard instead of c++11. Signed-off-by: Rick Kern --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 19aea61..76d2d27 100755 --- a/configure +++ b/configure @@ -4529,7 +4529,7 @@ fi add_cppflags -D_ISOC99_SOURCE add_cxxflags -D__STDC_CONSTANT_MACROS -add_cxxflags -std=c++11 +add_cxxflags -std=c++98 >>> >>> should this not be check_cxxflags ? >> >> Some c++ standard needs to be there to override the -std=c99 that gets >> pulled in from CFLAGS. > > but does every compiler support -stc=... ? > if one doesnt the c99 case would not have been added What about filtering the -std=c99 out of CFLAGS in the CXXFLAGS assignment? > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Dictatorship: All citizens are under surveillance, all their steps and > actions recorded, for the politicians to enforce control. > Democracy: All politicians are under surveillance, all their steps and > actions recorded, for the citizens to enforce control. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
On Sun, Jun 26, 2016 at 05:44:11PM -0400, Richard Kern wrote: > > > On Jun 26, 2016, at 5:26 PM, Michael Niedermayer > > wrote: > > > > On Sun, Jun 26, 2016 at 05:22:01PM -0400, Richard Kern wrote: > >> > >>> On Jun 26, 2016, at 5:10 PM, Michael Niedermayer > >>> wrote: > >>> > >>> On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: > Use c++98 standard instead of c++11. > > Signed-off-by: Rick Kern > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 19aea61..76d2d27 100755 > --- a/configure > +++ b/configure > @@ -4529,7 +4529,7 @@ fi > > add_cppflags -D_ISOC99_SOURCE > add_cxxflags -D__STDC_CONSTANT_MACROS > -add_cxxflags -std=c++11 > +add_cxxflags -std=c++98 > >>> > >>> should this not be check_cxxflags ? > >> > >> Some c++ standard needs to be there to override the -std=c99 that gets > >> pulled in from CFLAGS. > > > > but does every compiler support -stc=... ? > > if one doesnt the c99 case would not have been added > > What about filtering the -std=c99 out of CFLAGS in the CXXFLAGS assignment? have you confirmed that -std=c99 is the problem ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
> On Jun 26, 2016, at 5:55 PM, Michael Niedermayer > wrote: > > On Sun, Jun 26, 2016 at 05:44:11PM -0400, Richard Kern wrote: >> >>> On Jun 26, 2016, at 5:26 PM, Michael Niedermayer >>> wrote: >>> >>> On Sun, Jun 26, 2016 at 05:22:01PM -0400, Richard Kern wrote: > On Jun 26, 2016, at 5:10 PM, Michael Niedermayer > wrote: > > On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: >> Use c++98 standard instead of c++11. >> >> Signed-off-by: Rick Kern >> --- >> configure | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index 19aea61..76d2d27 100755 >> --- a/configure >> +++ b/configure >> @@ -4529,7 +4529,7 @@ fi >> >> add_cppflags -D_ISOC99_SOURCE >> add_cxxflags -D__STDC_CONSTANT_MACROS >> -add_cxxflags -std=c++11 >> +add_cxxflags -std=c++98 > > should this not be check_cxxflags ? Some c++ standard needs to be there to override the -std=c99 that gets pulled in from CFLAGS. >>> >>> but does every compiler support -stc=... ? >>> if one doesnt the c99 case would not have been added >> >> What about filtering the -std=c99 out of CFLAGS in the CXXFLAGS assignment? > > have you confirmed that -std=c99 is the problem ? Yes, it dies at: error: invalid argument '-std=c99' not allowed with 'C++/ObjC++' make: *** [libavdevice/decklink_common.o] Error 1 > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > No snowflake in an avalanche ever feels responsible. -- Voltaire > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
On Sun, Jun 26, 2016 at 06:00:41PM -0400, Richard Kern wrote: > > > On Jun 26, 2016, at 5:55 PM, Michael Niedermayer > > wrote: > > > > On Sun, Jun 26, 2016 at 05:44:11PM -0400, Richard Kern wrote: > >> > >>> On Jun 26, 2016, at 5:26 PM, Michael Niedermayer > >>> wrote: > >>> > >>> On Sun, Jun 26, 2016 at 05:22:01PM -0400, Richard Kern wrote: > > > On Jun 26, 2016, at 5:10 PM, Michael Niedermayer > > wrote: > > > > On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: > >> Use c++98 standard instead of c++11. > >> > >> Signed-off-by: Rick Kern > >> --- > >> configure | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/configure b/configure > >> index 19aea61..76d2d27 100755 > >> --- a/configure > >> +++ b/configure > >> @@ -4529,7 +4529,7 @@ fi > >> > >> add_cppflags -D_ISOC99_SOURCE > >> add_cxxflags -D__STDC_CONSTANT_MACROS > >> -add_cxxflags -std=c++11 > >> +add_cxxflags -std=c++98 > > > > should this not be check_cxxflags ? > > Some c++ standard needs to be there to override the -std=c99 that gets > pulled in from CFLAGS. > >>> > >>> but does every compiler support -stc=... ? > >>> if one doesnt the c99 case would not have been added > >> > >> What about filtering the -std=c99 out of CFLAGS in the CXXFLAGS assignment? > > > > have you confirmed that -std=c99 is the problem ? > > Yes, it dies at: > error: invalid argument '-std=c99' not allowed with 'C++/ObjC++' > make: *** [libavdevice/decklink_common.o] Error 1 why does this happen now and not before ? and what compiler is that ? does it work when its filtered out ? if so i guess, please do that [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: use c++98 for c++ files
> On Jun 26, 2016, at 6:20 PM, Michael Niedermayer > wrote: > > On Sun, Jun 26, 2016 at 06:00:41PM -0400, Richard Kern wrote: >> >>> On Jun 26, 2016, at 5:55 PM, Michael Niedermayer >>> wrote: >>> >>> On Sun, Jun 26, 2016 at 05:44:11PM -0400, Richard Kern wrote: > On Jun 26, 2016, at 5:26 PM, Michael Niedermayer > wrote: > > On Sun, Jun 26, 2016 at 05:22:01PM -0400, Richard Kern wrote: >> >>> On Jun 26, 2016, at 5:10 PM, Michael Niedermayer >>> wrote: >>> >>> On Sun, Jun 26, 2016 at 04:44:40PM -0400, Rick Kern wrote: Use c++98 standard instead of c++11. Signed-off-by: Rick Kern --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 19aea61..76d2d27 100755 --- a/configure +++ b/configure @@ -4529,7 +4529,7 @@ fi add_cppflags -D_ISOC99_SOURCE add_cxxflags -D__STDC_CONSTANT_MACROS -add_cxxflags -std=c++11 +add_cxxflags -std=c++98 >>> >>> should this not be check_cxxflags ? >> >> Some c++ standard needs to be there to override the -std=c99 that gets >> pulled in from CFLAGS. > > but does every compiler support -stc=... ? > if one doesnt the c99 case would not have been added What about filtering the -std=c99 out of CFLAGS in the CXXFLAGS assignment? >>> >>> have you confirmed that -std=c99 is the problem ? >> >> Yes, it dies at: >> error: invalid argument '-std=c99' not allowed with 'C++/ObjC++' >> make: *** [libavdevice/decklink_common.o] Error 1 > > why does this happen now and not before ? It’s a warning on other compilers, but it’s been an issue on OS X for a while (was reported in late 2014). > and what compiler is that ? clang > does it work when its filtered out ? yes - I’ll submit a patch shortly. > if so i guess, please do that > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Avoid a single point of failure, be that a person or equipment. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] ffmpeg_vdpau: Re-add ability to ignore level check
On Tue, Jun 07, 2016 at 07:51:18PM +0100, Mark Thompson wrote: > Fixes ticket 5286. > > Uses the global -hwaccel_lax_profile_check option (may be misnamed > for this purpose, but it has the right spirit). > --- > Only compile tested (no hardware). > > Maybe -hwaccel_lax_profile_check should be renamed to something a bit more > general - it was named for the specific VAAPI case, but this is really the > same type of issue. (-hwaccel_ignore_capabilities or something like that?) > > ffmpeg_vdpau.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) is anyone against applying this ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avdevice/decklink: fix mingw portability
Signed-off-by: Marton Balint --- libavdevice/decklink_common.cpp | 7 +-- libavdevice/decklink_common.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 3625673..bd5ab91 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -70,6 +70,7 @@ static char *dup_wchar_to_utf8(wchar_t *w) #define DECKLINK_STROLECHAR * #define DECKLINK_STRDUP dup_wchar_to_utf8 #define DECKLINK_FREE(s) SysFreeString(s) +#define DECKLINK_BOOL BOOL #elif defined(__APPLE__) static char *dup_cfstring_to_utf8(CFStringRef w) { @@ -80,11 +81,13 @@ static char *dup_cfstring_to_utf8(CFStringRef w) #define DECKLINK_STRconst __CFString * #define DECKLINK_STRDUP dup_cfstring_to_utf8 #define DECKLINK_FREE(s) free((void *) s) +#define DECKLINK_BOOL bool #else #define DECKLINK_STRconst char * #define DECKLINK_STRDUP av_strdup /* free() is needed for a string returned by the DeckLink SDL. */ #define DECKLINK_FREE(s) free((void *) s) +#define DECKLINK_BOOL bool #endif HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) @@ -103,7 +106,7 @@ static int decklink_select_input(AVFormatContext *avctx, BMDDeckLinkConfiguratio struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; BMDDeckLinkAttributeID attr_id = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? BMDDeckLinkAudioInputConnections : BMDDeckLinkVideoInputConnections; -int64_t bmd_input = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? ctx->audio_input : ctx->video_input; +int64_t bmd_input = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? (int64_t)ctx->audio_input : (int64_t)ctx->video_input; const char *type_name = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? "audio" : "video"; int64_t supported_connections = 0; HRESULT res; @@ -141,7 +144,7 @@ int ff_decklink_set_format(AVFormatContext *avctx, HRESULT res; if (ctx->duplex_mode) { -bool duplex_supported = false; +DECKLINK_BOOL duplex_supported = false; if (ctx->attr->GetFlag(BMDDeckLinkSupportsDuplexModeConfiguration, &duplex_supported) != S_OK) duplex_supported = false; diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index a4ac303..d2d0ab2 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -107,7 +107,7 @@ typedef uint32_t buffercount_type; #endif static const BMDAudioConnection decklink_audio_connection_map[] = { -0, +(BMDAudioConnection)0, bmdAudioConnectionEmbedded, bmdAudioConnectionAESEBU, bmdAudioConnectionAnalog, @@ -117,7 +117,7 @@ static const BMDAudioConnection decklink_audio_connection_map[] = { }; static const BMDVideoConnection decklink_video_connection_map[] = { -0, +(BMDVideoConnection)0, bmdVideoConnectionSDI, bmdVideoConnectionHDMI, bmdVideoConnectionOpticalSDI, -- 2.6.6 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] configure: remove -std= from c++ compilation
Pulling -std=c99 into CXXFLAGS from CFLAGS causes a compile error with c++ files using clang on OS X. Adding -std=c++98 unconditionally to CXXFLAGS will generate a compile error on compilers that don't support the -std option. It works but is less readable if -std=c++98 is appended after -std=c99 when the -std option is supported. Signed-off-by: Rick Kern --- common.mak | 2 +- configure | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/common.mak b/common.mak index 3f2096d..c4ab049 100644 --- a/common.mak +++ b/common.mak @@ -39,7 +39,7 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) OBJCFLAGS += $(EOBJCFLAGS) OBJCCFLAGS = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS) ASFLAGS:= $(CPPFLAGS) $(ASFLAGS) -CXXFLAGS := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) +CXXFLAGS := $(CPPFLAGS) $(patsubst -std=%,,$(CFLAGS)) $(CXXFLAGS) YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) diff --git a/configure b/configure index 76d2d27..901df6c 100755 --- a/configure +++ b/configure @@ -4529,7 +4529,6 @@ fi add_cppflags -D_ISOC99_SOURCE add_cxxflags -D__STDC_CONSTANT_MACROS -add_cxxflags -std=c++98 check_cflags -std=c99 check_cc -D_FILE_OFFSET_BITS=64 < -- 2.9.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdevice/decklink: fix mingw portability
On Mon, Jun 27, 2016 at 01:15:45AM +0200, Marton Balint wrote: > Signed-off-by: Marton Balint > --- > libavdevice/decklink_common.cpp | 7 +-- > libavdevice/decklink_common.h | 4 ++-- > 2 files changed, 7 insertions(+), 4 deletions(-) i can confirm that fixes the build issue [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdevice/decklink: fix mingw portability
On Mon, Jun 27, 2016 at 01:15:45AM +0200, Marton Balint wrote: > Signed-off-by: Marton Balint > --- > libavdevice/decklink_common.cpp | 7 +-- > libavdevice/decklink_common.h | 4 ++-- > 2 files changed, 7 insertions(+), 4 deletions(-) note, the commit that caused this is just in master, not the release so it should not be affected and not need this unles the bug is backported [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libopusenc: Add channel mapping family argument
Michael, Thanks for your comments. On Sat, Jun 25, 2016 at 4:28 AM, Michael Niedermayer wrote: > yes, rereading this a bit > can you explain what is the difference between the mapping familiy > and he channel_layout we have ? The Opus channel mapping family and FFmpeg channel layout both provide a mapping between stream position and semantic meaning. That is, they both answer the question "What does the channel at position k in the stream contain?" The two parameters are both defined by explicitly enumerating acceptable possibilities. There are some channel mappings which are defined by Opus but are not defined by FFmpeg. Likewise, there are channel mappings defined by FFmpeg which are not defined by Opus. Because of the differences, there is no unambiguous 1:1 correspondence between Opus channel mapping family and FFmpeg channel_layout. For example, FFmpeg has no way of specifying "channel k is an SN3D normalized ambisonic channel kth in ACN order". Opus does (or soon will) have a way of specifying that, namely mapping_family==2. > if the channel_layout is not set its undefined, if its set it should > be correct > why do you need this additional user parameter ? The additional parameter is necessary to disambiguate between multiple cases which are all unknown to FFmpeg. For example, there is no way for FFmpeg to differentiate between inputs which consist of Ambisonics and inputs which have truly no semantic meaning. These two cases are differentiated by Opus, with mapping_family 2 and 255 respectively. Also the way this patch is written, mapping_family==-1 preserves existing FFmpeg behavior while mapping_family==1 does not. Although both values indicate the same semantic channel meanings, the latter configures libopus to use surround masking, which is a potentially quality-degrading change from current behavior. That is why I did not change default behavior with this patch. -- Thanks, Michael Graczyk ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdevice/decklink: fix mingw portability
On Mon, 27 Jun 2016, Michael Niedermayer wrote: On Mon, Jun 27, 2016 at 01:15:45AM +0200, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_common.cpp | 7 +-- libavdevice/decklink_common.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) i can confirm that fixes the build issue Thanks, I have applied the fix. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v3] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes
decklink_common.cpp includes a .cpp file from the DeckLink API which fails to build because there are non-static functions in the included .cpp file. This disables the missing-prototypes error so the file can be included. Signed-off-by: Rick Kern --- libavdevice/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 585827b..e281825 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -19,6 +19,8 @@ OBJS-$(CONFIG_BKTR_INDEV)+= bktr.o OBJS-$(CONFIG_CACA_OUTDEV) += caca.o OBJS-$(CONFIG_DECKLINK_OUTDEV) += decklink_enc.o decklink_enc_c.o decklink_common.o OBJS-$(CONFIG_DECKLINK_INDEV)+= decklink_dec.o decklink_dec_c.o decklink_common.o +$(SUBDIR)decklink_common.o: CXXFLAGS += -Wno-error=missing-prototypes + OBJS-$(CONFIG_DSHOW_INDEV) += dshow_crossbar.o dshow.o dshow_enummediatypes.o \ dshow_enumpins.o dshow_filter.o \ dshow_pin.o dshow_common.o -- 2.9.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] release/3.1
On Sun, Jun 26, 2016 at 03:36:33AM +0200, Michael Niedermayer wrote: > Hi all > > ive branched release/3.1 off from master > i will make the 3.1 release from HEAD of this branch tomorrow > If there are any last minute changes that should go in, thats your > very last chance to put them in ! 3.1 release made 3.1.1 will be made from release/3.1 in 1-2 weeks probably, please backport all clean bugfixes which affect 3.1 thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- 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 v2] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes
> On Jun 25, 2016, at 3:16 PM, Michael Niedermayer > wrote: > > On Sat, Jun 25, 2016 at 05:29:56PM +, Carl Eugen Hoyos wrote: >> Michael Niedermayer niedermayer.cc> writes: >> >>> why does this happen ? >> >> I thought it happens because FFmpeg include third-party >> files that do not copmile with error=missing-prototypes. > > but why should they build with random "warning are error" flags ? > one cannot write headers that are guranteed to never trigger a warning > on any compiler. > and if one cannot and does not, -Werror* could not work unless it > has an exception for system / 3rd party stuff The error is being thrown when the location of the decklink headers being pulled in as user includes with -I. Clang doesn’t support -i, and I couldn’t find an equivalent option to include as system headers. Am I missing something? > > also see: > > http://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers > http://stackoverflow.com/questions/3308523/how-to-eliminate-external-lib-third-party-warnings-in-gcc > > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Republics decline into democracies and democracies degenerate into > despotisms. -- Aristotle > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v3] lavd/decklink_common: Fix error caused by -Werror=missing-prototypes
could you post a copy of the compile failure for reference? On 6/26/16, Rick Kern wrote: > decklink_common.cpp includes a .cpp file from the DeckLink API which fails > to build because there are non-static functions in the included .cpp file. > This disables the missing-prototypes error so the file can be included. > > Signed-off-by: Rick Kern > --- > libavdevice/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavdevice/Makefile b/libavdevice/Makefile > index 585827b..e281825 100644 > --- a/libavdevice/Makefile > +++ b/libavdevice/Makefile > @@ -19,6 +19,8 @@ OBJS-$(CONFIG_BKTR_INDEV)+= bktr.o > OBJS-$(CONFIG_CACA_OUTDEV) += caca.o > OBJS-$(CONFIG_DECKLINK_OUTDEV) += decklink_enc.o decklink_enc_c.o > decklink_common.o > OBJS-$(CONFIG_DECKLINK_INDEV)+= decklink_dec.o decklink_dec_c.o > decklink_common.o > +$(SUBDIR)decklink_common.o: CXXFLAGS += -Wno-error=missing-prototypes > + > OBJS-$(CONFIG_DSHOW_INDEV) += dshow_crossbar.o dshow.o > dshow_enummediatypes.o \ > dshow_enumpins.o dshow_filter.o > \ > dshow_pin.o dshow_common.o > -- > 2.9.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avdevice/decklink: fix mingw portability
patch accepted, please apply. On 27.06.16 01:15, Marton Balint wrote: Signed-off-by: Marton Balint --- libavdevice/decklink_common.cpp | 7 +-- libavdevice/decklink_common.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 3625673..bd5ab91 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -70,6 +70,7 @@ static char *dup_wchar_to_utf8(wchar_t *w) #define DECKLINK_STROLECHAR * #define DECKLINK_STRDUP dup_wchar_to_utf8 #define DECKLINK_FREE(s) SysFreeString(s) +#define DECKLINK_BOOL BOOL #elif defined(__APPLE__) static char *dup_cfstring_to_utf8(CFStringRef w) { @@ -80,11 +81,13 @@ static char *dup_cfstring_to_utf8(CFStringRef w) #define DECKLINK_STRconst __CFString * #define DECKLINK_STRDUP dup_cfstring_to_utf8 #define DECKLINK_FREE(s) free((void *) s) +#define DECKLINK_BOOL bool #else #define DECKLINK_STRconst char * #define DECKLINK_STRDUP av_strdup /* free() is needed for a string returned by the DeckLink SDL. */ #define DECKLINK_FREE(s) free((void *) s) +#define DECKLINK_BOOL bool #endif HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) @@ -103,7 +106,7 @@ static int decklink_select_input(AVFormatContext *avctx, BMDDeckLinkConfiguratio struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data; struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; BMDDeckLinkAttributeID attr_id = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? BMDDeckLinkAudioInputConnections : BMDDeckLinkVideoInputConnections; -int64_t bmd_input = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? ctx->audio_input : ctx->video_input; +int64_t bmd_input = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? (int64_t)ctx->audio_input : (int64_t)ctx->video_input; const char *type_name = (cfg_id == bmdDeckLinkConfigAudioInputConnection) ? "audio" : "video"; int64_t supported_connections = 0; HRESULT res; @@ -141,7 +144,7 @@ int ff_decklink_set_format(AVFormatContext *avctx, HRESULT res; if (ctx->duplex_mode) { -bool duplex_supported = false; +DECKLINK_BOOL duplex_supported = false; if (ctx->attr->GetFlag(BMDDeckLinkSupportsDuplexModeConfiguration, &duplex_supported) != S_OK) duplex_supported = false; diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index a4ac303..d2d0ab2 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -107,7 +107,7 @@ typedef uint32_t buffercount_type; #endif static const BMDAudioConnection decklink_audio_connection_map[] = { -0, +(BMDAudioConnection)0, bmdAudioConnectionEmbedded, bmdAudioConnectionAESEBU, bmdAudioConnectionAnalog, @@ -117,7 +117,7 @@ static const BMDAudioConnection decklink_audio_connection_map[] = { }; static const BMDVideoConnection decklink_video_connection_map[] = { -0, +(BMDVideoConnection)0, bmdVideoConnectionSDI, bmdVideoConnectionHDMI, bmdVideoConnectionOpticalSDI, ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel