[FFmpeg-cvslog] movenc: Reorder entries in the MOVIentry struct, for tigheter packing
Martin Storsjö
git at videolan.org
Sat Jan 21 23:21:12 CET 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Jan 20 20:48:19 2012 +0200| [5d95112d926760046bc0b07aeda5cfc766ba54a6] | committer: Martin Storsjö
movenc: Reorder entries in the MOVIentry struct, for tigheter packing
Originally, sizeof(struct MOVIentry) was 48, after the reordering,
it is 40 in my build configuration.
When writing really long mov/mp4 files, this can make a difference
- this saves a bit over 2 MB of memory per hour of video (down to
10.3 MB per hour from 12.3 MB per hour initially) for a video with
75 packets per second - 25 fps + 50 audio packets (which is the
case for AMR audio).
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d95112d926760046bc0b07aeda5cfc766ba54a6
---
libavformat/movenc.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/movenc.h b/libavformat/movenc.h
index 5ca5631..5595ac7 100644
--- a/libavformat/movenc.h
+++ b/libavformat/movenc.h
@@ -40,12 +40,12 @@
#define MODE_IPOD 0x20
typedef struct MOVIentry {
- unsigned int size;
uint64_t pos;
+ int64_t dts;
+ unsigned int size;
unsigned int samplesInChunk;
unsigned int entries;
int cts;
- int64_t dts;
#define MOV_SYNC_SAMPLE 0x0001
#define MOV_PARTIAL_SYNC_SAMPLE 0x0002
uint32_t flags;
More information about the ffmpeg-cvslog
mailing list