Index: libmpcodecs/vf_cropdetect.c
===================================================================
--- libmpcodecs/vf_cropdetect.c	(revision 30524)
+++ libmpcodecs/vf_cropdetect.c	(working copy)
@@ -92,6 +92,7 @@
     dmpi->height=mpi->height;
 
 if(++vf->priv->fno>0){	// ignore first 2 frames - they may be empty
+    int round_sig = 1;
 
     // Reset the crop area every reset_count frames, if reset_count is > 0
     if(vf->priv->reset_count > 0 && vf->priv->fno > vf->priv->reset_count){
@@ -130,29 +131,44 @@
 	}
     }
 
-    // round x and y (up), important for yuv colorspaces
-    // make sure they stay rounded!
-    x=(vf->priv->x1+1)&(~1);
-    y=(vf->priv->y1+1)&(~1);
+    if (vf->priv->round < 0)
+	round_sig = -1;
 
+    x = vf->priv->x1;
+    y = vf->priv->y1;
+
+    // make sure x and y are rounded to even number
+    if (x%2)
+	x += round_sig;
+    if (y%2)
+	y += round_sig;
+
     w = vf->priv->x2 - x + 1;
     h = vf->priv->y2 - y + 1;
 
-    // w and h must be divisible by 2 as well because of yuv
-    // colorspace problems.
-    if (vf->priv->round <= 1)
-      vf->priv->round = 16;
-    if (vf->priv->round % 2)
-      vf->priv->round *= 2;
+    // w and h must be divisible by 2 because of yuv colorspace problems.
+    // This is always true as round is even number != 0
 
-    shrink_by = w % vf->priv->round;
+    // Modulus with negative divisor is implementation-defined, avoid
+    // problems.
+    shrink_by = w % abs(vf->priv->round);
+    if (shrink_by && vf->priv->round < 0)
+	shrink_by += vf->priv->round;
+
     w -= shrink_by;
-    x += (shrink_by / 2 + 1) & ~1;
+    x += shrink_by / 2;
 
-    shrink_by = h % vf->priv->round;
+    shrink_by = h % abs(vf->priv->round);
+    if (shrink_by && vf->priv->round < 0)
+	shrink_by += vf->priv->round;
+
     h -= shrink_by;
-    y += (shrink_by / 2 + 1) & ~1;
+    y += shrink_by / 2;
 
+    // make sure x and y stay rounded to even number
+    x = (x%2 ? x+round_sig : x);
+    y = (y%2 ? y+round_sig : y);
+
     mp_msg(MSGT_VFILTER, MSGL_INFO, MSGTR_MPCODECS_CropArea,
 	vf->priv->x1,vf->priv->x2,
 	vf->priv->y1,vf->priv->y2,
@@ -175,6 +191,7 @@
 //===========================================================================//
 
 static int open(vf_instance_t *vf, char* args){
+    int round_sig = 1;
     vf->config=config;
     vf->put_image=put_image;
     vf->query_format=query_format;
@@ -186,6 +203,15 @@
     &vf->priv->limit,
     &vf->priv->round,
     &vf->priv->reset_count);
+
+    if (vf->priv->round < 0)
+	round_sig = -1;
+
+    if (abs(vf->priv->round) <= 1)
+      vf->priv->round = 16*round_sig;
+    if (vf->priv->round % 2)
+	vf->priv->round += round_sig; // Increase by one, keep sign
+
     return 1;
 }
 
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1	(revision 30524)
+++ DOCS/man/en/mplayer.1	(working copy)
@@ -5805,7 +5805,11 @@
 Value which the width/\:height should be divisible by (default: 16).
 The offset is automatically adjusted to center the video.
 Use 2 to get only even dimensions (needed for 4:2:2 video).
-16 is best when encoding to most video codecs.
+16 is best when encoding to most video codecs.  Usually the crop values
+for width and height are rounded down to avoid black bars, but a round up
+mode can be forced by choosing a negative round value.  This will leave
+black borders around the picture and is therefore not optimal for compression
+efficiency, but it will avoid that picture information is lost.
 .br
 .IPs <reset>
 Counter that determines after how many frames cropdetect will reset
