Fixes invalid memory access.
Unified · Split
| @@ -91,7 +91,7 @@ static av_cold void h264dsp_init_neon(H264DSPContext *c, const int bit_depth, · 90 unmodified lines | |||
| 91 | c->h264_idct_dc_add = ff_h264_idct_dc_add_neon; | 91 | c->h264_idct_dc_add = ff_h264_idct_dc_add_neon; |
| 92 | c->h264_idct_add16 = ff_h264_idct_add16_neon; | 92 | c->h264_idct_add16 = ff_h264_idct_add16_neon; |
| 93 | c->h264_idct_add16intra = ff_h264_idct_add16intra_neon; | 93 | c->h264_idct_add16intra = ff_h264_idct_add16intra_neon; |
| 94 | if (chroma_format_idc == 1) | 94 | if (chroma_format_idc <= 1) |
| 95 | c->h264_idct_add8 = ff_h264_idct_add8_neon; | 95 | c->h264_idct_add8 = ff_h264_idct_add8_neon; |
| 96 | c->h264_idct8_add = ff_h264_idct8_add_neon; | 96 | c->h264_idct8_add = ff_h264_idct8_add_neon; |
| 97 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon; | 97 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_neon; |
| @@ -104,13 +104,13 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, · 103 unmodified lines | |||
| 104 | c->h264_idct8_dc_add= FUNC(ff_h264_idct8_dc_add, depth);\ | 104 | c->h264_idct8_dc_add= FUNC(ff_h264_idct8_dc_add, depth);\ |
| 105 | c->h264_idct_add16 = FUNC(ff_h264_idct_add16, depth);\ | 105 | c->h264_idct_add16 = FUNC(ff_h264_idct_add16, depth);\ |
| 106 | c->h264_idct8_add4 = FUNC(ff_h264_idct8_add4, depth);\ | 106 | c->h264_idct8_add4 = FUNC(ff_h264_idct8_add4, depth);\ |
| 107 | if (chroma_format_idc == 1)\ | 107 | if (chroma_format_idc <= 1)\ |
| 108 | c->h264_idct_add8 = FUNC(ff_h264_idct_add8, depth);\ | 108 | c->h264_idct_add8 = FUNC(ff_h264_idct_add8, depth);\ |
| 109 | else\ | 109 | else\ |
| 110 | c->h264_idct_add8 = FUNC(ff_h264_idct_add8_422, depth);\ | 110 | c->h264_idct_add8 = FUNC(ff_h264_idct_add8_422, depth);\ |
| 111 | c->h264_idct_add16intra= FUNC(ff_h264_idct_add16intra, depth);\ | 111 | c->h264_idct_add16intra= FUNC(ff_h264_idct_add16intra, depth);\ |
| 112 | c->h264_luma_dc_dequant_idct= FUNC(ff_h264_luma_dc_dequant_idct, depth);\ | 112 | c->h264_luma_dc_dequant_idct= FUNC(ff_h264_luma_dc_dequant_idct, depth);\ |
| 113 | if (chroma_format_idc == 1)\ | 113 | if (chroma_format_idc <= 1)\ |
| 114 | c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma_dc_dequant_idct, depth);\ | 114 | c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma_dc_dequant_idct, depth);\ |
| 115 | else\ | 115 | else\ |
| 116 | c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma422_dc_dequant_idct, depth);\ | 116 | c->h264_chroma_dc_dequant_idct= FUNC(ff_h264_chroma422_dc_dequant_idct, depth);\ |
| @@ -131,20 +131,20 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, · 14 unmodified lines | |||
| 131 | c->h264_h_loop_filter_luma_intra= FUNC(h264_h_loop_filter_luma_intra, depth);\ | 131 | c->h264_h_loop_filter_luma_intra= FUNC(h264_h_loop_filter_luma_intra, depth);\ |
| 132 | c->h264_h_loop_filter_luma_mbaff_intra= FUNC(h264_h_loop_filter_luma_mbaff_intra, depth);\ | 132 | c->h264_h_loop_filter_luma_mbaff_intra= FUNC(h264_h_loop_filter_luma_mbaff_intra, depth);\ |
| 133 | c->h264_v_loop_filter_chroma= FUNC(h264_v_loop_filter_chroma, depth);\ | 133 | c->h264_v_loop_filter_chroma= FUNC(h264_v_loop_filter_chroma, depth);\ |
| 134 | if (chroma_format_idc == 1)\ | 134 | if (chroma_format_idc <= 1)\ |
| 135 | c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma, depth);\ | 135 | c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma, depth);\ |
| 136 | else\ | 136 | else\ |
| 137 | c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma422, depth);\ | 137 | c->h264_h_loop_filter_chroma= FUNC(h264_h_loop_filter_chroma422, depth);\ |
| 138 | if (chroma_format_idc == 1)\ | 138 | if (chroma_format_idc <= 1)\ |
| 139 | c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma_mbaff, depth);\ | 139 | c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma_mbaff, depth);\ |
| 140 | else\ | 140 | else\ |
| 141 | c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma422_mbaff, depth);\ | 141 | c->h264_h_loop_filter_chroma_mbaff= FUNC(h264_h_loop_filter_chroma422_mbaff, depth);\ |
| 142 | c->h264_v_loop_filter_chroma_intra= FUNC(h264_v_loop_filter_chroma_intra, depth);\ | 142 | c->h264_v_loop_filter_chroma_intra= FUNC(h264_v_loop_filter_chroma_intra, depth);\ |
| 143 | if (chroma_format_idc == 1)\ | 143 | if (chroma_format_idc <= 1)\ |
| 144 | c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma_intra, depth);\ | 144 | c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma_intra, depth);\ |
| 145 | else\ | 145 | else\ |
| 146 | c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma422_intra, depth);\ | 146 | c->h264_h_loop_filter_chroma_intra= FUNC(h264_h_loop_filter_chroma422_intra, depth);\ |
| 147 | if (chroma_format_idc == 1)\ | 147 | if (chroma_format_idc <= 1)\ |
| 148 | c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\ | 148 | c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma_mbaff_intra, depth);\ |
| 149 | else\ | 149 | else\ |
| 150 | c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma422_mbaff_intra, depth);\ | 150 | c->h264_h_loop_filter_chroma_mbaff_intra= FUNC(h264_h_loop_filter_chroma422_mbaff_intra, depth);\ |
| @@ -472,7 +472,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 471 unmodified lines | |||
| 472 | h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\ | 472 | h->pred8x8l[TOP_DC_PRED ]= FUNCC(pred8x8l_top_dc , depth);\ |
| 473 | h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\ | 473 | h->pred8x8l[DC_128_PRED ]= FUNCC(pred8x8l_128_dc , depth);\ |
| 474 | \ | 474 | \ |
| 475 | if (chroma_format_idc == 1) {\ | 475 | if (chroma_format_idc <= 1) {\ |
| 476 | h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\ | 476 | h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x8_vertical , depth);\ |
| 477 | h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\ | 477 | h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x8_horizontal , depth);\ |
| 478 | } else {\ | 478 | } else {\ |
| @@ -480,7 +480,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 1 unmodified line | |||
| 480 | h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\ | 480 | h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\ |
| 481 | }\ | 481 | }\ |
| 482 | if (codec_id != AV_CODEC_ID_VP8) {\ | 482 | if (codec_id != AV_CODEC_ID_VP8) {\ |
| 483 | if (chroma_format_idc == 1) {\ | 483 | if (chroma_format_idc <= 1) {\ |
| 484 | h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\ | 484 | h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\ |
| 485 | } else {\ | 485 | } else {\ |
| 486 | h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x16_plane , depth);\ | 486 | h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x16_plane , depth);\ |
| @@ -488,7 +488,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 1 unmodified line | |||
| 488 | } else\ | 488 | } else\ |
| 489 | h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\ | 489 | h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\ |
| 490 | if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\ | 490 | if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\ |
| 491 | if (chroma_format_idc == 1) {\ | 491 | if (chroma_format_idc <= 1) {\ |
| 492 | h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\ | 492 | h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\ |
| 493 | h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\ | 493 | h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\ |
| 494 | h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\ | 494 | h->pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc , depth);\ |
| @@ -514,7 +514,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 19 unmodified lines | |||
| 514 | h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\ | 514 | h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\ |
| 515 | }\ | 515 | }\ |
| 516 | }\ | 516 | }\ |
| 517 | if (chroma_format_idc == 1) {\ | 517 | if (chroma_format_idc <= 1) {\ |
| 518 | h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\ | 518 | h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x8_128_dc , depth);\ |
| 519 | } else {\ | 519 | } else {\ |
| 520 | h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x16_128_dc , depth);\ | 520 | h->pred8x8[DC_128_PRED8x8 ]= FUNCC(pred8x16_128_dc , depth);\ |
| @@ -548,7 +548,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id, · 27 unmodified lines | |||
| 548 | h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\ | 548 | h->pred4x4_add [ HOR_PRED ]= FUNCC(pred4x4_horizontal_add , depth);\ |
| 549 | h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\ | 549 | h->pred8x8l_add [VERT_PRED ]= FUNCC(pred8x8l_vertical_add , depth);\ |
| 550 | h->pred8x8l_add [ HOR_PRED ]= FUNCC(pred8x8l_horizontal_add , depth);\ | 550 | h->pred8x8l_add [ HOR_PRED ]= FUNCC(pred8x8l_horizontal_add , depth);\ |
| 551 | if (chroma_format_idc == 1) {\ | 551 | if (chroma_format_idc <= 1) {\ |
| 552 | h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x8_vertical_add , depth);\ | 552 | h->pred8x8_add [VERT_PRED8x8]= FUNCC(pred8x8_vertical_add , depth);\ |
| 553 | h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x8_horizontal_add , depth);\ | 553 | h->pred8x8_add [ HOR_PRED8x8]= FUNCC(pred8x8_horizontal_add , depth);\ |
| 554 | } else {\ | 554 | } else {\ |
| @@ -750,7 +750,7 @@ av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, · 749 unmodified lines | |||
| 750 | 750 | ||
| 751 | if (bit_depth == 8) { | 751 | if (bit_depth == 8) { |
| 752 | c->h264_idct_add = h264_idct_add_altivec; | 752 | c->h264_idct_add = h264_idct_add_altivec; |
| 753 | if (chroma_format_idc == 1) | 753 | if (chroma_format_idc <= 1) |
| 754 | c->h264_idct_add8 = h264_idct_add8_altivec; | 754 | c->h264_idct_add8 = h264_idct_add8_altivec; |
| 755 | c->h264_idct_add16 = h264_idct_add16_altivec; | 755 | c->h264_idct_add16 = h264_idct_add16_altivec; |
| 756 | c->h264_idct_add16intra = h264_idct_add16intra_altivec; | 756 | c->h264_idct_add16intra = h264_idct_add16intra_altivec; |
| @@ -191,7 +191,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 190 unmodified lines | |||
| 191 | if (EXTERNAL_MMX(cpu_flags)) { | 191 | if (EXTERNAL_MMX(cpu_flags)) { |
| 192 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx; | 192 | h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx; |
| 193 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx; | 193 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx; |
| 194 | if (chroma_format_idc == 1) { | 194 | if (chroma_format_idc <= 1) { |
| 195 | h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_8_mmx; | 195 | h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_8_mmx; |
| 196 | h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmx; | 196 | h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmx; |
| 197 | } | 197 | } |
| @@ -200,7 +200,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 2 unmodified lines | |||
| 200 | h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmx; | 200 | h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmx; |
| 201 | h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmx; | 201 | h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmx; |
| 202 | } else { | 202 | } else { |
| 203 | if (chroma_format_idc == 1) | 203 | if (chroma_format_idc <= 1) |
| 204 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx; | 204 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx; |
| 205 | if (codec_id == AV_CODEC_ID_SVQ3) { | 205 | if (codec_id == AV_CODEC_ID_SVQ3) { |
| 206 | if (cpu_flags & AV_CPU_FLAG_CMOV) | 206 | if (cpu_flags & AV_CPU_FLAG_CMOV) |
| @@ -216,7 +216,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 9 unmodified lines | |||
| 216 | if (EXTERNAL_MMXEXT(cpu_flags)) { | 216 | if (EXTERNAL_MMXEXT(cpu_flags)) { |
| 217 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext; | 217 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext; |
| 218 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext; | 218 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext; |
| 219 | if (chroma_format_idc == 1) | 219 | if (chroma_format_idc <= 1) |
| 220 | h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmxext; | 220 | h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmxext; |
| 221 | h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmxext; | 221 | h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmxext; |
| 222 | h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmxext; | 222 | h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmxext; |
| @@ -241,7 +241,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 18 unmodified lines | |||
| 241 | h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_8_mmxext; | 241 | h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_8_mmxext; |
| 242 | } | 242 | } |
| 243 | if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) { | 243 | if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) { |
| 244 | if (chroma_format_idc == 1) { | 244 | if (chroma_format_idc <= 1) { |
| 245 | h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_8_mmxext; | 245 | h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_8_mmxext; |
| 246 | h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_8_mmxext; | 246 | h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_8_mmxext; |
| 247 | } | 247 | } |
| @@ -253,7 +253,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 5 unmodified lines | |||
| 253 | h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmxext; | 253 | h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmxext; |
| 254 | h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_8_mmxext; | 254 | h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_8_mmxext; |
| 255 | } else { | 255 | } else { |
| 256 | if (chroma_format_idc == 1) | 256 | if (chroma_format_idc <= 1) |
| 257 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmxext; | 257 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmxext; |
| 258 | if (codec_id == AV_CODEC_ID_SVQ3) { | 258 | if (codec_id == AV_CODEC_ID_SVQ3) { |
| 259 | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmxext; | 259 | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmxext; |
| @@ -280,7 +280,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 20 unmodified lines | |||
| 280 | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_sse2; | 280 | h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_sse2; |
| 281 | h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_sse2; | 281 | h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_sse2; |
| 282 | } else { | 282 | } else { |
| 283 | if (chroma_format_idc == 1) | 283 | if (chroma_format_idc <= 1) |
| 284 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_sse2; | 284 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_sse2; |
| 285 | if (codec_id == AV_CODEC_ID_SVQ3) { | 285 | if (codec_id == AV_CODEC_ID_SVQ3) { |
| 286 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_sse2; | 286 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_sse2; |
| @@ -295,7 +295,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 8 unmodified lines | |||
| 295 | if (EXTERNAL_SSSE3(cpu_flags)) { | 295 | if (EXTERNAL_SSSE3(cpu_flags)) { |
| 296 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3; | 296 | h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3; |
| 297 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3; | 297 | h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3; |
| 298 | if (chroma_format_idc == 1) | 298 | if (chroma_format_idc <= 1) |
| 299 | h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_ssse3; | 299 | h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_ssse3; |
| 300 | h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_ssse3; | 300 | h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_ssse3; |
| 301 | h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_ssse3; | 301 | h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_ssse3; |
| @@ -311,7 +311,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 9 unmodified lines | |||
| 311 | h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_ssse3; | 311 | h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_ssse3; |
| 312 | h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_ssse3; | 312 | h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_ssse3; |
| 313 | } else { | 313 | } else { |
| 314 | if (chroma_format_idc == 1) | 314 | if (chroma_format_idc <= 1) |
| 315 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_ssse3; | 315 | h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_ssse3; |
| 316 | if (codec_id == AV_CODEC_ID_SVQ3) { | 316 | if (codec_id == AV_CODEC_ID_SVQ3) { |
| 317 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_ssse3; | 317 | h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_ssse3; |
| @@ -327,7 +327,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 9 unmodified lines | |||
| 327 | h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext; | 327 | h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext; |
| 328 | h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext; | 328 | h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext; |
| 329 | 329 | ||
| 330 | if (chroma_format_idc == 1) | 330 | if (chroma_format_idc <= 1) |
| 331 | h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext; | 331 | h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext; |
| 332 | 332 | ||
| 333 | h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext; | 333 | h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext; |
| @@ -346,7 +346,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, · 12 unmodified lines | |||
| 346 | h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_sse2; | 346 | h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_sse2; |
| 347 | h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_sse2; | 347 | h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_sse2; |
| 348 | 348 | ||
| 349 | if (chroma_format_idc == 1) { | 349 | if (chroma_format_idc <= 1) { |
| 350 | h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_sse2; | 350 | h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_sse2; |
| 351 | h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_10_sse2; | 351 | h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_10_sse2; |
| 352 | h->pred8x8[PLANE_PRED8x8 ] = ff_pred8x8_plane_10_sse2; | 352 | h->pred8x8[PLANE_PRED8x8 ] = ff_pred8x8_plane_10_sse2; |
| @@ -213,7 +213,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 212 unmodified lines | |||
| 213 | { | 213 | { |
| 214 | int cpu_flags = av_get_cpu_flags(); | 214 | int cpu_flags = av_get_cpu_flags(); |
| 215 | 215 | ||
| 216 | if (chroma_format_idc == 1 && EXTERNAL_MMXEXT(cpu_flags)) | 216 | if (chroma_format_idc <= 1 && EXTERNAL_MMXEXT(cpu_flags)) |
| 217 | c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext; | 217 | c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext; |
| 218 | 218 | ||
| 219 | if (bit_depth == 8) { | 219 | if (bit_depth == 8) { |
| @@ -225,7 +225,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 5 unmodified lines | |||
| 225 | 225 | ||
| 226 | c->h264_idct_add16 = ff_h264_idct_add16_8_mmx; | 226 | c->h264_idct_add16 = ff_h264_idct_add16_8_mmx; |
| 227 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmx; | 227 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmx; |
| 228 | if (chroma_format_idc == 1) | 228 | if (chroma_format_idc <= 1) |
| 229 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; | 229 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmx; |
| 230 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx; | 230 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx; |
| 231 | if (cpu_flags & AV_CPU_FLAG_CMOV) | 231 | if (cpu_flags & AV_CPU_FLAG_CMOV) |
| @@ -236,13 +236,13 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 4 unmodified lines | |||
| 236 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext; | 236 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext; |
| 237 | c->h264_idct_add16 = ff_h264_idct_add16_8_mmxext; | 237 | c->h264_idct_add16 = ff_h264_idct_add16_8_mmxext; |
| 238 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmxext; | 238 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_mmxext; |
| 239 | if (chroma_format_idc == 1) | 239 | if (chroma_format_idc <= 1) |
| 240 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmxext; | 240 | c->h264_idct_add8 = ff_h264_idct_add8_8_mmxext; |
| 241 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmxext; | 241 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmxext; |
| 242 | 242 | ||
| 243 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_mmxext; | 243 | c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_mmxext; |
| 244 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmxext; | 244 | c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmxext; |
| 245 | if (chroma_format_idc == 1) { | 245 | if (chroma_format_idc <= 1) { |
| 246 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_mmxext; | 246 | c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_mmxext; |
| 247 | c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmxext; | 247 | c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmxext; |
| 248 | } | 248 | } |
| @@ -265,7 +265,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 16 unmodified lines | |||
| 265 | 265 | ||
| 266 | c->h264_idct_add16 = ff_h264_idct_add16_8_sse2; | 266 | c->h264_idct_add16 = ff_h264_idct_add16_8_sse2; |
| 267 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_sse2; | 267 | c->h264_idct8_add4 = ff_h264_idct8_add4_8_sse2; |
| 268 | if (chroma_format_idc == 1) | 268 | if (chroma_format_idc <= 1) |
| 269 | c->h264_idct_add8 = ff_h264_idct_add8_8_sse2; | 269 | c->h264_idct_add8 = ff_h264_idct_add8_8_sse2; |
| 270 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_sse2; | 270 | c->h264_idct_add16intra = ff_h264_idct_add16intra_8_sse2; |
| 271 | c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_sse2; | 271 | c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_sse2; |
| @@ -308,7 +308,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 36 unmodified lines | |||
| 308 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2; | 308 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2; |
| 309 | 309 | ||
| 310 | c->h264_idct_add16 = ff_h264_idct_add16_10_sse2; | 310 | c->h264_idct_add16 = ff_h264_idct_add16_10_sse2; |
| 311 | if (chroma_format_idc == 1) | 311 | if (chroma_format_idc <= 1) |
| 312 | c->h264_idct_add8 = ff_h264_idct_add8_10_sse2; | 312 | c->h264_idct_add8 = ff_h264_idct_add8_10_sse2; |
| 313 | c->h264_idct_add16intra = ff_h264_idct_add16intra_10_sse2; | 313 | c->h264_idct_add16intra = ff_h264_idct_add16intra_10_sse2; |
| 314 | #if HAVE_ALIGNED_STACK | 314 | #if HAVE_ALIGNED_STACK |
| @@ -348,7 +348,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 33 unmodified lines | |||
| 348 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx; | 348 | c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_avx; |
| 349 | 349 | ||
| 350 | c->h264_idct_add16 = ff_h264_idct_add16_10_avx; | 350 | c->h264_idct_add16 = ff_h264_idct_add16_10_avx; |
| 351 | if (chroma_format_idc == 1) | 351 | if (chroma_format_idc <= 1) |
| 352 | c->h264_idct_add8 = ff_h264_idct_add8_10_avx; | 352 | c->h264_idct_add8 = ff_h264_idct_add8_10_avx; |
| 353 | c->h264_idct_add16intra = ff_h264_idct_add16intra_10_avx; | 353 | c->h264_idct_add16intra = ff_h264_idct_add16intra_10_avx; |
| 354 | #if HAVE_ALIGNED_STACK | 354 | #if HAVE_ALIGNED_STACK |