From 78087da47c6715602e60949e0004d3c1b5f95039 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 1 Feb 2022 06:59:11 +0100 Subject: avcodec/wmv2.h: Move encoder- and decoder-only parts to new headers Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 2 +- libavcodec/mpegvideo.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/msmpeg4dec.c | 2 +- libavcodec/wmv2.h | 9 --------- libavcodec/wmv2dec.c | 1 + libavcodec/wmv2dec.h | 32 ++++++++++++++++++++++++++++++++ libavcodec/wmv2enc.c | 1 + libavcodec/wmv2enc.h | 31 +++++++++++++++++++++++++++++++ 9 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 libavcodec/wmv2dec.h create mode 100644 libavcodec/wmv2enc.h (limited to 'libavcodec') diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 3466027286..0812912f17 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -49,7 +49,7 @@ #include "msmpeg4.h" #include "qpeldsp.h" #include "thread.h" -#include "wmv2.h" +#include "wmv2dec.h" static enum AVPixelFormat h263_get_format(AVCodecContext *avctx) { diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 14768ca8e8..3343c28d2c 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -44,7 +44,7 @@ #include "mpegvideodata.h" #include "qpeldsp.h" #include "threadframe.h" -#include "wmv2.h" +#include "wmv2dec.h" #include static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s, diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index b55cf2e170..4171522356 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -67,7 +67,7 @@ #include "mpeg4videodata.h" #include "internal.h" #include "bytestream.h" -#include "wmv2.h" +#include "wmv2enc.h" #include "rv10.h" #include "packet_internal.h" #include diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 3d2dcb9429..e1d2c342bc 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -33,7 +33,7 @@ #include "mpeg4video.h" #include "msmpeg4data.h" #include "vc1data.h" -#include "wmv2.h" +#include "wmv2dec.h" #define DC_VLC_BITS 9 #define V2_INTRA_CBPC_VLC_BITS 3 diff --git a/libavcodec/wmv2.h b/libavcodec/wmv2.h index 4001093881..cdd58cf011 100644 --- a/libavcodec/wmv2.h +++ b/libavcodec/wmv2.h @@ -37,15 +37,6 @@ typedef struct WMV2Context { void ff_wmv2_common_init(MpegEncContext *s); -int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]); -int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number); -void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64], - int motion_x, int motion_y); -int ff_wmv2_decode_picture_header(MpegEncContext * s); -int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s); -void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64], - uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); - void ff_mspel_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index f9d91f9571..ddf68545fc 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -32,6 +32,7 @@ #include "simple_idct.h" #include "wmv2.h" #include "wmv2data.h" +#include "wmv2dec.h" typedef struct WMV2DecContext { MpegEncContext s; diff --git a/libavcodec/wmv2dec.h b/libavcodec/wmv2dec.h new file mode 100644 index 0000000000..cc410afe17 --- /dev/null +++ b/libavcodec/wmv2dec.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2002 The FFmpeg Project + * + * 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_WMV2DEC_H +#define AVCODEC_WMV2DEC_H + +#include "mpegvideo.h" + +int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]); +int ff_wmv2_decode_picture_header(MpegEncContext * s); +int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s); +void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64], + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); + +#endif diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index a7827f3194..5cb4c4073c 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -24,6 +24,7 @@ #include "msmpeg4.h" #include "msmpeg4data.h" #include "wmv2.h" +#include "wmv2enc.h" typedef struct WMV2EncContext { MpegEncContext s; diff --git a/libavcodec/wmv2enc.h b/libavcodec/wmv2enc.h new file mode 100644 index 0000000000..3f7f5104a6 --- /dev/null +++ b/libavcodec/wmv2enc.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2002 The FFmpeg Project + * + * 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_WMV2ENC_H +#define AVCODEC_WMV2ENC_H + +#include "mpegvideo.h" + +int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number); +void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64], + int motion_x, int motion_y); + + +#endif -- cgit v1.2.3