[FFmpeg-devel] [PATCH] avcodec/avdct: Add get_pixels()
Clément Bœsch
u at pkh.me
Wed Aug 6 11:19:56 CEST 2014
On Sat, Aug 02, 2014 at 09:05:56PM +0200, Michael Niedermayer wrote:
> TODO: version bump, update libavfilters to use it
>
> Suggested-by: ubitux
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/avdct.c | 9 +++++++++
> libavcodec/avdct.h | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/libavcodec/avdct.c b/libavcodec/avdct.c
> index 58f4974..2521256 100644
> --- a/libavcodec/avdct.c
> +++ b/libavcodec/avdct.c
> @@ -21,6 +21,7 @@
> #include "avcodec.h"
> #include "idctdsp.h"
> #include "fdctdsp.h"
> +#include "pixblockdsp.h"
> #include "avdct.h"
>
> #define OFFSET(x) offsetof(AVDCT,x)
> @@ -117,6 +118,14 @@ int avcodec_dct_init(AVDCT *dsp)
> }
> #endif
>
> +#if CONFIG_PIXBLOCKDSP
> + {
> + PixblockDSPContext pdsp;
> + ff_pixblockdsp_init(&pdsp, avctx);
> + COPY(pdsp, get_pixels);
> + }
> +#endif
> +
> avcodec_close(avctx);
> av_free(avctx);
>
> diff --git a/libavcodec/avdct.h b/libavcodec/avdct.h
> index 4c9d00f..4190203 100644
> --- a/libavcodec/avdct.h
> +++ b/libavcodec/avdct.h
> @@ -61,6 +61,10 @@ typedef struct AVDCT {
> * must use AVOptions to set this field.
> */
> int idct_algo;
> +
> + void (*get_pixels)(int16_t *block /* align 16 */,
> + const uint8_t *pixels /* align 8 */,
> + int line_size);
We will sooner or later need a ptrdiff_t linesize here. Since it's public
but only recently added I would suggest to make that change not to late.
Also, a doxy could help.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140806/211c8eda/attachment.asc>
More information about the ffmpeg-devel
mailing list