]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/huffyuvenc.c
diradec: split tables away to a separate diractab file
[ffmpeg] / libavcodec / huffyuvenc.c
index febb71f089e3e8c75ce0e9dfbc100f844ac54b6e..572de16a1f791966648ccc0b1ac07e417e8fa6c1 100644 (file)
@@ -28,8 +28,6 @@
  * huffyuv encoder
  */
 
-#include "libavutil/opt.h"
-
 #include "avcodec.h"
 #include "huffyuv.h"
 #include "huffman.h"
@@ -321,7 +319,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
     avctx->bits_per_coded_sample = s->bitstream_bpp;
     s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
-    s->predictor = avctx->prediction_method;
+#if FF_API_PRIVATE_OPT
+FF_DISABLE_DEPRECATION_WARNINGS
+    if (avctx->prediction_method)
+        s->predictor = avctx->prediction_method;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
     s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0;
     if (s->context) {
         if (s->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) {
@@ -1059,6 +1062,10 @@ static av_cold int encode_end(AVCodecContext *avctx)
     { "non_deterministic", "Allow multithreading for e.g. context=1 at the expense of determinism", \
       OFFSET(non_determ), AV_OPT_TYPE_BOOL, { .i64 = 1 }, \
       0, 1, VE }, \
+    { "pred", "Prediction method", OFFSET(predictor), AV_OPT_TYPE_INT, { .i64 = LEFT }, LEFT, MEDIAN, VE, "pred" }, \
+        { "left",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LEFT },   INT_MIN, INT_MAX, VE, "pred" }, \
+        { "plane",  NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PLANE },  INT_MIN, INT_MAX, VE, "pred" }, \
+        { "median", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MEDIAN }, INT_MIN, INT_MAX, VE, "pred" }, \
 
 static const AVOption normal_options[] = {
     COMMON_OPTIONS