# HG changeset patch # User reimar # Date 1255679757 0 # Node ID 15f34b5059edd2d9c3b48912a2ac4422945b9d8a # Parent 64e6e0d096b9c23422f2a92229739287f7b272b5 Split parts of dvdata.h into dvdata.c, this ensures that things like work_chunks_* and dv_idct_factor_* variables appear only once in the binary instead of 3 times. Saves 3264 bytes in .rodata and 312416 bytes in .bss on x86_64. diff -r 64e6e0d096b9 -r 15f34b5059ed dv.c --- a/dv.c Fri Oct 16 03:02:25 2009 +0000 +++ b/dv.c Fri Oct 16 07:55:57 2009 +0000 @@ -322,7 +322,7 @@ uint8_t *ppcm[4] = {0}; if (buf_size < DV_PROFILE_BYTES || - !(c->sys = dv_frame_profile(c->sys, buf, buf_size)) || + !(c->sys = ff_dv_frame_profile(c->sys, buf, buf_size)) || buf_size < c->sys->frame_size) { return -1; /* Broken frame, or not enough data */ } @@ -368,7 +368,7 @@ int64_t timestamp, int flags) { // FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk) - const DVprofile* sys = dv_codec_profile(c->vst->codec); + const DVprofile* sys = ff_dv_codec_profile(c->vst->codec); int64_t offset; int64_t size = url_fsize(s->pb); int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size; @@ -431,7 +431,7 @@ url_fseek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0) return AVERROR(EIO); - c->dv_demux->sys = dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES); + c->dv_demux->sys = ff_dv_frame_profile(c->dv_demux->sys, c->buf, DV_PROFILE_BYTES); if (!c->dv_demux->sys) { av_log(s, AV_LOG_ERROR, "Can't determine profile of DV input stream.\n"); return -1; diff -r 64e6e0d096b9 -r 15f34b5059ed dvenc.c --- a/dvenc.c Fri Oct 16 03:02:25 2009 +0000 +++ b/dvenc.c Fri Oct 16 07:55:57 2009 +0000 @@ -321,7 +321,7 @@ c->ast[i]->codec->channels != 2)) goto bail_out; } - c->sys = dv_codec_profile(vst->codec); + c->sys = ff_dv_codec_profile(vst->codec); if (!c->sys) goto bail_out;