aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-30 21:05:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-03-30 21:05:23 +0200
commit794e9fb5a649b4489e7369eb846049d4a03f3ff9 (patch)
tree775f1981d407c36b0ebdc8daa61bb3f2c920025d
parent847c0d333b6a195670f5bd64e9f7e5c9cf254cc4 (diff)
parente6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80 (diff)
downloadffmpeg-794e9fb5a649b4489e7369eb846049d4a03f3ff9.tar.gz
Merge commit 'e6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80'
* commit 'e6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80': mjpeg: Move code only used in the encoder(s) to the appropriate header Conflicts: libavcodec/mjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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 4273aa70ca..132ec89aae 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -32,6 +32,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 73db1dd1eb..0e62b2aeff 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 0: ret= 0; break;\
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 4553152279..fb17993ea0 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"
#include "tiff.h"
#include "exif.h"
#include "bytestream.h"
diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h
index 069d43c816..ad2a55425e 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[12][64]);
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index 8a5b99f227..de582d31ea 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "idctdsp.h"
#include "put_bits.h"
+#include "mjpegenc.h"
#include "mjpegenc_common.h"
#include "mjpeg.h"