1 /* { dg-do compile } */
2 /* { dg-options "-O1 -mtune=amdfam10 -fexpensive-optimizations -fgcse -foptimize-register-move -freorder-blocks -fschedule-insns2 -funswitch-loops -fgcse-las -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" } */
6 typedef int vo_frame_t
;
7 __extension__
typedef __SIZE_TYPE__
size_t;
28 uint32_t bitstream_buf
;
30 uint8_t * bitstream_ptr
;
37 int coded_picture_width
;
38 int picture_structure
;
39 struct vo_frame_s
*current_frame
;}
43 int xvmc_last_slice_code
;}
45 static int bitstream_init (picture_t
* picture
, void *start
)
47 picture
->bitstream_ptr
= start
;
48 return (int) (size_t) start
;
50 static void slice_xvmc_init (picture_t
* picture
, int code
)
53 struct vo_frame_s
*forward_reference_frame
;
54 offset
= picture
->picture_structure
== 2;
55 picture
->pitches
[0] = picture
->current_frame
->pitches
[0];
56 picture
->pitches
[1] = picture
->current_frame
->pitches
[1];
61 = (char) (size_t) (forward_reference_frame
->base
+ (offset
? picture
->pitches
[0] : 0));
62 picture
->f_motion
.ref
[0][1] = (offset
);
63 if (picture
->picture_structure
)
64 picture
->pitches
[0] <<= picture
->pitches
[1] <<= 1;
68 if (picture
->bitstream_buf
>= 0x08000000)
70 switch (picture
->bitstream_buf
>> 12)
74 picture
->bitstream_buf
76 picture
->bitstream_ptr
[1] << picture
->bitstream_bits
;
79 picture
->offset
= (offset
);
80 while (picture
->offset
- picture
->coded_picture_width
>= 0)
82 picture
->offset
-= picture
->coded_picture_width
;
83 if (picture
->current_frame
)
85 picture
->dest
[0] += picture
->pitches
[0];
86 picture
->dest
[1] += picture
->pitches
[1];
88 picture
->v_offset
+= 16;
94 (mpeg2dec_accel_t
* accel
, picture_t
* picture
, int code
, uint8_t buffer
,int mba_inc
)
96 xine_xvmc_t
* xvmc
= (xine_xvmc_t
*) (size_t) bitstream_init (picture
, (void *) (size_t) buffer
);
97 slice_xvmc_init (picture
, code
);
102 switch (picture
->bitstream_buf
)
105 mba_inc
+= accel
->xvmc_last_slice_code
= code
;
106 xvmc
->proc_macro_block ();