michaelni changed the topic of #ffmpeg-devel to: Welcome to the FFmpeg development channel | Questions about using FFmpeg or developing with libav* libs should be asked in #ffmpeg | This channel is publicly logged | FFmpeg 7.0 has been released! | Please read ffmpeg.org/developer.html#Code-of-conduct
<BtbN> jamrial: something I don't understand about the use of ff_buffer_packet() in mov.c: What prevents the last packet from getting queued twice? it calls ff_buffer_packet() on it, but I don't see that "freeing" the packet?
<BtbN> So in ff_read_packet(), it'd call handle_new_packet() on the same packet again
<jamrial> BtbN: the FFERROR_REDO return value
<BtbN> ah
<BtbN> Yeah, that makes the code easier for sure
AbleBacon has quit [Read error: Connection reset by peer]
thilo has quit [Ping timeout: 255 seconds]
thilo has joined #ffmpeg-devel
cone-418 has quit [Quit: transmission timeout]
kurosu has quit [Quit: Connection closed for inactivity]
<BtbN> Seems to be working fine. But my god, that nearly 2000 lines read_packet function for flv needs to be refactored badly
lemourin has quit [Quit: The Lounge - https://thelounge.chat]
arch1t3cht4 has joined #ffmpeg-devel
lemourin has joined #ffmpeg-devel
arch1t3cht has quit [Ping timeout: 260 seconds]
arch1t3cht4 is now known as arch1t3cht
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
jamrial has quit []
Teukka` has quit [Read error: Connection reset by peer]
Martchus has joined #ffmpeg-devel
Martchus_ has quit [Ping timeout: 240 seconds]
Teukka has joined #ffmpeg-devel
Teukka has quit [Changing host]
Teukka has joined #ffmpeg-devel
kurosu has joined #ffmpeg-devel
deus0ww has joined #ffmpeg-devel
Livio has joined #ffmpeg-devel
kurosu has quit [Quit: Connection closed for inactivity]
cone-380 has joined #ffmpeg-devel
<cone-380> ffmpeg Haihao Xiang master:4c0bb7d4a919: lavu/hwcontext_qsv: update AVQSVFramesContext to support dynamic frame pool
<cone-380> ffmpeg Haihao Xiang master:3178c99fa93b: lavu/version: fix minor version
<cone-380> ffmpeg Haihao Xiang master:932f78c4e561: lavu/hwcontext_qsv: add support for dynamic frame pool in qsv_frames_derive_to
<cone-380> ffmpeg Haihao Xiang master:96db4a62e0ac: lavu/hwcontext_qsv: create dynamic frame pool if required
<cone-380> ffmpeg Haihao Xiang master:d3cc5ead42dc: lavu/hwcontext_qsv: add support for dynamic frame pool in qsv_map_to
<cone-380> ffmpeg Haihao Xiang master:cda721e01de5: lavc/qsv: fix the mfx allocator to support dynamic frame pool
<cone-380> ffmpeg Haihao Xiang master:75015f9b0e0e: lavc/qsvenc: use the right info for encoding
<cone-380> ffmpeg Haihao Xiang master:a00cfc6c2461: lavc/qsvdec: require a dynamic frame pool if possible
<cone-380> ffmpeg Haihao Xiang master:5646285f761c: lavfi/qsvvpp: use the right mfxFrameInfo when dynamic frame pool is used
<cone-380> ffmpeg Haihao Xiang master:127ded507828: lavfi/qsvvpp: require a dynamic frame pool for output if possible
kurosu has joined #ffmpeg-devel
Livio has quit [Ping timeout: 260 seconds]
feiwan1 has quit [Quit: Leaving]
Krowl has joined #ffmpeg-devel
Krowl has quit [Read error: Connection reset by peer]
<courmisch> BananaPi on delivery truck
<courmisch> BBB: it might well be that MMX is slightly better than C in real use... but I thought we were trying to get rid of MMX?
IndecisiveTurtle has joined #ffmpeg-devel
qeed_ has joined #ffmpeg-devel
qeed has quit [Ping timeout: 264 seconds]
Krowl has joined #ffmpeg-devel
kurosu has quit [Quit: Connection closed for inactivity]
System_Error has quit [Ping timeout: 260 seconds]
Livio has joined #ffmpeg-devel
Traneptora has quit [Quit: Quit]
System_Error has joined #ffmpeg-devel
mkver has joined #ffmpeg-devel
cone-380 has quit [Quit: transmission timeout]
Traneptora has joined #ffmpeg-devel
Livio has quit [Ping timeout: 264 seconds]
Livio has joined #ffmpeg-devel
cone-210 has joined #ffmpeg-devel
<cone-210> ffmpeg Andreas Rheinhardt master:6c812a80ddfa: avcodec/adts_parser: Don't presume buffer to be padded
<cone-210> ffmpeg Andreas Rheinhardt master:12ded9cd85be: avcodec/adts_header: Add ff_adts_header_parse_buf()
<cone-210> ffmpeg Andreas Rheinhardt master:ae937c49027f: avcodec/aac_ac3_parser: Untangle AAC and AC3 parsing error codes
<cone-210> ffmpeg Andreas Rheinhardt master:a2874c5721eb: avcodec/aac_ac3_parser: Use ff_adts_header_parse_buf()
Krowl has quit [Read error: Connection reset by peer]
<BBB> courmisch: yes
<BBB> courmisch: someone will replace it with sse2 soon[tm]
<BBB> "Convert MMX assembly language to SSE2 - For example: ​[..] (e.g. in libavcodec: [..] h263 [..]"
IndecisiveTurtle has quit [Ping timeout: 256 seconds]
jamrial has joined #ffmpeg-devel
Krowl has joined #ffmpeg-devel
cousin_luigi has joined #ffmpeg-devel
<cousin_luigi> Greetings.
<cousin_luigi> Where do I find the version for each library inside the source tree?
<cousin_luigi> nm found it
cousin_luigi has left #ffmpeg-devel [#ffmpeg-devel]
<cone-210> ffmpeg Andreas Rheinhardt master:8b48b0adab0d: avformat/utils: Use static mutexes instead of ff_lock_avformat()
<cone-210> ffmpeg Andreas Rheinhardt master:583c3d45fab6: avformat/tls_openssl: #if ff_openssl_init/deinit() away if possible
<cone-210> ffmpeg Andreas Rheinhardt master:26f3e7911466: avformat/tee: Constify AVDictionaryEntry* pointee where possible
<cone-210> ffmpeg Andreas Rheinhardt master:ce22e7ab289a: avformat/tee: Use smaller scope for variables
<cone-210> ffmpeg Andreas Rheinhardt master:482afe8f3f7b: avcodec/lib*, avformat/tee: Simplify iterating over AVDictionary
<cone-210> ffmpeg Andreas Rheinhardt master:f3d206d25ffd: fftools, avfilter, avformat: Simplify check for "is dictionary empty?"
jamrial has quit [Read error: Connection reset by peer]
* thardin stares at av_rescale_rnd()
jamrial has joined #ffmpeg-devel
<Lynne> it is just a*b + c, with different settings for rounding
<cone-210> ffmpeg Andreas Rheinhardt master:e863cbceaeb8: avcodec/ac3enc_template: Avoid always-true check
<cone-210> ffmpeg Andreas Rheinhardt master:59b1838e0955: avcodec/ac3enc: Move transient PutBitContext to stack
<cone-210> ffmpeg Andreas Rheinhardt master:b50c5d029003: avformat/flacdec: Reorder allocations to avoid leak on error
<cone-210> ffmpeg Andreas Rheinhardt master:62929f40ee7c: fftools/ffmpeg_filter: Fix leak on error
<cone-210> ffmpeg Andreas Rheinhardt master:2c94b1bbf101: avcodec/tiff: Fix leak on error
<cone-210> ffmpeg Andreas Rheinhardt master:0d7430d3ab9a: avfilter/vf_v360: Add assert to suppress Coverity false positives
<Lynne> with 128-bit precision as a, b and c are all 64-bit values
<Lynne> with true 128-bit arithmetic, it looks kinda like this - https://github.com/cyanreg/avtransport/blob/master/libavtransport/rational.c#L41-L63
<thardin> riscv?
<Lynne> ?
<thardin> riscv has a 128-bit mode
<Lynne> ah, that hasn't been standardized yet, there's a draft
<Lynne> my version just uses 128-bit c23 ints, which should mean if its ever released it'll just work
Krowl has quit [Read error: Connection reset by peer]
<thardin> didn't know c23 had such large ints. neat
<thardin> does it also give int256, int512, int1024 and so on?
<Lynne> yup
Livio has quit [Ping timeout: 264 seconds]
<Lynne> they're optional though, so compilers/libc doesn't have to implement bignum libs
<Lynne> but everything that matters supports 128-bit
<thardin> I only see mention of int128 in the spec
<thardin> but I guess you kind of have to draw the line somewhere
<thardin> else you get into generics territory
<Lynne> _BitInt(N) is the syntax, where N is a number of bits
<Lynne> its very flexible, you could in theory have 171-bit ints
<thardin> neato
<thardin> av_rescale_rnd() looks correct btw, frama-c just isn't very good at reasoning about truncation in division
<courmisch> afaik nobody implements int128_t because ...
<courmisch> ... they would have to extend intmax_t to 128 bits
<courmisch> which would be an ABI break :facepalm:
<courmisch> there is totally not an integer type __int128 on GCC and Clang though
<courmisch> don't even need C23
<Lynne> int128_t is not standardized
<Lynne> it doesn't have a prefix or namespacing, so it's not like it can be implemented in a compliant way, at least I think so
<Lynne> the advantage of BitInt is that its in theory portable
<courmisch> IIRC the spec allows intN_t for any ?
<courmisch> N
Krowl has joined #ffmpeg-devel
<Lynne> it does? I didn't know that
<courmisch> int128_t is not required but then neither is BigInt, ain't it?
<Lynne> bigint or bitint?
<courmisch> anyhow, is there even a C23 compiler yet
<jamrial> clang and gcc support most of the current draft, afaik
<cone-210> ffmpeg James Almer master:b113050d96d9: avcodec/cbs_h266: read vps_ptl_max_tid before using it
<Lynne> it was released last year
<Lynne> clang-18 + glibc 2.39 (for checked int adds) implements all of it
<frankplow> courmisch: BitInts are mandatory I believe. Not mandatory that they can be larger than the existing integer types though
<courmisch> frankplow: well, that's about as useful ad aligned_alloc() guaranteed to support only standard alignments
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
<Lynne> e.g. very useful
<frankplow> Bit-precise integers can be larger than intmax_t, so implementors can add larger ints without the ABI problem you mentioned.
<courmisch> also call me when you convinced mini to use checked ints instead of adhoc code
<courmisch> meanwhile ffmpeg still supporting gcc 4?
<Lynne> adhoc code? like putting (unsigned) casts?
<thardin> av_rescale_delta() is moderately cursed
<courmisch> Lynne: no, like manually checking for overflow
<thardin> if the timestamps are outside [INT64_MIN/3, INT64_MAX/3] then UB can occur
<thardin> probably in other cases too
<jamrial> <courmisch> meanwhile ffmpeg still supporting gcc 4? <- 4.9 minimum, because c11
<courmisch> F3 has arrived
<Lynne> courmisch: if you get it running, could you post checkasm --bench results on both it and the 908?
<courmisch> it takes forever, I think because checkasm benches C functions that don't have optimisations written for them, for naught
<Lynne> I don't think that happens, checkasm gives up if it finds nothing in cflags
<jamrial> courmisch: then run each test you know has risvc versions individually with --test=foo
<courmisch> Lynne: last I tried, it took 30+ minutes though
<courmisch> jamrial: well, that's what I usually do, yes
<jamrial> 30 minutes?
<jamrial> not ready for prime time i guess
<courmisch> it takes 5 minutes on my Mordor86 Zen 2
<Lynne> 30 minutes sounds about right for how fast a 908 is
<Lynne> but you have 8 cores on the m1
<courmisch> k1, but checkasm is not threaded is it
<Lynne> ah, no, it isn't
<courmisch> so the quick start guide says to use a TTL adapter, does not say where to plug it
klaxa has quit [Ping timeout: 252 seconds]
klaxa has joined #ffmpeg-devel
<courmisch> Lynne: and it relies on sigsetjmp so fat chance
<courmisch> I suppose the jump buffer could be put into TLS for the signal handler to use
Krowl has quit [Read error: Connection reset by peer]
AbleBacon has joined #ffmpeg-devel
<BBB> ffmpeg-english "capture video from the camera every 1 second and write it to jpg files"
<BBB> well that's cute
Sean_McG has joined #ffmpeg-devel
Livio has joined #ffmpeg-devel
lexano has joined #ffmpeg-devel
IndecisiveTurtle has joined #ffmpeg-devel
<cone-210> ffmpeg LuMingYin master:9481b7d932e8: libavformat/hlsenc: fix a memory leak on error path
<cone-210> ffmpeg LuMingYin master:14f9e47314ab: libavformat/rtsp: fix a memory leak on error path
<cone-210> ffmpeg LuMingYin master:3f691c0c6a8c: libavfilter/vf_curves: fix a memory leak on error path
Livio has quit [Read error: Connection reset by peer]
<courmisch> I ain't going to wait the whole night for this
<courmisch> maybe VVC tests made checkasm impossibly slow
<jamrial> yeah, those run way too many iterations
Krowl has joined #ffmpeg-devel
Livio has joined #ffmpeg-devel
Livio has quit [Ping timeout: 264 seconds]
rvalue has quit [Ping timeout: 264 seconds]
rvalue- has joined #ffmpeg-devel
Livio has joined #ffmpeg-devel
<courmisch> two hours and still nothing
<courmisch> my patience is running out
rvalue- is now known as rvalue
<courmisch> fix checkasm if you want benchmarks
<Lynne> on the c908?
<courmisch> yeah
<courmisch> well on anything, I suspect
merbanan has joined #ffmpeg-devel
<Lynne> I'm sure it won't take more than eta(cur_time) = (cur_time + 1800)
<courmisch> hey, I know that oneMicrosoft ETA function
<cone-210> ffmpeg James Almer release/7.0:5f23eecfba60: avformat/vvc: fix writing general_constraint_info bytes
<cone-210> ffmpeg James Almer release/7.0:a8b8b1042f99: avformat/vvc: fix parsing some early VPS bitstream values
Livio has quit [Read error: Connection reset by peer]
IndecisiveTurtle has quit [Ping timeout: 256 seconds]
<cone-210> ffmpeg Nuo Mi release/7.0:00ccb7be2948: avcodec/cbs_h266: fix sh_collocated_from_l0_flag and sh_collocated_ref_idx infer
<cone-210> ffmpeg James Almer release/7.0:060d2ce8aed1: avcodec/cbs_h266: read vps_ptl_max_tid before using it
Livio has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
<courmisch> Lynne: the k230 literally crashed after 8000 seconds of checkasm, so tough luck
b50d has joined #ffmpeg-devel
System_Error has joined #ffmpeg-devel
<Lynne> courmisch: sad, could you limit the tests to 3 functions - something trivial, somewhat complex, and rocket science?
c1480 has joined #ffmpeg-devel
psykose has quit [Remote host closed the connection]
psykose has joined #ffmpeg-devel
b50d has quit [Remote host closed the connection]
psykose_ has joined #ffmpeg-devel
psykose has quit [Ping timeout: 268 seconds]
psykose_ is now known as psykose
cubicibo has joined #ffmpeg-devel
iive has joined #ffmpeg-devel
deer3 has quit [Ping timeout: 246 seconds]
Krowl has quit [Read error: Connection reset by peer]
sadome has joined #ffmpeg-devel
sadome has joined #ffmpeg-devel
sadome has quit [Changing host]
sadome has quit [Excess Flood]
kurosu has joined #ffmpeg-devel
<courmisch> If VVC devs can't be bothered to fix checkasm, I can't be bothered to run it.
<Lynne> it shouldn't even run any of those functions when --test=<test>
Livio has quit [Ping timeout: 255 seconds]
<courmisch> Lynne: ^
<Lynne> thanks, the cores look surprisingly similar in terms of timing, with the vectors simply being twice as fast, and the clock being higher
<Lynne> what's going on with the vector integer ops being slower than vector float ops?
<courmisch> ...and it happened. RDCYCLE does not work.
<courmisch> Well it was only a matter of time until vendor firmware had the security fix.
<Lynne> rip
<courmisch> Lynne: AI does not need integers
<courmisch> now, to port the video codecs to float
<Lynne> with quantizations, these days running AI is basically fixed-point matrix mults
<Lynne> that's why all tensor units offer 8*8 => 16bit fixed-point mults
<courmisch> do they even have mantissa bits left in F8 and F4 formats?
cubicibo has quit [Quit: Client closed]
<Lynne> actually they do
<courmisch> I think the benchmarks above may be a little biased because some of the integer stuff has additional shifts and roundings for fixed point
<courmisch> also perhaps scalar ALU competes with vector ALU?
<Lynne> ah, yeah, that would add overhead and latency
cubicibo has joined #ffmpeg-devel
<Lynne> curious if aac_fixed is slower than aac_float with no assembly optimizations enabled, I'll give it a test on the 908 I have access to
<courmisch> flac_lpc_32_31_c: 1070.2
<courmisch> flac_lpc_32_31_rvv_i64: 186.7
<courmisch> oooh
<JEEB> nice diff
<Lynne> what's it like on the c908?
<courmisch> flac_lpc_32_31_c: 1119.0
<courmisch> flac_lpc_32_31_rvv_i64: 225.2
<courmisch> slightly worse
<courmisch> checkasm could take a page from dav1d and give the ratio
<courmisch> flac_lpc_32_31_c: 13296.1
<courmisch> flac_lpc_32_31_sse4: 6351.6
<courmisch> Booooooh, SSE4
<Lynne> every time LPC SIMD gets mentioned I have flashbacks to lpc_apply_welch_window
<courmisch> apply_welch_window_even_c: 812.0
<courmisch> apply_welch_window_odd_c: 925.7
<courmisch> apply_welch_window_even_rvv_f64: 147.7
<courmisch> apply_welch_window_odd_rvv_f64: 167.2
<courmisch> apply_welch_window_even_c: 8314.0
<courmisch> apply_welch_window_even_avx2: 1987.0
<courmisch> apply_welch_window_even_sse2: 3032.0
<courmisch> hey, at least x86 has a better TSC granularity, can't have everything
<Lynne> linux perf uses the perf timers, right? and the resolution issue is from the kernel/framework side
<Lynne> for arm64 there's a kernel mod I use which lets applications use the timers directly
<courmisch> I'm using RDTIME, not kperf
IndecisiveTurtle has joined #ffmpeg-devel
<jamrial> courmisch: order 31 in lpc_32 test?
<jamrial> is that a local change?
<courmisch> jamrial: yes
<jamrial> why?
<courmisch> I wanted to test all sizes, especially 8 and lower
<courmisch> but I won't send that patch because I'm not a VVC dev
<Lynne> the fixed-point AAC decoder is 7% slower on risc-v with no assembly
<Lynne> those rounding adds and shifts do add up
<Lynne> aac_fixed is 13% slower on arm64
<Lynne> maybe we should disable it by default...
<Lynne> only MIPS went/wanted float-less and they are no more
cone-210 has quit [Quit: transmission timeout]
cubicibo has quit [Ping timeout: 250 seconds]
kurosu has quit [Quit: Connection closed for inactivity]
<BBB> mips is dead?
<psykose> yes
<BBB> I did not know that, interesting
<kepstin> there is a use case for a fixed-point aac decoder on risc-v; some microcontroller socs like esp32 are switching to RV32IMAC cores and the target market for those things includes voice assistants/smart speakers.
<kepstin> tho i suppose people might end up with chips that have a dsp and use that for codecs instead.
<kepstin> and yeah, MIPS just sells risc-v cores now.
<Lynne> I haven't heard of anyone running ffmpeg on microcontrollers tbh
Raz- has quit [Ping timeout: 260 seconds]
<Lynne> great, everyone does whatever they want for xhe-aac audio output levels
<Lynne> fdk-aac outputs super low levels, and assumes a mono downmix (?) so for stereo it reduces the levels even more
<Lynne> apple's decoder just outputs data like we do, at the native MDCT output level
Raz- has joined #ffmpeg-devel
Raz- has quit [Ping timeout: 240 seconds]
Raz- has joined #ffmpeg-devel
IndecisiveTurtle has quit [Ping timeout: 256 seconds]
mkver has quit [Ping timeout: 268 seconds]
merbanan has quit [Ping timeout: 240 seconds]