[xiph-commits] r18035 - trunk/ffmpeg2theora/src
j at svn.xiph.org
j at svn.xiph.org
Sat Jul 30 12:43:56 PDT 2011
Author: j
Date: 2011-07-30 12:43:55 -0700 (Sat, 30 Jul 2011)
New Revision: 18035
Modified:
trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
add switch to force off interlace
Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c 2011-07-28 18:39:35 UTC (rev 18034)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c 2011-07-30 19:43:55 UTC (rev 18035)
@@ -52,6 +52,7 @@
enum {
NULL_FLAG,
DEINTERLACE_FLAG,
+ NODEINTERLACE_FLAG,
SOFTTARGET_FLAG,
TWOPASS_FLAG,
FIRSTPASS_FLAG,
@@ -852,8 +853,12 @@
fprintf(stderr, " Frame Aspect Ratio: %.2f/1\n", frame_aspect);
}
- if (!(info.twopass==3 && info.passno==2) && !info.frontend && this->deinterlace==1)
+ if (!(info.twopass==3 && info.passno==2) && !info.frontend &&
+ this->deinterlace==1)
fprintf(stderr, " Deinterlace: on\n");
+ if (!(info.twopass==3 && info.passno==2) && !info.frontend &&
+ this->deinterlace==-1)
+ fprintf(stderr, " Deinterlace: off\n");
if (strcmp(this->pp_mode, "")) {
ppContext = pp_get_context(display_width, display_height, PP_FORMAT_420);
@@ -1424,7 +1429,8 @@
display_width, display_height);
output_tmp_p=NULL;
}
- if (frame->interlaced_frame || this->deinterlace) {
+ if ((this->deinterlace==0 && frame->interlaced_frame) ||
+ this->deinterlace==1) {
if (avpicture_deinterlace((AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,display_width,display_height)<0) {
fprintf(stderr, "Deinterlace failed.\n");
exit(1);
@@ -2070,6 +2076,7 @@
"Input options:\n"
" --deinterlace force deinterlace, otherwise only material\n"
" marked as interlaced will be deinterlaced\n"
+ " --no-deinterlace force deinterlace off\n"
#ifdef HAVE_FRAMEHOOK
" --vhook you can use ffmpeg's vhook system, example:\n"
" ffmpeg2theora --vhook '/path/watermark.so -f wm.gif' input.dv\n"
@@ -2200,6 +2207,7 @@
{"keyint",required_argument,NULL,'K'},
{"buf-delay",required_argument,NULL,'d'},
{"deinterlace",0,&flag,DEINTERLACE_FLAG},
+ {"no-deinterlace",0,&flag,NODEINTERLACE_FLAG},
{"pp",required_argument,&flag,PP_FLAG},
{"resize-method",required_argument,&flag,RESIZE_METHOD_FLAG},
{"samplerate",required_argument,NULL,'H'},
@@ -2287,6 +2295,10 @@
convert->deinterlace = 1;
flag = -1;
break;
+ case NODEINTERLACE_FLAG:
+ convert->deinterlace = -1;
+ flag = -1;
+ break;
case SOFTTARGET_FLAG:
convert->soft_target = 1;
flag = -1;
More information about the commits
mailing list