[FFmpeg-cvslog] avcodec/proresenc_aw : use scan table from prores_data file

Martin Vignali git at videolan.org
Thu Oct 18 22:42:55 EEST 2018


ffmpeg | branch: master | Martin Vignali <martin.vignali at gmail.com> | Mon Oct  8 15:49:40 2018 +0200| [d7731ea9d43cf8e7df19d54ab657adbda90d5fd3] | committer: Martin Vignali

avcodec/proresenc_aw : use scan table from prores_data file

Doesn't seems to make speed loss

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

 libavcodec/Makefile             |  4 ++--
 libavcodec/proresenc_anatoliy.c | 14 ++------------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index ce766aa466..a97055ef3f 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -516,8 +516,8 @@ OBJS-$(CONFIG_PNG_ENCODER)             += png.o pngenc.o
 OBJS-$(CONFIG_PPM_DECODER)             += pnmdec.o pnm.o
 OBJS-$(CONFIG_PPM_ENCODER)             += pnmenc.o
 OBJS-$(CONFIG_PRORES_DECODER)          += proresdec2.o proresdsp.o proresdata.o
-OBJS-$(CONFIG_PRORES_ENCODER)          += proresenc_anatoliy.o
-OBJS-$(CONFIG_PRORES_AW_ENCODER)       += proresenc_anatoliy.o
+OBJS-$(CONFIG_PRORES_ENCODER)          += proresenc_anatoliy.o proresdata.o
+OBJS-$(CONFIG_PRORES_AW_ENCODER)       += proresenc_anatoliy.o proresdata.o
 OBJS-$(CONFIG_PRORES_KS_ENCODER)       += proresenc_kostya.o proresdata.o
 OBJS-$(CONFIG_PROSUMER_DECODER)        += prosumer.o
 OBJS-$(CONFIG_PSD_DECODER)             += psd.o
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 0516066163..dd6b1dcfb1 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -29,6 +29,7 @@
 #include "avcodec.h"
 #include "dct.h"
 #include "internal.h"
+#include "proresdata.h"
 #include "put_bits.h"
 #include "bytestream.h"
 #include "fdctdsp.h"
@@ -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 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] = {
     {
          4,  7,  9, 11, 13, 14, 15, 63,
@@ -237,7 +227,7 @@ static void encode_ac_coeffs(AVCodecContext *avctx, PutBitContext *pb,
 
     int run = 0, level, code, i, j;
     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++) {
             int val = QSCALE(qmat, indp, in[(j << 6) + indp]);
             if (val) {



More information about the ffmpeg-cvslog mailing list