aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2015-03-27 12:53:56 +0100
committerDiego Biurrun <diego@biurrun.de>2015-03-30 17:51:20 +0200
commite6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80 (patch)
treea3d1c77a6f31a38301342311c2c89611c772cd46
parent6ed38b1f65b424a4fa92042e0069f350b95e0098 (diff)
downloadffmpeg-e6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80.tar.gz
mjpeg: Move code only used in the encoder(s) to the appropriate header
-rw-r--r--libavcodec/jpeglsenc.c1
-rw-r--r--libavcodec/mjpeg.h7
-rw-r--r--libavcodec/mjpegdec.c1
-rw-r--r--libavcodec/mjpegenc.h7
-rw-r--r--libavcodec/mjpegenc_common.c1
5 files changed, 10 insertions, 7 deletions
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index 3af6412669..f7dec30956 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -31,6 +31,7 @@
#include "internal.h"
#include "mathops.h"
#include "mjpeg.h"
+#include "mjpegenc.h"
#include "jpegls.h"
/**
diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h
index bd3b1e855e..8b7bf8d822 100644
--- a/libavcodec/mjpeg.h
+++ b/libavcodec/mjpeg.h
@@ -36,7 +36,6 @@
#include "libavutil/internal.h"
#include "avcodec.h"
-#include "put_bits.h"
/* JPEG marker codes */
typedef enum {
@@ -120,12 +119,6 @@ typedef enum {
/* 0x02 -> 0xbf reserved */
} JPEG_MARKER;
-static inline void put_marker(PutBitContext *p, int code)
-{
- put_bits(p, 8, 0xff);
- put_bits(p, 8, code);
-}
-
#define PREDICT(ret, topleft, top, left, predictor)\
switch(predictor){\
case 1: ret= left; break;\
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 82cee48354..12b0a4192b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -41,6 +41,7 @@
#include "mjpeg.h"
#include "mjpegdec.h"
#include "jpeglsdec.h"
+#include "put_bits.h"
static int build_vlc(VLC *vlc, const uint8_t *bits_table,
diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h
index a4d684caf6..eec4d2554d 100644
--- a/libavcodec/mjpegenc.h
+++ b/libavcodec/mjpegenc.h
@@ -36,6 +36,7 @@
#include <stdint.h>
#include "mpegvideo.h"
+#include "put_bits.h"
typedef struct MJpegContext {
uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing
@@ -49,6 +50,12 @@ typedef struct MJpegContext {
uint16_t huff_code_ac_chrominance[256];
} MJpegContext;
+static inline void put_marker(PutBitContext *p, int code)
+{
+ put_bits(p, 8, 0xff);
+ put_bits(p, 8, code);
+}
+
int ff_mjpeg_encode_init(MpegEncContext *s);
void ff_mjpeg_encode_close(MpegEncContext *s);
void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[8][64]);
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index adb335e5e1..f2a829fd33 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "idctdsp.h"
#include "put_bits.h"
+#include "mjpegenc.h"
#include "mjpegenc_common.h"
#include "mjpeg.h"