Hi, On Thu, Dec 22, 2011 at 9:08 AM, Ronald S. Bultje <rsbul...@gmail.com> wrote: > On Thu, Dec 22, 2011 at 8:04 AM, KJT TOD <bioact...@abv.bg> wrote: > [.. until hpel_motion_lowres ..]
and the rest... > static inline int hpel_motion_lowres(MpegEncContext *s, [..] > + if ((unsigned)src_x > h_edge_pos - (!!sx) - w > + || (unsigned)src_y >(v_edge_pos >> field_based) - (!!sy) - h) { Space after ">", and || goes on previous line. Try to vertically align the h/v_edge_pos and the >. > /* apply one mpeg motion vector to the three components */ > static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, > - uint8_t *dest_y, uint8_t *dest_cb, uint8_t > *dest_cr, > - int field_based, int bottom_field, int > field_select, > - uint8_t **ref_picture, h264_chroma_mc_func > *pix_op, > - int motion_x, int motion_y, int h, int mb_y) > + uint8_t *dest_y, > + uint8_t *dest_cb, > + uint8_t *dest_cr, > + int field_based, > + int bottom_field, > + int field_select, > + uint8_t ** ref_picture, No space after **. > + uint8_t *ptr_y, * ptr_cb, * ptr_cr; Same for *. > + uvsrc_x = s->mb_x * block_s + (mx >> lowres); > + uvsrc_y = mb_y * block_s + (my >> lowres); Try to vertically align, like you do here: > + uvsrc_x = s->mb_x * block_s + (mx >> (lowres + 1)); > + uvsrc_y = (mb_y * block_s >> field_based) + (my >> (lowres + 1)); [..] > + if ((unsigned)src_x > h_edge_pos - (!!sx) - 2 * block_s || > + (unsigned)src_y >(v_edge_pos >> field_based) - (!!sy) - h) { Space between cast and value, e.g. "(unsigned) src_x". Also spaces around >, you don't do that after on the second line. > static inline void chroma_4mv_motion_lowres(MpegEncContext *s, [..] > + if (s->flags & CODEC_FLAG_EMU_EDGE) { > + if ((unsigned)src_x > h_edge_pos - (!!sx) - block_s || > + (unsigned)src_y > v_edge_pos - (!!sy) - block_s) { Space between cast and value. > -/** > +/* No, this is doxy, keep the /**. > - * @param dir direction (0->forward, 1->backward) > + * @param dir direction (0->for ward, 1->backward) No. > static inline void MPV_motion_lowres(MpegEncContext *s, > - uint8_t *dest_y, uint8_t *dest_cb, uint8_t > *dest_cr, > - int dir, uint8_t **ref_picture, > - h264_chroma_mc_func *pix_op) > + uint8_t *dest_y, uint8_t *dest_cb, > + uint8_t *dest_cr, > + int dir, uint8_t ** ref_picture, > + h264_chroma_mc_func * pix_op) No space after ** or *. > + switch (s->mv_type) { > + case MV_TYPE_16X16: Intend case at same level as switch. > switch (s->mv_type) { > case MV_TYPE_16X16: Same here. > /* put block[] to dest[] */ > static inline void put_dct(MpegEncContext *s, > - DCTELEM *block, int i, uint8_t *dest, int > line_size, int qscale) > + DCTELEM * block, int i, uint8_t *dest, No space after *. > void ff_clean_intra_table_entries(MpegEncContext *s) > { > int wrap = s->b8_stride; > - int xy = s->block_index[0]; > + int xy = s->block_index[0]; > > - s->dc_val[0][xy ] = > - s->dc_val[0][xy + 1 ] = > - s->dc_val[0][xy + wrap] = > + s->dc_val[0][xy] = > + s->dc_val[0][xy + 1] = > + s->dc_val[0][xy + wrap] = > s->dc_val[0][xy + 1 + wrap] = 1024; I'd say this was fine as it was. > - memset(s->ac_val[0][xy ], 0, 32 * sizeof(int16_t)); > + memset(s->ac_val[0][xy], 0, 32 * sizeof(int16_t)); > memset(s->ac_val[0][xy + wrap], 0, 32 * sizeof(int16_t)); Same here. > - if (s->msmpeg4_version>=3) { > - s->coded_block[xy ] = > - s->coded_block[xy + 1 ] = > - s->coded_block[xy + wrap] = > + if (s->msmpeg4_version >= 3) { > + s->coded_block[xy] = > + s->coded_block[xy + 1] = > + s->coded_block[xy + wrap] = > s->coded_block[xy + 1 + wrap] = 0; Same. Rest OK. Ronald _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel