comparison dv.c @ 10409:3c13cad19e29 libavcodec

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.
author reimar
date Fri, 16 Oct 2009 07:55:57 +0000
parents 7f609ddb85bf
children 9f16f997c41b
comparison
equal deleted inserted replaced
10408:8fd8f6c1cdcc 10409:3c13cad19e29
1126 { 1126 {
1127 const uint8_t *buf = avpkt->data; 1127 const uint8_t *buf = avpkt->data;
1128 int buf_size = avpkt->size; 1128 int buf_size = avpkt->size;
1129 DVVideoContext *s = avctx->priv_data; 1129 DVVideoContext *s = avctx->priv_data;
1130 1130
1131 s->sys = dv_frame_profile(s->sys, buf, buf_size); 1131 s->sys = ff_dv_frame_profile(s->sys, buf, buf_size);
1132 if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys)) { 1132 if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys)) {
1133 av_log(avctx, AV_LOG_ERROR, "could not find dv frame profile\n"); 1133 av_log(avctx, AV_LOG_ERROR, "could not find dv frame profile\n");
1134 return -1; /* NOTE: we only accept several full frames */ 1134 return -1; /* NOTE: we only accept several full frames */
1135 } 1135 }
1136 1136
1291 static int dvvideo_encode_frame(AVCodecContext *c, uint8_t *buf, int buf_size, 1291 static int dvvideo_encode_frame(AVCodecContext *c, uint8_t *buf, int buf_size,
1292 void *data) 1292 void *data)
1293 { 1293 {
1294 DVVideoContext *s = c->priv_data; 1294 DVVideoContext *s = c->priv_data;
1295 1295
1296 s->sys = dv_codec_profile(c); 1296 s->sys = ff_dv_codec_profile(c);
1297 if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys)) 1297 if (!s->sys || buf_size < s->sys->frame_size || dv_init_dynamic_tables(s->sys))
1298 return -1; 1298 return -1;
1299 1299
1300 c->pix_fmt = s->sys->pix_fmt; 1300 c->pix_fmt = s->sys->pix_fmt;
1301 s->picture = *((AVFrame *)data); 1301 s->picture = *((AVFrame *)data);