[FFmpeg-devel] [PATCH 5/6] aaccoder: Move the quantization function to a separate file

Michael Niedermayer michael at niedermayer.cc
Sun Aug 9 22:44:00 CEST 2015


On Wed, Jul 29, 2015 at 05:44:28AM +0100, Rostislav Pehlivanov wrote:
> This commit moves the quantization function to a separate file.
> This is done because the current extensions under development have
> separate files, and due to the fact that there was no way to get the
> distortion measurements from outside the aaccoder.c file a separate
> file had to be made. Most of the functions already had 'inline'
> as a property which made it easy to just move them to a separate
> file and include it when needed.
> No functionality has been changed with the exception of the removal
> of quantize_and_encode_band() from the list of function pointers.
> This was only used once inside aacenc.c and did not return distortion
> information, making it useless for any calculations done outside
> aaccoder.c. Also, because the quantizer function is identical for all
> coders and all coders use it it made no sense to keep the function
> pointer, therefore it was removed.
[...]

> diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
> index 80ada07..5edab13 100644
> --- a/libavcodec/aacenc.h
> +++ b/libavcodec/aacenc.h
> @@ -53,8 +53,6 @@ typedef struct AACCoefficientsEncoder {
>                                    SingleChannelElement *sce, const float lambda);
>      void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce,
>                                       int win, int group_len, const float lambda);
> -    void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, int size,
> -                                     int scale_idx, int cb, const float lambda, int rtz);
>      void (*set_special_band_scalefactors)(struct AACEncContext *s, SingleChannelElement *sce);
>      void (*search_for_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce);
>      void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe);

this would break mips build

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150809/abc45461/attachment.sig>


More information about the ffmpeg-devel mailing list