Page Menu
Home
Search
Configure Global Search
Log In
Files
F10065
lossless.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Leo Sutic (lsutic)
Nov 13 2013, 2:10 PM
Size
3 KB
Subscribers
None
lossless.patch
View Options
Index: release/scripts/ui/properties_render.py
===================================================================
--- release/scripts/ui/properties_render.py (revision 32144)
+++ release/scripts/ui/properties_render.py (working copy)
@@ -420,14 +420,22 @@
col = split.column()
col.prop(rd, "ffmpeg_gopsize")
+ # Show the option to use lossless compression
+ # if ffmpeg supports it. So far, only H.264 lossless
+ # is supported. (See alloc_video_stream in writeffmpeg.c)
+ if rd.ffmpeg_codec in ('H264', ):
+ split = layout.split()
+ col = split.column()
+ col.prop(rd, "ffmpeg_lossless_compression")
+
split = layout.split()
-
+
col = split.column()
col.label(text="Rate:")
col.prop(rd, "ffmpeg_minrate", text="Minimum")
col.prop(rd, "ffmpeg_maxrate", text="Maximum")
col.prop(rd, "ffmpeg_buffersize", text="Buffer")
-
+
col = split.column()
col.prop(rd, "ffmpeg_autosplit")
Index: source/blender/blenkernel/intern/writeffmpeg.c
===================================================================
--- source/blender/blenkernel/intern/writeffmpeg.c (revision 32144)
+++ source/blender/blenkernel/intern/writeffmpeg.c (working copy)
@@ -524,6 +524,13 @@
/* correct wrong default ffmpeg param which crash x264 */
c->qmin=10;
c->qmax=51;
+
+ /* Set lossless compression */
+ if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_COMPRESSION) {
+ fprintf(stderr, "Setting lossless H264.\n");
+ /* This overrides any other bitrate-control value. */
+ av_set_int(c, "cqp", 0);
+ }
}
if ((of->oformat->flags & AVFMT_GLOBALHEADER)
Index: source/blender/makesdna/DNA_scene_types.h
===================================================================
--- source/blender/makesdna/DNA_scene_types.h (revision 32144)
+++ source/blender/makesdna/DNA_scene_types.h (working copy)
@@ -1127,6 +1127,7 @@
#define FFMPEG_MULTIPLEX_AUDIO 1 /* deprecated, you can choose none as audiocodec now */
#define FFMPEG_AUTOSPLIT_OUTPUT 2
+#define FFMPEG_LOSSLESS_COMPRESSION 4
/* Paint.flags */
typedef enum {
Index: source/blender/makesrna/intern/rna_scene.c
===================================================================
--- source/blender/makesrna/intern/rna_scene.c (revision 32144)
+++ source/blender/makesrna/intern/rna_scene.c (working copy)
@@ -2338,6 +2338,11 @@
RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ prop= RNA_def_property(srna, "ffmpeg_lossless_compression", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ffcodecdata.flags", FFMPEG_LOSSLESS_COMPRESSION);
+ RNA_def_property_ui_text(prop, "Lossless", "Use lossless compression (overrides bitrate control)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
/* FFMPEG Audio*/
prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec");
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
71/d5/52216cb080dfd4a91877cf9a6e0d
Event Timeline
Log In to Comment