From 9fa4e0e555ea5d484bf6038ebb0d39a7bf86fb71 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 1 Feb 2022 11:05:51 +0100 Subject: [PATCH] avcodec/rv10.h: Split header into decoder- and encoder-only parts Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263dec.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/rv10.c | 2 +- libavcodec/rv10dec.h | 28 ++++++++++++++++++++++++++++ libavcodec/rv10enc.c | 2 +- libavcodec/{rv10.h => rv10enc.h} | 12 ++++-------- libavcodec/rv20enc.c | 2 +- 7 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 libavcodec/rv10dec.h rename libavcodec/{rv10.h => rv10enc.h} (85%) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 5588840c3d..77ca0d7e40 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -42,7 +42,7 @@ #include "mathops.h" #include "mpegutils.h" #include "unary.h" -#include "rv10.h" +#include "rv10dec.h" #include "mpeg4video.h" #include "mpegvideodata.h" #include "mpeg4videodec.h" diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 772150ef26..e94e83a6ef 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -70,7 +70,7 @@ #include "internal.h" #include "bytestream.h" #include "wmv2enc.h" -#include "rv10.h" +#include "rv10enc.h" #include "packet_internal.h" #include #include "sp5x.h" diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 4dfaa3460d..241ee53442 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -41,7 +41,7 @@ #include "mpegvideo.h" #include "mpeg4video.h" #include "mpegvideodata.h" -#include "rv10.h" +#include "rv10dec.h" #define RV_GET_MAJOR_VER(x) ((x) >> 28) #define RV_GET_MINOR_VER(x) (((x) >> 20) & 0xFF) diff --git a/libavcodec/rv10dec.h b/libavcodec/rv10dec.h new file mode 100644 index 0000000000..daa6b8d653 --- /dev/null +++ b/libavcodec/rv10dec.h @@ -0,0 +1,28 @@ +/* + * RV10/RV20 decoder + * + * This file is part of FFmpeg. + * + * 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. + * + * 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RV10DEC_H +#define AVCODEC_RV10DEC_H + +#include "mpegvideo.h" + +int ff_rv_decode_dc(MpegEncContext *s, int n); + +#endif /* AVCODEC_RV10DEC_H */ diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index 72b25e0c55..dbc7a370f4 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -27,7 +27,7 @@ #include "mpegvideo.h" #include "put_bits.h" -#include "rv10.h" +#include "rv10enc.h" int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number) { diff --git a/libavcodec/rv10.h b/libavcodec/rv10enc.h similarity index 85% rename from libavcodec/rv10.h rename to libavcodec/rv10enc.h index 364270e76a..66672f8087 100644 --- a/libavcodec/rv10.h +++ b/libavcodec/rv10enc.h @@ -1,5 +1,5 @@ /* - * RV10/RV20 decoder + * RV10/RV20 encoder * * This file is part of FFmpeg. * @@ -18,16 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_RV10_H -#define AVCODEC_RV10_H - -#include +#ifndef AVCODEC_RV10ENC_H +#define AVCODEC_RV10ENC_H #include "mpegvideo.h" -int ff_rv_decode_dc(MpegEncContext *s, int n); - int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number); -#endif /* AVCODEC_RV10_H */ +#endif /* AVCODEC_RV10ENC_H */ diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c index 204cd03a24..892107f1f8 100644 --- a/libavcodec/rv20enc.c +++ b/libavcodec/rv20enc.c @@ -30,7 +30,7 @@ #include "h263data.h" #include "h263enc.h" #include "put_bits.h" -#include "rv10.h" +#include "rv10enc.h" void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number){ put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ?