vlc | branch: master | Tristan Matthews <tma...@videolan.org> | Tue Jan 8 16:35:52 2019 -0500| [3dbeb66bc60a2ce77e6c924af29950658be67909] | committer: Tristan Matthews
aom: encoder: add row-mt option, if available > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3dbeb66bc60a2ce77e6c924af29950658be67909 --- modules/codec/aom.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/codec/aom.c b/modules/codec/aom.c index 32271ed81b..e4f26c3916 100644 --- a/modules/codec/aom.c +++ b/modules/codec/aom.c @@ -84,6 +84,9 @@ vlc_module_begin () change_integer_range( 0, 6 ) /* 1 << 6 == MAX_TILE_ROWS */ add_integer( SOUT_CFG_PREFIX "tile-columns", 0, "Tile Columns (in log2 units)", NULL, true ) change_integer_range( 0, 6 ) /* 1 << 6 == MAX_TILE_COLS */ +#ifdef AOM_CTRL_AV1E_SET_ROW_MT + add_bool( SOUT_CFG_PREFIX "row-mt", false, "Row Multithreading", NULL, true ) +#endif #endif vlc_module_end () @@ -434,6 +437,9 @@ static int OpenEncoder(vlc_object_t *p_this) int i_bit_depth = var_InheritInteger( p_enc, SOUT_CFG_PREFIX "bitdepth" ); int i_tile_rows = var_InheritInteger( p_enc, SOUT_CFG_PREFIX "tile-rows" ); int i_tile_columns = var_InheritInteger( p_enc, SOUT_CFG_PREFIX "tile-columns" ); +#ifdef AOM_CTRL_AV1E_SET_ROW_MT + bool b_row_mt = var_GetBool( p_enc, SOUT_CFG_PREFIX "row-mt" ); +#endif /* TODO: implement higher profiles, bit depths and other pixformats. */ switch( i_profile ) @@ -500,6 +506,17 @@ static int OpenEncoder(vlc_object_t *p_this) return VLC_EGENERIC; } +#ifdef AOM_CTRL_AV1E_SET_ROW_MT + if (b_row_mt && + aom_codec_control(ctx, AV1E_SET_ROW_MT, b_row_mt)) + { + AOM_ERR(p_this, ctx, "Failed to set row-multithreading"); + destroy_context(p_this, ctx); + free(p_sys); + return VLC_EGENERIC; + } +#endif + p_enc->pf_encode_video = Encode; return VLC_SUCCESS; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits