---
 libavcodec/libschroedingerenc.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 63d354e..ccfb145 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -220,6 +220,15 @@ static int libschroedinger_encode_init(AVCodecContext 
*avccontext)
     schro_encoder_setting_set_double(p_schro_params->encoder, "open_gop",
                                      !(avccontext->flags & 
CODEC_FLAG_CLOSED_GOP));
 
+    if (avccontext->me_range) {
+        if (avccontext->me_range > 3) {
+            av_log(avccontext, AV_LOG_WARNING, "mv_precision limited to 3\n");
+            avccontext->me_range = 3;
+        }
+        schro_encoder_setting_set_double(p_schro_params->encoder,
+                                         "mv_precision", avccontext->me_range);
+    }
+
     /* FIXME: Signal range hardcoded to 8-bit data until both libschroedinger
      * and libdirac support other bit-depth data. */
     schro_video_format_set_std_signal_range(p_schro_params->format,
-- 
1.7.10.4

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to