[MPlayer-dev-eng] [PATCH] x264 keyframe flag
Loren Merritt
lorenm at u.washington.edu
Mon Oct 11 23:22:48 CEST 2004
Now marks IDR-frames as keyframes, and doesn't mark I-frames when
they aren't seekable.
--Loren Merritt
-------------- next part --------------
Index: libmpcodecs/ve_x264.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_x264.c,v
retrieving revision 1.7
diff -u -r1.7 ve_x264.c
--- libmpcodecs/ve_x264.c 8 Oct 2004 12:38:39 -0000 1.7
+++ libmpcodecs/ve_x264.c 11 Oct 2004 21:20:03 -0000
@@ -304,7 +304,9 @@
i_size += x264_nal_encode(mod->mux->buffer + i_size, &i_data, 1, &nal[i]);
}
if(i_size>0) {
- muxer_write_chunk(mod->mux, i_size, (mod->pic.i_type == X264_TYPE_I)?0x10:0);
+ int keyframe = (mod->pic.i_type == X264_TYPE_IDR) ||
+ (mod->pic.i_type == X264_TYPE_I && frame_ref == 1);
+ muxer_write_chunk(mod->mux, i_size, keyframe?0x10:0);
}
return 1;
}
More information about the MPlayer-dev-eng
mailing list