Mercurial > libavcodec.hg
comparison imgresample.c @ 7823:4525dcd81357 libavcodec
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!
author | michael |
---|---|
date | Mon, 08 Sep 2008 14:24:59 +0000 |
parents | ccb0813842ea |
children | 4ce4a18cae8e |
comparison
equal
deleted
inserted
replaced
7822:67cfe4983e6d | 7823:4525dcd81357 |
---|---|
51 const AVClass *av_class; | 51 const AVClass *av_class; |
52 struct ImgReSampleContext *resampling_ctx; | 52 struct ImgReSampleContext *resampling_ctx; |
53 enum PixelFormat src_pix_fmt, dst_pix_fmt; | 53 enum PixelFormat src_pix_fmt, dst_pix_fmt; |
54 }; | 54 }; |
55 | 55 |
56 struct ImgReSampleContext { | 56 typedef struct ImgReSampleContext { |
57 int iwidth, iheight, owidth, oheight; | 57 int iwidth, iheight, owidth, oheight; |
58 int topBand, bottomBand, leftBand, rightBand; | 58 int topBand, bottomBand, leftBand, rightBand; |
59 int padtop, padbottom, padleft, padright; | 59 int padtop, padbottom, padleft, padright; |
60 int pad_owidth, pad_oheight; | 60 int pad_owidth, pad_oheight; |
61 int h_incr, v_incr; | 61 int h_incr, v_incr; |
62 DECLARE_ALIGNED_8(int16_t, h_filters[NB_PHASES][NB_TAPS]); /* horizontal filters */ | 62 DECLARE_ALIGNED_8(int16_t, h_filters[NB_PHASES][NB_TAPS]); /* horizontal filters */ |
63 DECLARE_ALIGNED_8(int16_t, v_filters[NB_PHASES][NB_TAPS]); /* vertical filters */ | 63 DECLARE_ALIGNED_8(int16_t, v_filters[NB_PHASES][NB_TAPS]); /* vertical filters */ |
64 uint8_t *line_buf; | 64 uint8_t *line_buf; |
65 }; | 65 } ImgReSampleContext; |
66 | 66 |
67 void av_build_filter(int16_t *filter, double factor, int tap_count, int phase_count, int scale, int type); | 67 void av_build_filter(int16_t *filter, double factor, int tap_count, int phase_count, int scale, int type); |
68 | 68 |
69 static inline int get_phase(int pos) | 69 static inline int get_phase(int pos) |
70 { | 70 { |
422 | 422 |
423 output += owrap; | 423 output += owrap; |
424 } | 424 } |
425 } | 425 } |
426 | 426 |
427 ImgReSampleContext *img_resample_init(int owidth, int oheight, | |
428 int iwidth, int iheight) | |
429 { | |
430 return img_resample_full_init(owidth, oheight, iwidth, iheight, | |
431 0, 0, 0, 0, 0, 0, 0, 0); | |
432 } | |
433 | |
434 ImgReSampleContext *img_resample_full_init(int owidth, int oheight, | 427 ImgReSampleContext *img_resample_full_init(int owidth, int oheight, |
435 int iwidth, int iheight, | 428 int iwidth, int iheight, |
436 int topBand, int bottomBand, | 429 int topBand, int bottomBand, |
437 int leftBand, int rightBand, | 430 int leftBand, int rightBand, |
438 int padtop, int padbottom, | 431 int padtop, int padbottom, |
480 | 473 |
481 return s; | 474 return s; |
482 fail: | 475 fail: |
483 av_free(s); | 476 av_free(s); |
484 return NULL; | 477 return NULL; |
478 } | |
479 | |
480 ImgReSampleContext *img_resample_init(int owidth, int oheight, | |
481 int iwidth, int iheight) | |
482 { | |
483 return img_resample_full_init(owidth, oheight, iwidth, iheight, | |
484 0, 0, 0, 0, 0, 0, 0, 0); | |
485 } | 485 } |
486 | 486 |
487 void img_resample(ImgReSampleContext *s, | 487 void img_resample(ImgReSampleContext *s, |
488 AVPicture *output, const AVPicture *input) | 488 AVPicture *output, const AVPicture *input) |
489 { | 489 { |