This reduces code duplication and differences with the fork.
Showing the changes to libavcodec/arm (1 of 4 files). Show all
Unified · Split
| @@ -30,8 +30,8 @@ · 29 unmodified lines | |||
| 30 | #include "idctdsp_arm.h" | 30 | #include "idctdsp_arm.h" |
| 31 | 31 | ||
| 32 | /* XXX: local hack */ | 32 | /* XXX: local hack */ |
| 33 | static void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size); | 33 | static void (*put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size); |
| 34 | static void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size); | 34 | static void (*add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size); |
| 35 | 35 | ||
| 36 | void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest, | 36 | void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest, |
| 37 | int line_size); | 37 | int line_size); |
| @@ -41,25 +41,25 @@ void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest, · 3 unmodified lines | |||
| 41 | static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block) | 41 | static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block) |
| 42 | { | 42 | { |
| 43 | ff_j_rev_dct_arm(block); | 43 | ff_j_rev_dct_arm(block); |
| 44 | ff_put_pixels_clamped(block, dest, line_size); | 44 | put_pixels_clamped(block, dest, line_size); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block) | 47 | static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block) |
| 48 | { | 48 | { |
| 49 | ff_j_rev_dct_arm(block); | 49 | ff_j_rev_dct_arm(block); |
| 50 | ff_add_pixels_clamped(block, dest, line_size); | 50 | add_pixels_clamped(block, dest, line_size); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block) | 53 | static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block) |
| 54 | { | 54 | { |
| 55 | ff_simple_idct_arm(block); | 55 | ff_simple_idct_arm(block); |
| 56 | ff_put_pixels_clamped(block, dest, line_size); | 56 | put_pixels_clamped(block, dest, line_size); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block) | 59 | static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block) |
| 60 | { | 60 | { |
| 61 | ff_simple_idct_arm(block); | 61 | ff_simple_idct_arm(block); |
| 62 | ff_add_pixels_clamped(block, dest, line_size); | 62 | add_pixels_clamped(block, dest, line_size); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx, | 65 | av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx, |
| @@ -67,8 +67,8 @@ av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx, · 1 unmodified line | |||
| 67 | { | 67 | { |
| 68 | int cpu_flags = av_get_cpu_flags(); | 68 | int cpu_flags = av_get_cpu_flags(); |
| 69 | 69 | ||
| 70 | ff_put_pixels_clamped = c->put_pixels_clamped; | 70 | put_pixels_clamped = c->put_pixels_clamped; |
| 71 | ff_add_pixels_clamped = c->add_pixels_clamped; | 71 | add_pixels_clamped = c->add_pixels_clamped; |
| 72 | 72 | ||
| 73 | if (!avctx->lowres && !high_bit_depth) { | 73 | if (!avctx->lowres && !high_bit_depth) { |
| 74 | if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) || | 74 | if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) || |