tis 2025-10-21 klockan 04:24 +0200 skrev Lynne via ffmpeg-devel: > On 20/10/2025 19:50, Tomas Härdin via ffmpeg-devel wrote: > > Hi > > > > I'm writing this email to get a feel for how everyone feels about > > making more use of C++ in the codebase. I am only proposing using > > C++ > > *internally*, and only where it makes sense. I am not suggesting a > > "move" to C++, merely using features already present in the > > compilers > > we target: gcc, clang and cl. The impedance mismatch should > > therefore > > be small, and any missing compiler features should be caught by > > FATE. > > Definitely not. > The patch you posted hardly changes anything. Here's a more illustrative example. What it means for a given offset to be contained "within" a partition is made explicit. This also allows us to reject files where partitions are overlapping, which wasn't obvious with the previous code The codebase is actually littered with binary searches like the one the attached patchset removes. That's a major code stink imo KLV keys could be given a similar treatment. Most importantly, the entire index code could be made far more readable and robust. That's a rather large task however, which I'm not going to undertake unless I know I won't face major opposition A continuation of the partition stuff attached is to remove MXFContext::partitions and instead use an std::map in MXFCppContext for the partitions themselves, not just their offsets. This would address some performance issues with the present code for files with a large number of partitions, such as mxfenc.c /Tomas