OSDN Git Service

- Add the accurate rounding flag for software scaling to avoid scaling artifacts...
authorsuperdump <superdump@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 5 Sep 2007 03:51:41 +0000 (03:51 +0000)
committersuperdump <superdump@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 5 Sep 2007 03:51:41 +0000 (03:51 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@924 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/hb.c
libhb/render.c

index 7b75e85..94206e0 100644 (file)
@@ -364,7 +364,7 @@ void hb_get_preview( hb_handle_t * h, hb_title_t * title, int picture,
                              title->height - (job->crop[0] + job->crop[1]),
                              PIX_FMT_YUV420P,
                              job->width, job->height, PIX_FMT_YUV420P,
-                             SWS_LANCZOS, NULL, NULL, NULL);
+                             SWS_LANCZOS|SWS_ACCURATE_RND, NULL, NULL, NULL);
 
     // Scale
     sws_scale(context,
@@ -378,7 +378,7 @@ void hb_get_preview( hb_handle_t * h, hb_title_t * title, int picture,
     // Get preview context
     context = sws_getContext(job->width, job->height, PIX_FMT_YUV420P,
                              job->width, job->height, PIX_FMT_RGBA32,
-                             SWS_LANCZOS, NULL, NULL, NULL);
+                             SWS_LANCZOS|SWS_ACCURATE_RND, NULL, NULL, NULL);
 
     // Create preview
     sws_scale(context,
index e8fe0ae..5577c2f 100644 (file)
@@ -337,7 +337,7 @@ int renderInit( hb_work_object_t * w, hb_job_t * job )
                                      title->height - (job->crop[0] + job->crop[1]),
                                      PIX_FMT_YUV420P,
                                      job->width, job->height, PIX_FMT_YUV420P,
-                                     SWS_LANCZOS, NULL, NULL, NULL);
+                                     SWS_LANCZOS|SWS_ACCURATE_RND, NULL, NULL, NULL);
     }   
     
     /* Setup FIFO queue for subtitle cache */