1. no longer use the register names directly and optimized code format 2. to be compatible with O32, specify type of address variable with mips_reg and handle the address variable with PTR_ operator 3. ff_pred16x16_plane_ functions only support N64 ABI now Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>tags/n3.1
| @@ -24,6 +24,7 @@ | |||||
| #include "constants.h" | #include "constants.h" | ||||
| DECLARE_ALIGNED(8, const uint64_t, ff_pw_1) = {0x0001000100010001ULL}; | DECLARE_ALIGNED(8, const uint64_t, ff_pw_1) = {0x0001000100010001ULL}; | ||||
| DECLARE_ALIGNED(8, const uint64_t, ff_pw_2) = {0x0002000200020002ULL}; | |||||
| DECLARE_ALIGNED(8, const uint64_t, ff_pw_3) = {0x0003000300030003ULL}; | DECLARE_ALIGNED(8, const uint64_t, ff_pw_3) = {0x0003000300030003ULL}; | ||||
| DECLARE_ALIGNED(8, const uint64_t, ff_pw_4) = {0x0004000400040004ULL}; | DECLARE_ALIGNED(8, const uint64_t, ff_pw_4) = {0x0004000400040004ULL}; | ||||
| DECLARE_ALIGNED(8, const uint64_t, ff_pw_5) = {0x0005000500050005ULL}; | DECLARE_ALIGNED(8, const uint64_t, ff_pw_5) = {0x0005000500050005ULL}; | ||||
| @@ -25,6 +25,7 @@ | |||||
| #include <stdint.h> | #include <stdint.h> | ||||
| extern const uint64_t ff_pw_1; | extern const uint64_t ff_pw_1; | ||||
| extern const uint64_t ff_pw_2; | |||||
| extern const uint64_t ff_pw_3; | extern const uint64_t ff_pw_3; | ||||
| extern const uint64_t ff_pw_4; | extern const uint64_t ff_pw_4; | ||||
| extern const uint64_t ff_pw_5; | extern const uint64_t ff_pw_5; | ||||
| @@ -115,23 +115,22 @@ static av_cold void h264_pred_init_mmi(H264PredContext *h, int codec_id, | |||||
| h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmi; | h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmi; | ||||
| h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmi; | h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmi; | ||||
| #if ARCH_MIPS64 | |||||
| switch (codec_id) { | switch (codec_id) { | ||||
| case AV_CODEC_ID_SVQ3: | case AV_CODEC_ID_SVQ3: | ||||
| h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmi; | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmi; | ||||
| ; | |||||
| break; | break; | ||||
| case AV_CODEC_ID_RV40: | case AV_CODEC_ID_RV40: | ||||
| h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_8_mmi; | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_8_mmi; | ||||
| ; | |||||
| break; | break; | ||||
| case AV_CODEC_ID_VP7: | case AV_CODEC_ID_VP7: | ||||
| case AV_CODEC_ID_VP8: | case AV_CODEC_ID_VP8: | ||||
| ; | |||||
| break; | break; | ||||
| default: | default: | ||||
| h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_8_mmi; | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_8_mmi; | ||||
| break; | break; | ||||
| } | } | ||||
| #endif | |||||
| if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) { | if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) { | ||||
| if (chroma_format_idc == 1) { | if (chroma_format_idc == 1) { | ||||