On 02/09/13 18:08, Vittorio Giovara wrote:
> ---
> libavcodec/mpeg12enc.c | 653
> ++++++++++++++++++++++++------------------------
> 1 file changed, 333 insertions(+), 320 deletions(-)
>
The patch looks a leap in the right direction diego might have some
tweaks in mind though.
> #define OFFSET(x) offsetof(MpegEncContext, x)
> #define VE AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
> -#define COMMON_OPTS\
> - { "intra_vlc", "Use MPEG-2 intra VLC table.",
> OFFSET(intra_vlc_format), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },\
> - { "drop_frame_timecode", "Timecode is in drop frame format.",
> OFFSET(drop_frame_timecode), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE}, \
> - { "scan_offset", "Reserve space for SVCD scan offset user
> data.", OFFSET(scan_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> +#define COMMON_OPTS
> \
> + { "intra_vlc", "Use MPEG-2 intra VLC table.",
> \
> + OFFSET(intra_vlc_format), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE
> }, \
> + { "drop_frame_timecode", "Timecode is in drop frame format.",
> \
> + OFFSET(drop_frame_timecode), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE
> }, \
> + { "scan_offset", "Reserve space for SVCD scan offset user
> data.", \
> + OFFSET(scan_offset), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE
> },
>
> static const AVOption mpeg1_options[] = {
> COMMON_OPTS
> @@ -934,18 +945,20 @@ static const AVOption mpeg1_options[] = {
>
> static const AVOption mpeg2_options[] = {
> COMMON_OPTS
> - { "non_linear_quant", "Use nonlinear quantizer.",
> OFFSET(q_scale_type), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> - { "alternate_scan", "Enable alternate scantable.",
> OFFSET(alternate_scan), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> + { "non_linear_quant", "Use nonlinear quantizer.", \
> + OFFSET(q_scale_type), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1,
> VE },
> + { "alternate_scan", "Enable alternate scantable.", \
> + OFFSET(alternate_scan), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1,
> VE },
> FF_MPV_COMMON_OPTS
> { NULL },
> };
You can leave the avptions as full lines.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel