[xiph-commits] r7359 - trunk/ffmpeg2theora

j at dactyl.lonelymoon.com j
Mon Jul 26 18:28:24 PDT 2004


Author: j
Date: Mon Jul 26 18:28:24 2004
New Revision: 7359

Modified:
trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
lets make it output width and hight size must be a multiple of 2.



Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2004-07-27 01:08:13 UTC (rev 7358)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2004-07-27 01:28:23 UTC (rev 7359)
@@ -231,16 +231,16 @@
/* Theora has a divisible-by-sixteen restriction for the encoded video size */  /* scale the frame size up to the nearest /16 and calculate offsets */
this->video_x=((this->output_width + 15) >>4)<<4;
this->video_y=((this->output_height + 15) >>4)<<4;
-		this->frame_x_offset=(this->video_x-this->output_width)/2;
-		this->frame_y_offset=(this->video_y-this->output_height)/2;
+		this->frame_x_offset=(this->video_x-this->output_width);
+		this->frame_y_offset=(this->video_y-this->output_height);

if(this->output_height>0 || this->output_width>0){
// we might need that for values other than /16?
int frame_padtop=0, frame_padbottom=0;
int frame_padleft=0, frame_padright=0;

-			frame_padtop=frame_padbottom=this->frame_x_offset;
-			frame_padleft=frame_padright=this->frame_y_offset;
+			frame_padbottom=this->frame_x_offset;
+			frame_padleft=this->frame_y_offset;

this->img_resample_ctx = img_resample_full_init(
//this->output_width, this->output_height,
@@ -789,13 +789,13 @@
exit(1);
}

-	/*could go, but so far no player supports offset_x/y */
+	/* could go, but so far no player supports offset_x/y */
if(convert->output_width % 16 ||  convert->output_height % 16){
fprintf(stderr,"output size must be a multiple of 16 for now.\n");
exit(1);
}
-	if(convert->output_width % 4 ||  convert->output_height % 4){
-		fprintf(stderr,"output size must be a multiple of 4 for now.\n");
+	if(convert->output_width % 2 ||  convert->output_height % 2){
+		fprintf(stderr,"output width and hight size must be a multiple of 2.\n");
exit(1);
}




More information about the commits mailing list