[x264-devel] Frame-packing 3D: don't place scenecuts on right views
Jason Garrett-Glaser
git at videolan.org
Sat Feb 19 00:34:09 CET 2011
x264 | branch: master | Jason Garrett-Glaser <jason at x264.com> | Mon Feb 7 03:15:03 2011 -0800| [49fd2893c850d2f1d2f72f993490e6795d31f59f] | committer: Jason Garrett-Glaser
Frame-packing 3D: don't place scenecuts on right views
Caused problems for some players.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=49fd2893c850d2f1d2f72f993490e6795d31f59f
---
encoder/slicetype.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index d764cbb..dd8cb7e 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -1132,9 +1132,14 @@ static void x264_slicetype_path( x264_t *h, x264_mb_analysis_t *a, x264_frame_t
memcpy( best_paths[length % (X264_BFRAME_MAX+1)], paths[idx^1], length );
}
-static int scenecut_internal( x264_t *h, x264_mb_analysis_t *a, x264_frame_t **frames, int p0, int p1, int print )
+static int scenecut_internal( x264_t *h, x264_mb_analysis_t *a, x264_frame_t **frames, int p0, int p1, int real_scenecut )
{
x264_frame_t *frame = frames[p1];
+
+ /* Don't do scenecuts on the right view of a frame-packed video. */
+ if( real_scenecut && h->param.i_frame_packing == 5 && (frame->i_frame&1) )
+ return 0;
+
x264_slicetype_frame_cost( h, a, frames, p0, p1, p1, 0 );
int icost = frame->i_cost_est[0][0];
@@ -1161,7 +1166,7 @@ static int scenecut_internal( x264_t *h, x264_mb_analysis_t *a, x264_frame_t **f
}
res = pcost >= (1.0 - f_bias) * icost;
- if( res && print )
+ if( res && real_scenecut )
{
int imb = frame->i_intra_mbs[p1-p0];
int pmb = NUM_MBS - imb;
More information about the x264-devel
mailing list