* qatar/master: build: remove empty $(OBJS) target build: make rule for linking ff* apply only to these targets build: rearrange some lines in a more logical way s302m: fix resampling for 16 and 24bits. ARM: remove MUL64 and MAC64 inline asm build: clean up .PHONY lists build: move all (un)install* target aliases to toplevel Makefile flvenc: propagate error properly build: remove stale dependency build: do not add CFLAGS-yes to CFLAGS utils.c: fix crash with threading enabled. configure: simplify source_path setup configure: remove --source-path option lavf: deprecate AVFormatParameters.time_base. img2: add framerate private option. img2: add video_size private option. img2: add pixel_format private option. tty: add framerate private option. Conflicts: Makefile configure
Showing the changes to libavcodec (2 of 9 files). Show all
Unified · Split
| @@ -28,45 +28,16 @@ · 27 unmodified lines | |||
| 28 | 28 | ||
| 29 | #if HAVE_INLINE_ASM | 29 | #if HAVE_INLINE_ASM |
| 30 | 30 | ||
| 31 | #define MULH MULH | ||
| 32 | #define MUL64 MUL64 | ||
| 33 | |||
| 34 | #if HAVE_ARMV6 | 31 | #if HAVE_ARMV6 |
| 32 | #define MULH MULH | ||
| 35 | static inline av_const int MULH(int a, int b) | 33 | static inline av_const int MULH(int a, int b) |
| 36 | { | 34 | { |
| 37 | int r; | 35 | int r; |
| 38 | __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); | 36 | __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); |
| 39 | return r; | 37 | return r; |
| 40 | } | 38 | } |
| 41 | |||
| 42 | static inline av_const int64_t MUL64(int a, int b) | ||
| 43 | { | ||
| 44 | int64_t x; | ||
| 45 | __asm__ ("smull %Q0, %R0, %1, %2" : "=r"(x) : "r"(a), "r"(b)); | ||
| 46 | return x; | ||
| 47 | } | ||
| 48 | #else | ||
| 49 | static inline av_const int MULH(int a, int b) | ||
| 50 | { | ||
| 51 | int lo, hi; | ||
| 52 | __asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a)); | ||
| 53 | return hi; | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline av_const int64_t MUL64(int a, int b) | ||
| 57 | { | ||
| 58 | int64_t x; | ||
| 59 | __asm__ ("smull %Q0, %R0, %1, %2" : "=&r"(x) : "r"(a), "r"(b)); | ||
| 60 | return x; | ||
| 61 | } | ||
| 62 | #endif | 39 | #endif |
| 63 | 40 | ||
| 64 | static inline av_const int64_t MAC64(int64_t d, int a, int b) | ||
| 65 | { | ||
| 66 | __asm__ ("smlal %Q0, %R0, %1, %2" : "+r"(d) : "r"(a), "r"(b)); | ||
| 67 | return d; | ||
| 68 | } | ||
| 69 | #define MAC64(d, a, b) ((d) = MAC64(d, a, b)) | ||
| 70 | #define MLS64(d, a, b) MAC64(d, -(a), b) | 41 | #define MLS64(d, a, b) MAC64(d, -(a), b) |
| 71 | 42 | ||
| 72 | #if HAVE_ARMV5TE | 43 | #if HAVE_ARMV5TE |
| @@ -107,7 +107,7 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data, · 106 unmodified lines | |||
| 107 | *o++ = (av_reverse[buf[6] & 0xf0] << 28) | | 107 | *o++ = (av_reverse[buf[6] & 0xf0] << 28) | |
| 108 | (av_reverse[buf[5]] << 20) | | 108 | (av_reverse[buf[5]] << 20) | |
| 109 | (av_reverse[buf[4]] << 12) | | 109 | (av_reverse[buf[4]] << 12) | |
| 110 | (av_reverse[buf[3] & 0x0f] << 8); | 110 | (av_reverse[buf[3] & 0x0f] << 4); |
| 111 | buf += 7; | 111 | buf += 7; |
| 112 | } | 112 | } |
| 113 | *data_size = (uint8_t*) o - (uint8_t*) data; | 113 | *data_size = (uint8_t*) o - (uint8_t*) data; |
| @@ -130,7 +130,7 @@ static int s302m_decode_frame(AVCodecContext *avctx, void *data, · 16 unmodified lines | |||
| 130 | av_reverse[buf[0]]; | 130 | av_reverse[buf[0]]; |
| 131 | *o++ = (av_reverse[buf[4] & 0xf0] << 12) | | 131 | *o++ = (av_reverse[buf[4] & 0xf0] << 12) | |
| 132 | (av_reverse[buf[3]] << 4) | | 132 | (av_reverse[buf[3]] << 4) | |
| 133 | av_reverse[buf[2] & 0x0f]; | 133 | (av_reverse[buf[2]] >> 4); |
| 134 | buf += 5; | 134 | buf += 5; |
| 135 | } | 135 | } |
| 136 | *data_size = (uint8_t*) o - (uint8_t*) data; | 136 | *data_size = (uint8_t*) o - (uint8_t*) data; |