[FFmpeg-cvslog] avcodec/h261: Move encoder-only stuff to a new header

Andreas Rheinhardt git at videolan.org
Sun Feb 13 21:25:18 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Feb  1 06:39:35 2022 +0100| [8401b9460279df657dead86e1fecd71eb4efd7fc] | committer: Andreas Rheinhardt

avcodec/h261: Move encoder-only stuff to a new header

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8401b9460279df657dead86e1fecd71eb4efd7fc
---

 libavcodec/h261.h          |  7 -------
 libavcodec/h261enc.c       |  1 +
 libavcodec/h261enc.h       | 40 ++++++++++++++++++++++++++++++++++++++++
 libavcodec/mpegvideo_enc.c |  2 +-
 4 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/libavcodec/h261.h b/libavcodec/h261.h
index ff1903e508..67c362be93 100644
--- a/libavcodec/h261.h
+++ b/libavcodec/h261.h
@@ -51,11 +51,4 @@ extern RLTable ff_h261_rl_tcoeff;
 
 void ff_h261_loop_filter(MpegEncContext *s);
 
-int ff_h261_get_picture_format(int width, int height);
-void ff_h261_reorder_mb_index(MpegEncContext *s);
-void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
-                       int motion_x, int motion_y);
-void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number);
-void ff_h261_encode_init(MpegEncContext *s);
-
 #endif /* AVCODEC_H261_H */
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 13fe5bbfb2..f1cd51ec2f 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -32,6 +32,7 @@
 #include "mpegutils.h"
 #include "mpegvideo.h"
 #include "h261.h"
+#include "h261enc.h"
 #include "mpegvideodata.h"
 
 static uint8_t uni_h261_rl_len [64*64*2*2];
diff --git a/libavcodec/h261enc.h b/libavcodec/h261enc.h
new file mode 100644
index 0000000000..0a01858be5
--- /dev/null
+++ b/libavcodec/h261enc.h
@@ -0,0 +1,40 @@
+/*
+ * H.261 encoder
+ * Copyright (c) 2002-2004 Michael Niedermayer <michaelni at gmx.at>
+ * Copyright (c) 2004 Maarten Daniels
+ *
+ * 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
+ */
+
+/**
+ * @file
+ * H.261 encoder header.
+ */
+
+#ifndef AVCODEC_H261ENC_H
+#define AVCODEC_H261ENC_H
+
+#include "mpegvideo.h"
+
+int ff_h261_get_picture_format(int width, int height);
+void ff_h261_reorder_mb_index(MpegEncContext *s);
+void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
+                       int motion_x, int motion_y);
+void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number);
+void ff_h261_encode_init(MpegEncContext *s);
+
+#endif
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 33f2937217..b55cf2e170 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -48,7 +48,7 @@
 #include "mpeg12data.h"
 #include "mpegvideo.h"
 #include "mpegvideodata.h"
-#include "h261.h"
+#include "h261enc.h"
 #include "h263.h"
 #include "h263data.h"
 #include "mjpegenc_common.h"



More information about the ffmpeg-cvslog mailing list