Re: [FFmpeg-devel] Hardware purchase request
> -Original Message- > From: ffmpeg-devel On Behalf Of > Lynne > Sent: Samstag, 26. Juni 2021 08:25 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] Hardware purchase request > > Jun 26, 2021, 02:19 by softwo...@hotmail.com: > > > > > > >> -Original Message- > >> From: ffmpeg-devel On Behalf Of > >> Lynne > >> Sent: Samstag, 26. Juni 2021 01:29 > >> To: FFmpeg development discussions and patches >> de...@ffmpeg.org> > >> Subject: Re: [FFmpeg-devel] Hardware purchase request > >> > >> Jun 25, 2021, 13:25 by t...@rothenpieler.org: > >> > >> > On 25.06.2021 10:14, Lynne wrote: > >> > > >> >> The prices have dropped a little, but the biggest difference is > >> >> that stuff is *actually* available now. > >> >> > >> >> Unfortunately, now is not a good time to build an entire system. > >> >> Socket AM4's finished, so if I build an AMD system, it'll be > >> >> obsolete within a year or so, and it'll be non-upgradable. > >> >> Intel's Rocket Lake was such a giant slow flop, and its socket is > >> >> also getting obsoleted by Intel once Alder Lake gets released > >> >> later this year, and it doesn't support DDR5 anyway. And again, > >> >> Rocket Lake was such a giant mess. > >> >> > >> > > >> > I don't think waiting for AM5 and DDR5 is worth it at the moment. > >> > You'll be early-adopting a platform, which is always a bit iffy. > >> > > >> > >> I don't mind being an early adopter, and I think I'll be getting that > >> hardware on my own. > >> > >> > >> > Do you really need a 6900XT? Every review I saw of those commented > >> > on > >> their horrible price/performance ratio. Similarly overpriced as the > RTX3090. > >> > > >> > Would a 6800XT not work fine as well? > >> > > >> > >> I also want to work on neural networks, since it seems to be the > >> direction into which codecs and filters are going, and for that, I'll > >> need lots of RAM and power. > >> And I'd rather not have to update anytime soon. > >> Here, a 6800XT is less than 200 Euros cheaper than a 6900XT, which > >> for a 1600 Euro GPU isn't all that much. > >> > >> > >> > Or maybe a combination of two smaller cards, like one RTX3070 and > >> > one > >> 6700XT, so you can test against both targets? Which would combined > >> still be cheaper than a single 6900XT. > >> > > >> > >> Not buying Nvidia unless its free, and happily sits gathering dust > >> 99% of the time in a different system in another room that serves no > >> other purpose to me but to test Nvidia cards. > >> > > > > Wouldn't those 1% be a high value for the project? > > (probably a cheap low-end boards would suffice for that as a 2nd gpu) > > > If I do need one, I'll try to grab one broken with one of its regs blown. > They have the value of a brick since they don't work, but if you just desolder > the blown reg, it'll work just fine with the rest. They overspec them. > Speaking from experience. > I have a 960M and it's a struggle to get it to work at all, and it gets > broken by > updates all the time. The relation between "high-end-system" on one side and "soldering around on a defective Nvidia board" for Nvidia testing on the other side appears to be somewhat extreme. Given the total amount, adding a low-end Nvidia board wouldn't probably matter. The justification of expense is none-of-my-business. But I value your Vulkan contributions and think it would be nice when you would be able to _easily_ test on Nvidia (e.g. without soldering ;-) sw > > > >> happy sitting gathering dust because you constantly have to update > >> drivers, > >> > > You can, but you don't have to. Many updates are primarily game > optimizations. > > > Vulkan gets new extensions very often, and codecs also get updates. > > > >> I'm running out of power outlets, > >> > > At the Fractal Design Ion+ 860W? > > > No, on my wall. > > > >> and I'm not very sure it'll even run fine without a monitor > >> > > It will (like all Nvidia boards) > > > I have a 960M and it's a struggle to get it to work at all, and it gets > broken by > updates all the time. I get that it's an Optimus system, but apart from its > weird display plumbing, it just appears as an ordinary Nvidia card on a PCIe > interface. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org > with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] Any feedback on my Patch and Docs and Regression tested patch for strftime filenames
Hi 13 days ago I posted patches, documentation changes and confirmed regression tests for changes to Image2 and Segment outputs to create the output subdirectories on demand, in exactly the same way the HLS output code works. To recap, Image2, HLS and Segment outputs support files with Time/Date in the filename (video_file_%H_M_%S.mp4) to create a file with the Hours/Mins/Seconds in the filename. However only HLS had the extra -strftime_mmkdir to create subdirectories on the fly. This allows you to use %Y-%m-%D (year month day) in the file path to organise images and segments into sub-directories instead of throwing them all into one directory and then moving the files around later. Could I have some feedback please? (even if it is to say you don't want to add this to ffmpeg so won't process it - that's no big deal) https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210613062907.709-1-opens ou...@rjh.org.uk/ Thanks Roger Hardiman opensou...@rjh.org.uk Developer/Maintainer of SharpRTSP C# RTSP Stack. Yellowstone NodeJS RTSP Client Library RPOS - Raspberry PI ONVF Server Stack ONVIF AuditTool Node-ONVIF library CCTV PTZ Protocol Decoder Tools ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] mxfdec.c: prefer metadata from Footer
In case there is a Footer, regarding to SMPTE 377 all versions, the metadata in Footer shall be correct (where in Header it can be incomplete).. If there is no footer (stream, truncated...) it will still work as usual. Tested with a huge set of files and compared old/new ffprobes, it will not change lots of metadata, mainly duration and in some cases start timecode. Without this change, especially Duration would be often inaccurate because it is unknown in header and calculated from bitrate. The new sample files should be added to \fate-suite\mxf, as i do not have an account to upload the files, i shared them on wetransfer: https://we.tl/t-MVmyG2mZHq omneon_6.4.1.0.1_xdcam_truncated.mxf An original Omneon File from an older Version, file is truncated. It shall prove that Metadata is being parsed even when there is no Footer. omneon_8.3.0.0_xdcam_startc_footer.mxf An original Omneon File from a recent Version with "better" Metadata in Footer than in Header. I needed to hexedit this file and set the MP and SP start timecode in header to 0. This test is for proving that metadata from Footer is preferred. --- libavformat/mxfdec.c | 2 +- tests/fate/mxf.mak| 10 + tests/ref/fate/mxf-probe-xdcamhd-oit | 442 ++ tests/ref/fate/mxf-probe-xdcamhd-tcfooter | 442 ++ 4 files changed, 895 insertions(+), 1 deletion(-) create mode 100644 tests/ref/fate/mxf-probe-xdcamhd-oit create mode 100644 tests/ref/fate/mxf-probe-xdcamhd-tcfooter diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 7b40076fb4..a7f552c753 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1402,7 +1402,7 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe if (!strong_ref) return NULL; -for (i = 0; i < mxf->metadata_sets_count; i++) { +for (i = mxf->metadata_sets_count-1; i >= 0; i--) { if (!memcmp(*strong_ref, mxf->metadata_sets[i]->uid, 16) && (type == AnyType || mxf->metadata_sets[i]->type == type)) { return mxf->metadata_sets[i]; diff --git a/tests/fate/mxf.mak b/tests/fate/mxf.mak index 3a1096176f..1b7be46c64 100644 --- a/tests/fate/mxf.mak +++ b/tests/fate/mxf.mak @@ -37,6 +37,16 @@ FATE_MXF_PROBE-$(call ENCDEC2, PRORES, PCM_S24LE, MXF) += fate-mxf-probe-applehd fate-mxf-probe-applehdr10: SRC = $(TARGET_SAMPLES)/mxf/Meridian-Apple_ProResProxy-HDR10.mxf fate-mxf-probe-applehdr10: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" | sed -e "s/yuv422p10../yuv422p10/" +# openincomplete Header, truncated +FATE_MXF_PROBE-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-probe-xdcamhd-oit +fate-mxf-probe-xdcamhd-oit: SRC = $(TARGET_SAMPLES)/mxf/omneon_6.4.1.0.1_xdcam_truncated.mxf +fate-mxf-probe-xdcamhd-oit: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" + +# openincomplete Header, starttc in header 0 but Footer MP 10:11:17:21, SP 10:11:17:17 +FATE_MXF_PROBE-$(call ENCDEC2, MPEG2VIDEO, PCM_S24LE, MXF) += fate-mxf-probe-xdcamhd-tcfooter +fate-mxf-probe-xdcamhd-tcfooter: SRC = $(TARGET_SAMPLES)/mxf/omneon_8.3.0.0_xdcam_startc_footer.mxf +fate-mxf-probe-xdcamhd-tcfooter: CMD = run $(PROBE_FORMAT_STREAMS_COMMAND) -i "$(SRC)" + FATE_MXF_REEL_NAME-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += fate-mxf-reel_name fate-mxf-reel_name: $(SAMPLES)/mxf/Sony-1.mxf fate-mxf-reel_name: CMD = md5 -y -i $(TARGET_SAMPLES)/mxf/Sony-1.mxf -c copy -timecode 00:00:00:00 -metadata "reel_name=test_reel" -fflags +bitexact -f mxf diff --git a/tests/ref/fate/mxf-probe-xdcamhd-oit b/tests/ref/fate/mxf-probe-xdcamhd-oit new file mode 100644 index 00..040a4e0fba --- /dev/null +++ b/tests/ref/fate/mxf-probe-xdcamhd-oit @@ -0,0 +1,442 @@ +[STREAM] +index=0 +codec_name=mpeg2video +profile=0 +codec_type=video +codec_tag_string=[0][0][0][0] +codec_tag=0x +width=1920 +height=1080 +coded_width=0 +coded_height=0 +closed_captions=0 +has_b_frames=1 +sample_aspect_ratio=1:1 +display_aspect_ratio=16:9 +pix_fmt=yuv422p +level=2 +color_range=tv +color_space=unknown +color_transfer=bt709 +color_primaries=unknown +chroma_location=topleft +field_order=tt +refs=1 +id=N/A +r_frame_rate=25/1 +avg_frame_rate=25/1 +time_base=1/25 +start_pts=0 +start_time=0.00 +duration_ts=6 +duration=0.24 +bit_rate=5000 +max_bit_rate=N/A +bits_per_raw_sample=N/A +nb_frames=N/A +nb_read_frames=N/A +nb_read_packets=N/A +DISPOSITION:default=0 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +DISPOSITION:captions=0 +DISPOSITION:descriptions=0 +DISPOSITION:metadata=0 +DISPOSITION:dependent=0 +DISPOSITION:still_image=0 +TAG:file_package_umid=0x060A2B340101010501010D2313003E792039C0579AD9E111BAFB00D028113
[FFmpeg-devel] [PATCH] libaom: Do not use deprecated symbol.
From: lifegpc --- libavcodec/libaomdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c index 6e7324a832..48d1044edf 100644 --- a/libavcodec/libaomdec.c +++ b/libavcodec/libaomdec.c @@ -240,7 +240,7 @@ static av_cold int aom_free(AVCodecContext *avctx) static av_cold int av1_init(AVCodecContext *avctx) { -return aom_init(avctx, &aom_codec_av1_dx_algo); +return aom_init(avctx, aom_codec_av1_dx()); } const AVCodec ff_libaom_av1_decoder = { -- 2.32.0.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] request to remove certain mention of e-book on trac wiki page
I here hereby request that certain e-book is removed from wiki page of FFmpeg. Reason is it uses derogatory text to criticize some FFmpeg components. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Unable to use sqrt() and exp() in CUDA
On 26.06.2021 15:35, Dylan Fernando wrote: I can't seem to be able to use exp() and sqrt() in CUDA. I get: NVCClibavfilter/try_cuda.ptx clang-11: warning: Unknown CUDA version. cuda.h: CUDA_VERSION=11030. Assuming the latest supported version 10.1 [-Wunknown-cuda-version] libavfilter/try_cuda.cu:39:19: error: use of undeclared identifier 'exp' float g = exp(f); Is this using enable-cuda-llvm? If so, you will need to add any new functions to our compat layer in compat/cuda/cuda_runtime.h. Also, where does this cuda.h error come from? Are you including that in your cuda file? If so, don't. It's not license compatible with ffmpeg. For development of filters, I usually use actual CUDA nvcc, since it also supports greater debugging features, and then in the end solve any compatibility issues with a clang build. smime.p7s Description: S/MIME Cryptographic Signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] avformat: add a concat protocol that takes a line break delimited list of resources
Suggested-by: ffm...@fb.com Signed-off-by: James Almer --- Updated documentation, and line breaks can now be part of the filename. doc/protocols.texi | 33 + libavformat/Makefile| 1 + libavformat/concat.c| 146 libavformat/protocols.c | 1 + 4 files changed, 181 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index ccdfb6e439..11de674225 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -215,6 +215,39 @@ ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg Note that you may need to escape the character "|" which is special for many shells. +@section concatf + +Physical concatenation protocol using a line break delimited list of +resources. + +Read and seek from many resources in sequence as if they were +a unique resource. + +A URL accepted by this protocol has the syntax: +@example +concatf:@var{URL} +@end example + +where @var{URL} is the url containing a line break delimited list of +resources to be concatenated, each one possibly specifying a distinct +protocol. + +For example to read a sequence of files @file{split1.mpeg}, +@file{split2.mpeg}, @file{split3.mpeg} listed in separate lines within +a file @file{split.txt} with @command{ffplay} use the command: +@example +ffplay concatf:split.txt +@end example +Where @file{split.txt} contains the lines: +@example +split1.mpeg +split2.mpeg +split3.mpeg +@end example + +Note that if any of the entries in the list contain a line break as part +of their name, you'll need to escape it with a preceding "\" character. + @section crypto AES-encrypted stream reading protocol. diff --git a/libavformat/Makefile b/libavformat/Makefile index c9ef564523..caca95802a 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -616,6 +616,7 @@ OBJS-$(CONFIG_APPLEHTTP_PROTOCOL)+= hlsproto.o OBJS-$(CONFIG_BLURAY_PROTOCOL) += bluray.o OBJS-$(CONFIG_CACHE_PROTOCOL)+= cache.o OBJS-$(CONFIG_CONCAT_PROTOCOL) += concat.o +OBJS-$(CONFIG_CONCATF_PROTOCOL) += concat.o OBJS-$(CONFIG_CRYPTO_PROTOCOL) += crypto.o OBJS-$(CONFIG_DATA_PROTOCOL) += data_uri.o OBJS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpcrypt.o rtmpdigest.o rtmpdh.o diff --git a/libavformat/concat.c b/libavformat/concat.c index 278afd997d..b66e3b9e01 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -22,9 +22,11 @@ */ #include "libavutil/avstring.h" +#include "libavutil/bprint.h" #include "libavutil/mem.h" #include "avformat.h" +#include "avio_internal.h" #include "url.h" #define AV_CAT_SEPARATOR "|" @@ -56,6 +58,7 @@ static av_cold int concat_close(URLContext *h) return err < 0 ? -1 : 0; } +#if CONFIG_CONCAT_PROTOCOL static av_cold int concat_open(URLContext *h, const char *uri, int flags) { char *node_uri = NULL; @@ -124,6 +127,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags) data->total_size = total_size; return err; } +#endif static int concat_read(URLContext *h, unsigned char *buf, int size) { @@ -188,6 +192,7 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence) return result; } +#if CONFIG_CONCAT_PROTOCOL const URLProtocol ff_concat_protocol = { .name = "concat", .url_open = concat_open, @@ -197,3 +202,144 @@ const URLProtocol ff_concat_protocol = { .priv_data_size = sizeof(struct concat_data), .default_whitelist = "concat,file,subfile", }; +#endif + +#if CONFIG_CONCATF_PROTOCOL +// Custom ff_read_line_to_bprint() implementation where line breaks can be +// part of the line being read if escaped. +static int64_t read_line_to_bprint(AVIOContext *s, AVBPrint *bp) +{ +int len, end; +int64_t read = 0; +char tmp[1024]; +char c; + +do { +len = 0; +do { +char escape = c = avio_r8(s); +if (c == '\\') +c = avio_r8(s); +end = (c == '\r' || c == '\n' || c == '\0'); +if (end && escape == '\\') { +if (c != '\0') { +tmp[len++] = c; +end = 0; +} else +tmp[len++] = escape; +} else if (!end) { +if (escape == '\\') { +tmp[len++] = escape; +avio_skip(s, -1); +} else +tmp[len++] = c; +} +} while (!end && len < sizeof(tmp)); +av_bprint_append_data(bp, tmp, len); +read += len; +} while (!end); + +if (c == '\r' && avio_r8(s) != '\n' && !avio_feof(s)) +avio_skip(s, -1); + +if (!c && s->error) +return s->error; + +if (!c && !read && avio_feof(s)) +return AVERROR_EOF; + +return read; +} + +static av_cold int concatf_open(URLContext *h, const char *uri, int flags) +{ +AVBPrint bp; +struct concat_data *data = h->priv_data; +st
Re: [FFmpeg-devel] [PATCH] avformat/http: Stop cookie_dict leaking on errors.
fre 2021-06-11 klockan 09:51 +0200 skrev Robert Bengtsson-Ölund: > On Wed, 2 Jun 2021 at 08:55, Steven Liu wrote: > > LGTM > > > > > > Thanks > > Steven > > Hi everyone > > Am I supposed to do something for this to get applied or is it just a > matter of time until someone picks it up? Passes FATE -> pushed /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] Fix wrong time base in example
Signed-off-by: liudingming --- doc/examples/transcoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index 3a97426e2c..ea6ffefc70 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -171,7 +171,7 @@ static int open_output_file(const char *filename) else enc_ctx->pix_fmt = dec_ctx->pix_fmt; /* video time_base can be set to whatever is handy and supported by encoder */ -enc_ctx->time_base = av_inv_q(dec_ctx->framerate); +enc_ctx->time_base = av_inv_q(av_mul_q(dec_ctx->framerate, (AVRational){dec_ctx->ticks_per_frame, 1})); } else { enc_ctx->sample_rate = dec_ctx->sample_rate; enc_ctx->channel_layout = dec_ctx->channel_layout; -- 2.28.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] av_frame_get_buffer can be used with channels set.
Signed-off-by: liudingming --- libavutil/frame.h | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavutil/frame.h b/libavutil/frame.h index ff2540a20f..40523aff71 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -722,9 +722,16 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src); * Allocate new buffer(s) for audio or video data. * * The following fields must be set on frame before calling this function: - * - format (pixel format for video, sample format for audio) - * - width and height for video - * - nb_samples and channel_layout for audio + * + * Video: + * - format (pixel format) + * - width + * - height + * + * Audio: + * - format (sample format) + * - nb_samples + * - channel_layout or channels * * This function will fill AVFrame.data and AVFrame.buf arrays and, if * necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf. -- 2.28.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avutil/frame: fix av_frame_get_buffer's doc
av_frame_get_buffer can be used with channels set. Signed-off-by: liudingming --- libavutil/frame.h | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libavutil/frame.h b/libavutil/frame.h index ff2540a20f..40523aff71 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -722,9 +722,16 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src); * Allocate new buffer(s) for audio or video data. * * The following fields must be set on frame before calling this function: - * - format (pixel format for video, sample format for audio) - * - width and height for video - * - nb_samples and channel_layout for audio + * + * Video: + * - format (pixel format) + * - width + * - height + * + * Audio: + * - format (sample format) + * - nb_samples + * - channel_layout or channels * * This function will fill AVFrame.data and AVFrame.buf arrays and, if * necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf. -- 2.28.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] doc/examples/transcoding: fix wrong time base
Signed-off-by: liudingming --- doc/examples/transcoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index 3a97426e2c..ea6ffefc70 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -171,7 +171,7 @@ static int open_output_file(const char *filename) else enc_ctx->pix_fmt = dec_ctx->pix_fmt; /* video time_base can be set to whatever is handy and supported by encoder */ -enc_ctx->time_base = av_inv_q(dec_ctx->framerate); +enc_ctx->time_base = av_inv_q(av_mul_q(dec_ctx->framerate, (AVRational){dec_ctx->ticks_per_frame, 1})); } else { enc_ctx->sample_rate = dec_ctx->sample_rate; enc_ctx->channel_layout = dec_ctx->channel_layout; -- 2.28.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] doc/examples/transcoding: fix wrong time base
Signed-off-by: liudingming --- doc/examples/transcoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index 3a97426e2c..ea6ffefc70 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -171,7 +171,7 @@ static int open_output_file(const char *filename) else enc_ctx->pix_fmt = dec_ctx->pix_fmt; /* video time_base can be set to whatever is handy and supported by encoder */ -enc_ctx->time_base = av_inv_q(dec_ctx->framerate); +enc_ctx->time_base = av_inv_q(av_mul_q(dec_ctx->framerate, (AVRational){dec_ctx->ticks_per_frame, 1})); } else { enc_ctx->sample_rate = dec_ctx->sample_rate; enc_ctx->channel_layout = dec_ctx->channel_layout; -- 2.28.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/2] avcodec/libdav1d: don't repeatedly parse the same sequence header
Look at the event flag that signals a new sequence header was found in the bitstream on supported libdav1d versions for this purpose. Signed-off-by: James Almer --- libavcodec/libdav1d.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 6370ae1fbf..faa1d242c8 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -220,6 +220,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) Libdav1dContext *dav1d = c->priv_data; Dav1dData *data = &dav1d->data; Dav1dPicture pic = { 0 }, *p = &pic; +#if DAV1D_API_VERSION_MAJOR >= 5 && DAV1D_API_VERSION_MINOR >= 1 +enum Dav1dEventFlags event_flags = 0; +#endif int res; if (!data->sz) { @@ -296,6 +299,10 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) frame->linesize[1] = p->stride[1]; frame->linesize[2] = p->stride[1]; +#if DAV1D_API_VERSION_MAJOR >= 5 && DAV1D_API_VERSION_MINOR >= 1 +dav1d_get_event_flags(dav1d->c, &event_flags); +if (event_flags & DAV1D_EVENT_FLAG_NEW_SEQUENCE) +#endif libdav1d_init_params(c, p->seq_hdr); res = ff_decode_frame_props(c, frame); if (res < 0) -- 2.32.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] avcodec/libdav1d: use ff_decode_frame_props() to fill frame properties
The main benefit comes from propagating container level metadata like hdr, which is more commonly used than the relevant Metadata OBUs. Signed-off-by: James Almer --- libavcodec/libdav1d.c | 71 --- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 50e6200f5d..6370ae1fbf 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -120,6 +120,41 @@ static void libdav1d_picture_release(Dav1dPicture *p, void *cookie) av_buffer_unref(&buf); } +static void libdav1d_init_params(AVCodecContext *c, const Dav1dSequenceHeader *seq) +{ +c->profile = seq->profile; +c->level = ((seq->operating_points[0].major_level - 2) << 2) + | seq->operating_points[0].minor_level; + +switch (seq->chr) { +case DAV1D_CHR_VERTICAL: +c->chroma_sample_location = AVCHROMA_LOC_LEFT; +break; +case DAV1D_CHR_COLOCATED: +c->chroma_sample_location = AVCHROMA_LOC_TOPLEFT; +break; +} +c->colorspace = (enum AVColorSpace) seq->mtrx; +c->color_primaries = (enum AVColorPrimaries) seq->pri; +c->color_trc = (enum AVColorTransferCharacteristic) seq->trc; +c->color_range = seq->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; + +if (seq->layout == DAV1D_PIXEL_LAYOUT_I444 && +seq->mtrx == DAV1D_MC_IDENTITY && +seq->pri == DAV1D_COLOR_PRI_BT709 && +seq->trc == DAV1D_TRC_SRGB) +c->pix_fmt = pix_fmt_rgb[seq->hbd]; +else +c->pix_fmt = pix_fmt[seq->layout][seq->hbd]; + +if (seq->num_units_in_tick && seq->time_scale) { +av_reduce(&c->framerate.den, &c->framerate.num, + seq->num_units_in_tick, seq->time_scale, INT_MAX); +if (seq->equal_picture_interval) +c->ticks_per_frame = seq->num_ticks_per_picture; +} +} + static av_cold int libdav1d_init(AVCodecContext *c) { Libdav1dContext *dav1d = c->priv_data; @@ -261,9 +296,11 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) frame->linesize[1] = p->stride[1]; frame->linesize[2] = p->stride[1]; -c->profile = p->seq_hdr->profile; -c->level = ((p->seq_hdr->operating_points[0].major_level - 2) << 2) - | p->seq_hdr->operating_points[0].minor_level; +libdav1d_init_params(c, p->seq_hdr); +res = ff_decode_frame_props(c, frame); +if (res < 0) +goto fail; + frame->width = p->p.w; frame->height = p->p.h; if (c->width != p->p.w || c->height != p->p.h) { @@ -279,39 +316,11 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) INT_MAX); ff_set_sar(c, frame->sample_aspect_ratio); -switch (p->seq_hdr->chr) { -case DAV1D_CHR_VERTICAL: -frame->chroma_location = c->chroma_sample_location = AVCHROMA_LOC_LEFT; -break; -case DAV1D_CHR_COLOCATED: -frame->chroma_location = c->chroma_sample_location = AVCHROMA_LOC_TOPLEFT; -break; -} -frame->colorspace = c->colorspace = (enum AVColorSpace) p->seq_hdr->mtrx; -frame->color_primaries = c->color_primaries = (enum AVColorPrimaries) p->seq_hdr->pri; -frame->color_trc = c->color_trc = (enum AVColorTransferCharacteristic) p->seq_hdr->trc; -frame->color_range = c->color_range = p->seq_hdr->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; - -if (p->p.layout == DAV1D_PIXEL_LAYOUT_I444 && -p->seq_hdr->mtrx == DAV1D_MC_IDENTITY && -p->seq_hdr->pri == DAV1D_COLOR_PRI_BT709 && -p->seq_hdr->trc == DAV1D_TRC_SRGB) -frame->format = c->pix_fmt = pix_fmt_rgb[p->seq_hdr->hbd]; -else -frame->format = c->pix_fmt = pix_fmt[p->p.layout][p->seq_hdr->hbd]; - if (p->m.user_data.data) memcpy(&frame->reordered_opaque, p->m.user_data.data, sizeof(frame->reordered_opaque)); else frame->reordered_opaque = AV_NOPTS_VALUE; -if (p->seq_hdr->num_units_in_tick && p->seq_hdr->time_scale) { -av_reduce(&c->framerate.den, &c->framerate.num, - p->seq_hdr->num_units_in_tick, p->seq_hdr->time_scale, INT_MAX); -if (p->seq_hdr->equal_picture_interval) -c->ticks_per_frame = p->seq_hdr->num_ticks_per_picture; -} - // match timestamps and packet size frame->pts = p->m.timestamp; frame->pkt_dts = p->m.timestamp; -- 2.32.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] libavformat/rtpdec_rfc4175: Check for zero pgroup before mod
Signed-off-by: Kyle Schwarz --- libavformat/rtpdec_rfc4175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtpdec_rfc4175.c b/libavformat/rtpdec_rfc4175.c index e9c62c1389..4daff4da5a 100644 --- a/libavformat/rtpdec_rfc4175.c +++ b/libavformat/rtpdec_rfc4175.c @@ -199,7 +199,7 @@ static int rfc4175_handle_packet(AVFormatContext *ctx, PayloadContext *data, cont = headers[4] & 0x80; headers += 6; -if (length % data->pgroup) +if (!data->pgroup || length % data->pgroup) return AVERROR_INVALIDDATA; if (length > payload_len) -- 2.31.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] Unable to use sqrt() and exp() in CUDA
Yeah, I was using enable-cuda-llvm. I haven't been including cuda.h in my cuda file. Could it be from the include in hwcontext_cuda.h possibly? I was using: PKG_CONFIG_PATH="/home/dylan/Files/nv-codec-headers" ./configure --enable-opencl --enable-vulkan --enable-libglslang --disable-stripping --enable-nonfree --enable-cuda-llvm --extra-cflags=-I/opt/local/cuda/include --nvccflags="--cuda-gpu-arch=sm_52 -O2" When I use nvcc, I don't seem to get the cuda.h error. Thanks, Dylan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".