Skip to content

Commit

Permalink
prores encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostya Shishkov committed Feb 15, 2012
1 parent 8835c2c commit 1a265f6
Show file tree
Hide file tree
Showing 8 changed files with 861 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -7,6 +7,7 @@ version <next>:
- Support for fragmentation in the mov/mp4 muxer
- ISMV (Smooth Streaming) muxer
- CDXL demuxer and decoder
- Apple ProRes encoder


version 0.8:
Expand Down
2 changes: 1 addition & 1 deletion doc/general.texi
Expand Up @@ -406,7 +406,7 @@ following image formats are supported:
@tab Used in Chinese MP3 players.
@item ANSI/ASCII art @tab @tab X
@item Apple MJPEG-B @tab @tab X
@item Apple ProRes @tab @tab X
@item Apple ProRes @tab X @tab X
@item Apple QuickDraw @tab @tab X
@tab fourcc: qdrw
@item Asus v1 @tab X @tab X
Expand Down
1 change: 1 addition & 0 deletions libavcodec/Makefile
Expand Up @@ -302,6 +302,7 @@ OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
OBJS-$(CONFIG_PRORES_DECODER) += proresdec.o proresdata.o proresdsp.o
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc.o proresdata.o proresdsp.o
OBJS-$(CONFIG_PTX_DECODER) += ptx.o
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \
celp_filters.o acelp_vectors.o \
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/allcodecs.c
Expand Up @@ -168,7 +168,7 @@ void avcodec_register_all(void)
REGISTER_DECODER (PICTOR, pictor);
REGISTER_ENCDEC (PNG, png);
REGISTER_ENCDEC (PPM, ppm);
REGISTER_DECODER (PRORES, prores);
REGISTER_ENCDEC (PRORES, prores);
REGISTER_DECODER (PTX, ptx);
REGISTER_DECODER (QDRAW, qdraw);
REGISTER_DECODER (QPEG, qpeg);
Expand Down
17 changes: 17 additions & 0 deletions libavcodec/proresdsp.c
Expand Up @@ -51,13 +51,30 @@ static void prores_idct_put_c(uint16_t *out, int linesize, DCTELEM *block, const
put_pixels(out, linesize >> 1, block);
}

static void prores_fdct_c(const uint16_t *src, int linesize, DCTELEM *block)
{
int x, y;
const uint16_t *tsrc = src;

for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++)
block[y * 8 + x] = tsrc[x];
tsrc += linesize >> 1;
}
ff_jpeg_fdct_islow_10(block);
}

void ff_proresdsp_init(ProresDSPContext *dsp)
{
dsp->idct_put = prores_idct_put_c;
dsp->idct_permutation_type = FF_NO_IDCT_PERM;
dsp->fdct = prores_fdct_c;
dsp->dct_permutation_type = FF_NO_IDCT_PERM;

if (HAVE_MMX) ff_proresdsp_x86_init(dsp);

ff_init_scantable_permutation(dsp->idct_permutation,
dsp->idct_permutation_type);
ff_init_scantable_permutation(dsp->dct_permutation,
dsp->dct_permutation_type);
}
3 changes: 3 additions & 0 deletions libavcodec/proresdsp.h
Expand Up @@ -30,7 +30,10 @@
typedef struct {
int idct_permutation_type;
uint8_t idct_permutation[64];
int dct_permutation_type;
uint8_t dct_permutation[64];
void (* idct_put) (uint16_t *out, int linesize, DCTELEM *block, const int16_t *qmat);
void (* fdct) (const uint16_t *src, int linesize, DCTELEM *block);
} ProresDSPContext;

void ff_proresdsp_init(ProresDSPContext *dsp);
Expand Down

0 comments on commit 1a265f6

Please sign in to comment.