[xiph-commits] r14252 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Thu Nov 29 15:41:28 PST 2007


Author: j
Date: 2007-11-29 15:41:28 -0800 (Thu, 29 Nov 2007)
New Revision: 14252

Modified:
   trunk/ffmpeg2theora/ChangeLog
   trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
- larger audio buffer is needed for some NTSC mov files.
- update videobin preset, better detect NTSC 4:3 files. enable denoise by default



Modified: trunk/ffmpeg2theora/ChangeLog
===================================================================
--- trunk/ffmpeg2theora/ChangeLog	2007-11-29 22:51:19 UTC (rev 14251)
+++ trunk/ffmpeg2theora/ChangeLog	2007-11-29 23:41:28 UTC (rev 14252)
@@ -1,3 +1,8 @@
+0.20 2007-11-31
+    - add postprocessing filters, denoise, deblock, dering
+    - new preset
+    - several bugfixes
+
 0.19 2007-06-29
     - use libswscale api
     - add frontend mode and a simple PythonCard Frontend

Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2007-11-29 22:51:19 UTC (rev 14251)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2007-11-29 23:41:28 UTC (rev 14252)
@@ -325,19 +325,17 @@
     
     for (i = 0; i < this->context->nb_streams; i++){
         AVCodecContext *enc = this->context->streams[i]->codec;
-
         switch (enc->codec_type){
-        case CODEC_TYPE_VIDEO:
-
-            if (this->video_index < 0)
-                this->video_index = i;
-            break;
-        case CODEC_TYPE_AUDIO:
-            if (this->audio_index < 0 && !this->disable_audio)
-                this->audio_index = i;
-            break;
-        default:
-            break;
+            case CODEC_TYPE_VIDEO:
+              if (this->video_index < 0)
+                    this->video_index = i;
+                break;
+            case CODEC_TYPE_AUDIO:
+                if (this->audio_index < 0 && !this->disable_audio)
+                    this->audio_index = i;
+                break;
+            default:
+                break;
         }
     }
 
@@ -384,7 +382,7 @@
             if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
               height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;                
             }
-            if( ((float)width /height) < 1.5) {
+            if( ((float)width /height) <= 1.5) {
               if(width > 448) {
                 //4:3 448 x 336
                 this->picture_width=448;
@@ -838,7 +836,7 @@
                 while(e_o_s || len > 0 ){
                     int samples=0;
                     int samples_out=0;
-                    int data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+                    int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE;
                     if(len > 0){
                         len1 = avcodec_decode_audio2(astream->codec, audio_buf, &data_size, ptr, len);
                         if (len1 < 0){
@@ -1420,6 +1418,7 @@
                     convert->audio_quality = 3.00;
                     convert->sharpness = 2;
                     info.speed_level = 0;
+                    snprintf(convert->pp_mode,sizeof(convert->pp_mode),"de,tn");
                 }
                 else{
                     fprintf(stderr,"\nUnknown preset.\n\n");



More information about the commits mailing list