Skip to content
Snippets Groups Projects
Commit ec642ecf authored by Petter Reinholdtsen's avatar Petter Reinholdtsen
Browse files

Replaced more possible bit shifting into signed bit of stride values.

Leftover changes from a6766c94.

Use multiplication instead, allowing the compiler to optimize to
bitshifts if it believe it to be safe.

Partly solves github issue #18.
parent 2dc3bd8a
No related branches found
No related tags found
1 merge request!34Replaced more possible bit shifting into signed bit of stride values.
Pipeline #6239 passed
......@@ -436,7 +436,7 @@ void oc_state_loop_filter_frag_rows_c64x(const oc_theora_state *_state,
loop_filter_h(ref+8,ystride,ll);
}
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
loop_filter_v(ref+(ystride<<3),ystride,ll);
loop_filter_v(ref+(ystride*8),ystride,ll);
}
}
fragi++;
......
......@@ -146,7 +146,7 @@ void oc_state_loop_filter_frag_rows_mmx(const oc_theora_state *_state,
OC_LOOP_FILTER_H(OC_LOOP_FILTER8_MMX,ref+8,ystride,ll);
}
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMX,ref+(ystride<<3),ystride,ll);
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMX,ref+(ystride*8),ystride,ll);
}
}
fragi++;
......@@ -213,7 +213,7 @@ void oc_state_loop_filter_frag_rows_mmxext(const oc_theora_state *_state,
OC_LOOP_FILTER_H(OC_LOOP_FILTER8_MMXEXT,ref+8,ystride,_bv);
}
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMXEXT,ref+(ystride<<3),ystride,_bv);
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMXEXT,ref+(ystride*8),ystride,_bv);
}
}
fragi++;
......
......@@ -157,7 +157,7 @@ void oc_state_loop_filter_frag_rows_mmx(const oc_theora_state *_state,
OC_LOOP_FILTER_H_MMX(ref+8,ystride,_bv);
}
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
OC_LOOP_FILTER_V_MMX(ref+(ystride<<3),ystride,_bv);
OC_LOOP_FILTER_V_MMX(ref+(ystride*8),ystride,_bv);
}
#undef PIX
#undef YSTRIDE3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment