X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmjpeg2jpeg_bsf.c;h=d27793420ee25183abbe45cae9b4c786b1632277;hb=380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8;hp=36bb749c5a776b109079d308f89b6c9cd601ec6a;hpb=ba83c4bfb55d5c3fc6b3959edb0d3cda07a70241;p=ffmpeg diff --git a/libavcodec/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c index 36bb749c5a7..d27793420ee 100644 --- a/libavcodec/mjpeg2jpeg_bsf.c +++ b/libavcodec/mjpeg2jpeg_bsf.c @@ -2,20 +2,20 @@ * MJPEG/AVI1 to JPEG/JFIF bitstream format filter * Copyright (c) 2010 Adrian Daerr and Nicolas George * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav 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. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav 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 FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -25,8 +25,12 @@ */ #include + +#include "libavutil/error.h" +#include "libavutil/mem.h" + #include "avcodec.h" -#include "mjpeg.h" +#include "jpegtables.h" static const uint8_t jpeg_header[] = { 0xff, 0xd8, // SOI @@ -59,15 +63,15 @@ static uint8_t *append(uint8_t *buf, const uint8_t *src, int size) static uint8_t *append_dht_segment(uint8_t *buf) { buf = append(buf, dht_segment_head, sizeof(dht_segment_head)); - buf = append(buf, ff_mjpeg_bits_dc_luminance + 1, 16); + buf = append(buf, avpriv_mjpeg_bits_dc_luminance + 1, 16); buf = append(buf, dht_segment_frag, sizeof(dht_segment_frag)); - buf = append(buf, ff_mjpeg_val_dc, 12); + buf = append(buf, avpriv_mjpeg_val_dc, 12); *(buf++) = 0x10; - buf = append(buf, ff_mjpeg_bits_ac_luminance + 1, 16); - buf = append(buf, ff_mjpeg_val_ac_luminance, 162); + buf = append(buf, avpriv_mjpeg_bits_ac_luminance + 1, 16); + buf = append(buf, avpriv_mjpeg_val_ac_luminance, 162); *(buf++) = 0x11; - buf = append(buf, ff_mjpeg_bits_ac_chrominance + 1, 16); - buf = append(buf, ff_mjpeg_val_ac_chrominance, 162); + buf = append(buf, avpriv_mjpeg_bits_ac_chrominance + 1, 16); + buf = append(buf, avpriv_mjpeg_val_ac_chrominance, 162); return buf; } @@ -106,8 +110,7 @@ static int mjpeg2jpeg_filter(AVBitStreamFilterContext *bsfc, return 1; } -AVBitStreamFilter mjpeg2jpeg_bsf = { +AVBitStreamFilter ff_mjpeg2jpeg_bsf = { .name = "mjpeg2jpeg", - .priv_data_size = 0, .filter = mjpeg2jpeg_filter, };