On Wed, May 20, 2015 at 02:08:55AM +0100, Vittorio Giovara wrote:
> Add an helper function and a compatibility layer for exporting

a helper

> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,10 @@ libavutil:     2014-08-09
>  
> +2015-xx-xx - xxxxxxx - lavc 56.25.0 - avcodec.h
> +  Add AV_PKT_DATA_CODING_PARAMS and to carry AVPacket compression parameters

s/and//

> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -853,6 +853,23 @@ typedef struct AVPanScan{
> +    /**
> +     * Quality after compression, between 1 (good) and FF_LAMBDA_MAX (bad).
> +     */
> +    int quality;

Is there a reason for this to be signed when it's supposed to carry only
unsigned values?

> --- a/libavcodec/internal.h
> +++ b/libavcodec/internal.h
> @@ -219,6 +219,11 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
>                                          enum AVMatrixEncoding 
> matrix_encoding);
>  
>  /**
> + * Allocate and initialize an AV_PKT_DATA_CODING_PARAMS side data.
> + */
> +int ff_packet_default_coding_params(AVPacket *pkt);

Please document the parameter as well, Doxygen will shout otherwise.

The description makes me think that the function should maybe have
"init" in its name.

> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -177,6 +177,23 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame,
>  
> +int ff_packet_default_coding_params(AVPacket *pkt)
> +{
> +    int i;
> +    AVPacketCodingParams *params = (AVPacketCodingParams *)
> +        av_packet_new_side_data(pkt, AV_PKT_DATA_CODING_PARAMS,
> +                                sizeof(AVPacketCodingParams));

Indentation is off.

> +    params->pict_type = AV_PICTURE_TYPE_I;
> +    params->quality = 0;

align

> @@ -1520,6 +1539,22 @@ int attribute_align_arg 
> avcodec_encode_video2(AVCodecContext *avctx,
>  
> +        params = (AVPacketCodingParams *)
> +            av_packet_get_side_data(avpkt, AV_PKT_DATA_CODING_PARAMS, NULL);

indentation

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to