for (int m = 0; m < height; m++) {
for (int j = 0; j < stride; j++) {
- int16_t index = FFSIGN(data[j]) * lut[FFABS(data[j])];
+ int16_t index = j >= width ? 0 : FFSIGN(data[j]) * lut[FFABS(data[j])];
if (index < 0)
index += 512;
put_bits(pb, cb[512].size, cb[512].bits);
flush_put_bits(pb);
- bytestream2_skip_p(pby, put_bits_count(pb) >> 3);
+ bytestream2_skip_p(pby, put_bytes_output(pb));
padd = (4 - (bytestream2_tell_p(pby) & 3)) & 3;
while (padd--)
bytestream2_put_byte(pby, 0);
.version = LIBAVUTIL_VERSION_INT,
};
-AVCodec ff_cfhd_encoder = {
+const AVCodec ff_cfhd_encoder = {
.name = "cfhd",
.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
.type = AVMEDIA_TYPE_VIDEO,