summaryrefslogtreecommitdiff
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 787cfe0cb1..6cc170355c 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -39,6 +39,21 @@
* correctly decodes this file:
* http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov
*/
+#include "internal.h"
+#include "dsputil.h"
+#include "avcodec.h"
+#include "mpegvideo.h"
+#include "h264.h"
+
+#include "h264data.h" //FIXME FIXME FIXME
+
+#include "golomb.h"
+#include "rectangle.h"
+#include "vdpau_internal.h"
+
+#if ARCH_X86
+#include "x86/h264_i386.h"
+#endif
#if CONFIG_ZLIB
#include <zlib.h>
@@ -114,7 +129,7 @@ static const uint32_t svq3_dequant_coeff[32] = {
};
-static void svq3_luma_dc_dequant_idct_c(DCTELEM *block, int qp)
+void svq3_luma_dc_dequant_idct_c(DCTELEM *block, int qp)
{
const int qmul = svq3_dequant_coeff[qp];
#define stride 16
@@ -151,7 +166,7 @@ static void svq3_luma_dc_dequant_idct_c(DCTELEM *block, int qp)
}
#undef stride
-static void svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
+void svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp,
int dc)
{
const int qmul = svq3_dequant_coeff[qp];
@@ -571,7 +586,7 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type)
}
}
- write_back_intra_pred_mode(h);
+ ff_h264_write_back_intra_pred_mode(h);
if (mb_type == 8) {
check_intra4x4_pred_mode(h);
@@ -592,7 +607,7 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type)
dir = i_mb_type_info[mb_type - 8].pred_mode;
dir = (dir >> 1) ^ 3*(dir & 1) ^ 1;
- if ((h->intra16x16_pred_mode = check_intra_pred_mode(h, dir)) == -1){
+ if ((h->intra16x16_pred_mode = ff_h264_check_intra_pred_mode(h, dir)) == -1){
av_log(h->s.avctx, AV_LOG_ERROR, "check_intra_pred_mode = -1\n");
return -1;
}
@@ -685,7 +700,7 @@ static int svq3_decode_mb(H264Context *h, unsigned int mb_type)
s->current_picture.mb_type[mb_xy] = mb_type;
if (IS_INTRA(mb_type)) {
- h->chroma_pred_mode = check_intra_pred_mode(h, DC_PRED8x8);
+ h->chroma_pred_mode = ff_h264_check_intra_pred_mode(h, DC_PRED8x8);
}
return 0;
@@ -789,7 +804,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
return -1;
}
- if (decode_init(avctx) < 0)
+ if (ff_h264_decode_init(avctx) < 0)
return -1;
s->flags = avctx->flags;
@@ -811,7 +826,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
h->b_stride = 4*s->mb_width;
- alloc_tables(h);
+ ff_h264_alloc_tables(h);
/* prowl for the "SEQH" marker in the extradata */
extradata = (unsigned char *)avctx->extradata;
@@ -965,7 +980,7 @@ static int svq3_decode_frame(AVCodecContext *avctx,
s->next_p_frame_damaged = 0;
}
- if (frame_start(h) < 0)
+ if (ff_h264_frame_start(h) < 0)
return -1;
if (s->pict_type == FF_B_TYPE) {
@@ -1028,7 +1043,7 @@ static int svq3_decode_frame(AVCodecContext *avctx,
}
if (mb_type != 0) {
- hl_decode_mb (h);
+ ff_h264_hl_decode_mb (h);
}
if (s->pict_type != FF_B_TYPE && !s->low_delay) {
@@ -1064,7 +1079,7 @@ AVCodec svq3_decoder = {
sizeof(H264Context),
svq3_decode_init,
NULL,
- decode_end,
+ ff_h264_decode_end,
svq3_decode_frame,
CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"),