summaryrefslogtreecommitdiff
path: root/src/dxr3
diff options
context:
space:
mode:
authorHarm van der Heijden <hrm@users.sourceforge.net>2001-11-21 20:40:47 +0000
committerHarm van der Heijden <hrm@users.sourceforge.net>2001-11-21 20:40:47 +0000
commit6c3148b4a085976f09492eefae840ca728cec18c (patch)
tree58a487a4801c8a63c6211dbd765de3f0375fbb8e /src/dxr3
parent043ab1c4c9f57870d29efe95620b273a3a2b7798 (diff)
downloadxine-lib-6c3148b4a085976f09492eefae840ca728cec18c.tar.gz
xine-lib-6c3148b4a085976f09492eefae840ca728cec18c.tar.bz2
dxr3enc:
- outline top black border at 16 lines, so old and new macroblocks overlap (might reduce re-encoding artefacts) - print libfame's quantizer setting (based on quality parameter) divx4: - removed version check out of init stage to decoding stage, so as to cause minimal annoyance (you need to increase divx4 priority to get there) - re-enabled decore release command in close; this is vital now that xine closes and reopens the decoder when seeking (when did that happen?) otherwise we get 5M memory per seek - upped the version requirement to oktober 2001 (was august). This due to bug reports that decore release caused sigsev. (that's why release was disabled till now) read updated README.divx4 for more info. CVS patchset: 1095 CVS date: 2001/11/21 20:40:47
Diffstat (limited to 'src/dxr3')
-rw-r--r--src/dxr3/dxr3_vo_encoder.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/dxr3/dxr3_vo_encoder.c b/src/dxr3/dxr3_vo_encoder.c
index 366633ab1..989376284 100644
--- a/src/dxr3/dxr3_vo_encoder.c
+++ b/src/dxr3/dxr3_vo_encoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_vo_encoder.c,v 1.6 2001/11/19 17:07:15 mlampard Exp $
+ * $Id: dxr3_vo_encoder.c,v 1.7 2001/11/21 20:40:47 hrm Exp $
*
* mpeg1 encoding video out plugin for the dxr3.
*
@@ -179,7 +179,7 @@ static void dxr3_update_frame_format (vo_driver_t *this_gen,
dxr3_driver_t *this = (dxr3_driver_t *) this_gen;
int aspect;
dxr3_frame_t *frame = (dxr3_frame_t *) frame_gen;
- int image_size, oheight;
+ int image_size, oheight, top_bar;
float fps;
/* reset the copy calls counter (number of calls to dxr3_frame_copy) */
@@ -279,10 +279,13 @@ static void dxr3_update_frame_format (vo_driver_t *this_gen,
memset(frame->real_base[1], 128, image_size/4);
memset(frame->real_base[2], 128, image_size/4);
+ /* make top black bar multiple of 16,
+ * so old and new macroblocks overlap */
+ top_bar = ((oheight - height) / 16) * 8;
/* fix offsets, so the decoder does not see the top black bar */
- frame->vo_frame.base[0] = frame->real_base[0] + width * (oheight - height)/2;
- frame->vo_frame.base[1] = frame->real_base[1] + width/2 * (oheight - height)/4;
- frame->vo_frame.base[2] = frame->real_base[2] + width/2 * (oheight - height)/4;
+ frame->vo_frame.base[0] = frame->real_base[0] + width * top_bar;
+ frame->vo_frame.base[1] = frame->real_base[1] + width * top_bar/4;
+ frame->vo_frame.base[2] = frame->real_base[2] + width * top_bar/4;
}
}
@@ -303,7 +306,11 @@ static void dxr3_update_frame_format (vo_driver_t *this_gen,
buffer = (unsigned char *) malloc (DEFAULT_BUFFER_SIZE);
fp.quality=this->config->register_range(this->config,"dxr3enc.quality",90, 10,100, "Dxr3enc: mpeg encoding quality",NULL,NULL,NULL);
-
+ /* the really interesting bit is the quantizer scale. The formula
+ * below is copied from libfame's sources (could be changed in the
+ * future) */
+ printf("dxr3enc: quality %d -> quant scale = %d\n", fp.quality,
+ 1 + (30*(100-fp.quality)+50)/100);
fp.width = width;
fp.height = oheight;
fp.profile = "mpeg1";
@@ -334,7 +341,6 @@ static void dxr3_update_frame_format (vo_driver_t *this_gen,
fp.frame_rate_num);
}
fame_init (fc, &fp, buffer, DEFAULT_BUFFER_SIZE);
-
}
#endif
#if USE_FFMPEG