[vlc-devel] [PATCH] aom: encoder: add tile-rows and tile-columns options
Tristan Matthews
tmatth at videolan.org
Sun Sep 23 19:04:58 CEST 2018
On Wed, Sep 19, 2018 at 2:25 AM Zhao Zhili <quinkblack at foxmail.com> wrote:
>
>
>
> On 2018年09月19日 12:07, Tristan Matthews wrote:
> > ---
> > modules/codec/aom.c | 22 ++++++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/modules/codec/aom.c b/modules/codec/aom.c
> > index 63fb356e19..88d5fd5aef 100644
> > --- a/modules/codec/aom.c
> > +++ b/modules/codec/aom.c
> > @@ -80,6 +80,10 @@ vlc_module_begin ()
> > change_integer_range( 0, 3 )
> > add_integer( SOUT_CFG_PREFIX "bitdepth", 8, "Bit Depth", NULL, true )
> > change_integer_list( pi_enc_bitdepth_values_list, ppsz_enc_bitdepth_text )
> > + add_integer( SOUT_CFG_PREFIX "tile-rows", 0, "Tile Rows (in log2 units)", NULL, true )
> > + 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 */
> > #endif
> > vlc_module_end ()
> >
> > @@ -415,6 +419,8 @@ static int OpenEncoder(vlc_object_t *p_this)
> > int enc_flags;
> > int i_profile = var_InheritInteger( p_enc, SOUT_CFG_PREFIX "profile" );
> > 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" );
> >
> > /* TODO: implement higher profiles, bit depths and other pixformats. */
> > switch( i_profile )
> > @@ -463,6 +469,22 @@ static int OpenEncoder(vlc_object_t *p_this)
> > return VLC_EGENERIC;
> > }
> >
> > + if (i_tile_rows >= 0 &&
> > + aom_codec_control(ctx, AV1E_SET_TILE_ROWS, i_tile_rows))
> > + {
> > + AOM_ERR(p_this, ctx, "Failed to set tile rows");
> > + free(p_sys);
> > + return VLC_EGENERIC;
> Should the ctx be destroyed in this case?
>
> > + }
> > +
> > + if (i_tile_columns >= 0 &&
> > + aom_codec_control(ctx, AV1E_SET_TILE_COLUMNS, i_tile_columns))
> > + {
> > + AOM_ERR(p_this, ctx, "Failed to set tile columns");
> > + free(p_sys);
> > + return VLC_EGENERIC;
> Ditto.
Good catch.
Best,
-t
>
> > + }
> > +
> > p_enc->pf_encode_video = Encode;
> >
> > return VLC_SUCCESS;
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list