65536, 65536, 32768, 21845, 16384, 13107, 10923, 9362, 8192, 4096, 3641, 3277, 2979, 2731, 2341, 1260,
};
-/* DV100 weights are pre-zigzagged, inverted and multiplied by 2^(dv100_weight_shift)
+/* DV100 weights are pre-zigzagged, inverted and multiplied by 2^16
(in DV100 the AC components are divided by the spec weights) */
-static const int dv100_weight_shift = 16;
static const int dv_weight_1080[2][64] = {
{ 8192, 65536, 65536, 61681, 61681, 61681, 58254, 58254,
58254, 58254, 58254, 58254, 55188, 58254, 58254, 55188,
}
for (j = 0; j < 5 * s->sys->bpm; j++) {
- int pos;
- int size = pbs[j].size_in_bits >> 3;
flush_put_bits(&pbs[j]);
- pos = put_bits_count(&pbs[j]) >> 3;
- if (pos > size) {
- av_log(avctx, AV_LOG_ERROR,
- "bitstream written beyond buffer size\n");
- return -1;
- }
- memset(pbs[j].buf + pos, 0xff, size - pos);
+ memset(put_bits_ptr(&pbs[j]), 0xff, put_bytes_left(&pbs[j], 0));
}
if (DV_PROFILE_IS_HD(s->sys))
c->pix_fmt = s->sys->pix_fmt;
s->frame = frame;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- c->coded_frame->key_frame = 1;
- c->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
s->buf = pkt->data;
dv_format_frame(s, pkt->data);
.version = LIBAVUTIL_VERSION_INT,
};
-AVCodec ff_dvvideo_encoder = {
+const AVCodec ff_dvvideo_encoder = {
.name = "dvvideo",
.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
.type = AVMEDIA_TYPE_VIDEO,