Refactor: picture.c remove leading whitespace.

Changing indentation like this really messes with diff, so I did it in
a separate commit.
This commit is contained in:
Ari Koivula 2013-09-20 10:11:11 +03:00
parent 3a9449e5e0
commit 86b4ee475a

View file

@ -83,8 +83,8 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
\param size initial array size \param size initial array size
\return picture_list pointer, NULL on failure \return picture_list pointer, NULL on failure
*/ */
picture_list *picture_list_init(int size) picture_list *picture_list_init(int size)
{ {
picture_list *list = (picture_list *)malloc(sizeof(picture_list)); picture_list *list = (picture_list *)malloc(sizeof(picture_list));
list->size = size; list->size = size;
if(size > 0) if(size > 0)
@ -95,16 +95,16 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
list->used_size = 0; list->used_size = 0;
return list; return list;
} }
/*! /*!
\brief Resize picture_list array \brief Resize picture_list array
\param list picture_list pointer \param list picture_list pointer
\param size new array size \param size new array size
\return 1 on success, 0 on failure \return 1 on success, 0 on failure
*/ */
int picture_list_resize(picture_list *list, int size) int picture_list_resize(picture_list *list, int size)
{ {
unsigned int i; unsigned int i;
picture** old_pics = NULL; picture** old_pics = NULL;
@ -135,15 +135,15 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
} }
return 1; return 1;
} }
/*! /*!
\brief Free memory allocated to the picture_list \brief Free memory allocated to the picture_list
\param list picture_list pointer \param list picture_list pointer
\return 1 on success, 0 on failure \return 1 on success, 0 on failure
*/ */
int picture_list_destroy(picture_list *list) int picture_list_destroy(picture_list *list)
{ {
unsigned int i; unsigned int i;
if(list->used_size > 0) if(list->used_size > 0)
{ {
@ -159,16 +159,16 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
} }
free(list); free(list);
return 1; return 1;
} }
/*! /*!
\brief Add picture to picturelist \brief Add picture to picturelist
\param pic picture pointer to add \param pic picture pointer to add
\param picture_list list to use \param picture_list list to use
\return 1 on success \return 1 on success
*/ */
int picture_list_add(picture_list *list,picture* pic) int picture_list_add(picture_list *list,picture* pic)
{ {
if(list->size == list->used_size) if(list->size == list->used_size)
{ {
if(!picture_list_resize(list, list->size*2)) if(!picture_list_resize(list, list->size*2))
@ -180,16 +180,16 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
list->pics[list->used_size] = pic; list->pics[list->used_size] = pic;
list->used_size++; list->used_size++;
return 1; return 1;
} }
/*! /*!
\brief Add picture to picturelist \brief Add picture to picturelist
\param pic picture pointer to add \param pic picture pointer to add
\param picture_list list to use \param picture_list list to use
\return 1 on success \return 1 on success
*/ */
int picture_list_rem(picture_list *list,int n, int8_t destroy) int picture_list_rem(picture_list *list,int n, int8_t destroy)
{ {
int i; int i;
//Must be within list boundaries //Must be within list boundaries
if((unsigned int)n >= list->used_size) if((unsigned int)n >= list->used_size)
@ -221,15 +221,15 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
} }
return 1; return 1;
} }
/*! /*!
\brief Allocate new picture \brief Allocate new picture
\param pic picture pointer \param pic picture pointer
\return picture pointer \return picture pointer
*/ */
picture *picture_init(int32_t width, int32_t height, int32_t width_in_LCU, int32_t height_in_LCU) picture *picture_init(int32_t width, int32_t height, int32_t width_in_LCU, int32_t height_in_LCU)
{ {
picture *pic = (picture *)malloc(sizeof(picture)); picture *pic = (picture *)malloc(sizeof(picture));
unsigned int luma_size = width * height; unsigned int luma_size = width * height;
unsigned int chroma_size = luma_size / 4; unsigned int chroma_size = luma_size / 4;
@ -271,15 +271,15 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
} }
return pic; return pic;
} }
/*! /*!
\brief Free memory allocated to picture \brief Free memory allocated to picture
\param pic picture pointer \param pic picture pointer
\return 1 on success, 0 on failure \return 1 on success, 0 on failure
*/ */
int picture_destroy(picture *pic) int picture_destroy(picture *pic)
{ {
int i; int i;
free(pic->u_data); free(pic->u_data);
@ -302,7 +302,7 @@ void picture_setBlockCoded(picture* pic,uint32_t xCtb, uint32_t yCtb, uint8_t de
pic->CU = NULL; pic->CU = NULL;
return 1; return 1;
} }
/** @} */ // end of group1 /** @} */ // end of group1