00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _REBUF_H_
00011 #define _REBUF_H_
00012
00013 #include "mbuffer.h"
00014
00015
00016
00017
00018
00019
00020
00021
00022 static inline imgpel *UMVLine4X (StorablePicture *ref, int y, int x)
00023 {
00024 #if (PAD_AFTER)
00025 y += IMG_PAD_SIZE_TIMES4;
00026 x += IMG_PAD_SIZE_TIMES4;
00027 #endif
00028 return &(ref->p_curr_img_sub[(y & 0x03)][(x & 0x03)][iClip3( 0, ref->size_y_pad, y >> 2)][iClip3( 0, ref->size_x_pad, x >> 2)]);
00029 }
00030
00031
00032
00033
00034
00035
00036
00037
00038 static inline imgpel *UMVLine4Xcr (StorablePicture *ref, int cmp, int y, int x)
00039 {
00040 #if (PAD_AFTER)
00041 y += IMG_PAD_SIZE_TIMES4;
00042 x += IMG_PAD_SIZE_TIMES4;
00043 #endif
00044 return &(ref->p_img_sub[cmp][(y & 0x03)][(x & 0x03)][iClip3( 0, ref->size_y_cr_pad, y >> 2)][iClip3( 0, ref->size_x_cr_pad, x >> 2)]);
00045 }
00046
00047
00048
00049
00050
00051
00052
00053
00054 static inline imgpel *FastLine4X (StorablePicture *ref, int y, int x)
00055 {
00056 #if (PAD_AFTER)
00057 y += IMG_PAD_SIZE_TIMES4;
00058 x += IMG_PAD_SIZE_TIMES4;
00059 #endif
00060 return &(ref->p_curr_img_sub[(y & 0x03)][(x & 0x03)][y >> 2][x >> 2]);
00061 }
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 static inline imgpel *UMVLine8X_chroma (StorablePicture *ref, int cmp, int y, int x)
00072 {
00073 #if (PAD_AFTER)
00074 y += IMG_PAD_SIZE_TIMES4;
00075 x += IMG_PAD_SIZE_TIMES4;
00076 #endif
00077 return &(ref->p_img_sub[cmp][y & ref->chroma_mask_mv_y][x & ref->chroma_mask_mv_x][iClip3 (0, ref->size_y_cr_pad, y >> ref->chroma_shift_y)][iClip3 (0, ref->size_x_cr_pad, x >> ref->chroma_shift_x)]);
00078 }
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 static inline imgpel *FastLine8X_chroma (StorablePicture *ref, int cmp, int y, int x)
00089 {
00090 #if (PAD_AFTER)
00091 y += IMG_PAD_SIZE_TIMES4;
00092 x += IMG_PAD_SIZE_TIMES4;
00093 #endif
00094 return &(ref->p_img_sub[cmp][y & ref->chroma_mask_mv_y][x & ref->chroma_mask_mv_x][y >> ref->chroma_shift_y][x >> ref->chroma_shift_x]);
00095 }
00096
00097
00098 #endif
00099