vc1dec: Update destination pointers in context for fields

This replaces a large number of checks for the second field by
fixing the pointers when they are setup.

This should also fix I/BI field pictures.

Changes checksums for vc1_sa10143, the file becomes slightly closer
to what the reference decoder outputs.

Based on "vc1dec: the second field is written wrong to the picture"
by Sebastian Sandberg <sebastiand.sandberg@gmail.com>.

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Fix tff == 0 handling in init_block_index()

This fixes several files from VLC ticket 5887.

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Factorize srcU/V offseting

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Factorize picture pointer selection code

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Factorize picture pointer selection in vc1_mc_4mv_chroma()

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Fix current ptr selection in vc1_mc_4mv_chroma()

No sample tried shows a difference.

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1, mss2: Check for any negative return value from ff_vc1_parse_frame_header

This is required if we return other error codes than explicitly
-1, which so far has been the only other possible return value
besides 0.

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Do not allow field_mode to change after the first header

This fixes out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1dec: Remove some now unused variables

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1: Move INIT_LUT() further up to allow using it in more places

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1: Simplify code by using INIT_LUT()

Signed-off-by: Martin Storsjö <martin@martin.st>
vc1: Make INIT_LUT() self contained

Move the local variables it uses into the macro, enclosing them
in a do {} while (0) scope.

Signed-off-by: Martin Storsjö <martin@martin.st>