diff options
Diffstat (limited to 'libavcodec/zmbvenc.c')
-rw-r--r-- | libavcodec/zmbvenc.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c index e7b39f4..4d91476 100644 --- a/libavcodec/zmbvenc.c +++ b/libavcodec/zmbvenc.c @@ -2,20 +2,20 @@ * Zip Motion Blocks Video (ZMBV) encoder * Copyright (c) 2006 Konstantin Shishkov * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -233,10 +233,8 @@ FF_ENABLE_DEPRECATION_WARNINGS } pkt_size = c->zstream.total_out + 1 + 6*keyframe; - if ((ret = ff_alloc_packet(pkt, pkt_size)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Error getting packet of size %d.\n", pkt_size); + if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size, 0)) < 0) return ret; - } buf = pkt->data; fl = (keyframe ? ZMBV_KEYFRAME : 0) | (chpal ? ZMBV_DELTAPAL : 0); @@ -281,7 +279,7 @@ static av_cold int encode_init(AVCodecContext *avctx) int lvl = 9; for(i=1; i<256; i++) - c->score_tab[i] = -i * log(i / (double)(ZMBV_BLOCK * ZMBV_BLOCK)) * (256 / M_LN2); + c->score_tab[i] = -i * log2(i / (double)(ZMBV_BLOCK * ZMBV_BLOCK)) * 256; c->avctx = avctx; |