Commit d7731ea9 authored by Martin Vignali's avatar Martin Vignali

avcodec/proresenc_aw : use scan table from prores_data file

Doesn't seems to make speed loss
parent 2d9c290a
...@@ -516,8 +516,8 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o ...@@ -516,8 +516,8 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o proresdata.o OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o proresdata.o
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o proresdata.o
OBJS-$(CONFIG_PRORES_AW_ENCODER) += proresenc_anatoliy.o OBJS-$(CONFIG_PRORES_AW_ENCODER) += proresenc_anatoliy.o proresdata.o
OBJS-$(CONFIG_PRORES_KS_ENCODER) += proresenc_kostya.o proresdata.o OBJS-$(CONFIG_PRORES_KS_ENCODER) += proresenc_kostya.o proresdata.o
OBJS-$(CONFIG_PROSUMER_DECODER) += prosumer.o OBJS-$(CONFIG_PROSUMER_DECODER) += prosumer.o
OBJS-$(CONFIG_PSD_DECODER) += psd.o OBJS-$(CONFIG_PSD_DECODER) += psd.o
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "dct.h" #include "dct.h"
#include "internal.h" #include "internal.h"
#include "proresdata.h"
#include "put_bits.h" #include "put_bits.h"
#include "bytestream.h" #include "bytestream.h"
#include "fdctdsp.h" #include "fdctdsp.h"
...@@ -52,17 +53,6 @@ static const int qp_start_table[4] = { 4, 1, 1, 1 }; ...@@ -52,17 +53,6 @@ static const int qp_start_table[4] = { 4, 1, 1, 1 };
static const int qp_end_table[4] = { 8, 9, 6, 6 }; static const int qp_end_table[4] = { 8, 9, 6, 6 };
static const int bitrate_table[5] = { 1000, 2100, 3500, 5400 }; static const int bitrate_table[5] = { 1000, 2100, 3500, 5400 };
static const uint8_t progressive_scan[64] = {
0, 1, 8, 9, 2, 3, 10, 11,
16, 17, 24, 25, 18, 19, 26, 27,
4, 5, 12, 20, 13, 6, 7, 14,
21, 28, 29, 22, 15, 23, 30, 31,
32, 33, 40, 48, 41, 34, 35, 42,
49, 56, 57, 50, 43, 36, 37, 44,
51, 58, 59, 52, 45, 38, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63
};
static const uint8_t QMAT_LUMA[4][64] = { static const uint8_t QMAT_LUMA[4][64] = {
{ {
4, 7, 9, 11, 13, 14, 15, 63, 4, 7, 9, 11, 13, 14, 15, 63,
...@@ -237,7 +227,7 @@ static void encode_ac_coeffs(AVCodecContext *avctx, PutBitContext *pb, ...@@ -237,7 +227,7 @@ static void encode_ac_coeffs(AVCodecContext *avctx, PutBitContext *pb,
int run = 0, level, code, i, j; int run = 0, level, code, i, j;
for (i = 1; i < 64; i++) { for (i = 1; i < 64; i++) {
int indp = progressive_scan[i]; int indp = ff_prores_progressive_scan[i];
for (j = 0; j < blocks_per_slice; j++) { for (j = 0; j < blocks_per_slice; j++) {
int val = QSCALE(qmat, indp, in[(j << 6) + indp]); int val = QSCALE(qmat, indp, in[(j << 6) + indp]);
if (val) { if (val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment