On 02/19/2012 09:44 AM, Anton Khirnov wrote:

> ---
>  libavcodec/roqvideo.h    |    2 +-
>  libavcodec/roqvideoenc.c |   16 ++++++++--------
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/libavcodec/roqvideo.h b/libavcodec/roqvideo.h
> index a1ff10a..e2dc272 100644
> --- a/libavcodec/roqvideo.h
> +++ b/libavcodec/roqvideo.h
> @@ -69,7 +69,7 @@ typedef struct RoqContext {
>  
>      unsigned int framesSinceKeyframe;
>  
> -    AVFrame *frame_to_enc;
> +    const AVFrame *frame_to_enc;
>      uint8_t *out_buf;
>      struct RoqTempData *tmpData;
>  } RoqContext;
> diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
> index 2a62d55..01267b3 100644
> --- a/libavcodec/roqvideoenc.c
> +++ b/libavcodec/roqvideoenc.c
> @@ -112,7 +112,7 @@ static inline int square(int x)
>      return x*x;
>  }
>  
> -static inline int eval_sse(uint8_t *a, uint8_t *b, int count)
> +static inline int eval_sse(const uint8_t *a, const uint8_t *b, int count)
>  {
>      int diff=0;
>  
> @@ -124,8 +124,8 @@ static inline int eval_sse(uint8_t *a, uint8_t *b, int 
> count)
>  
>  // FIXME Could use DSPContext.sse, but it is not so speed critical (used
>  // just for motion estimation).
> -static int block_sse(uint8_t **buf1, uint8_t **buf2, int x1, int y1, int x2,
> -                     int y2, int *stride1, int *stride2, int size)
> +static int block_sse(uint8_t * const *buf1, uint8_t * const *buf2, int x1, 
> int y1,
> +                     int x2, int y2, const int *stride1, const int *stride2, 
> int size)
>  {
>      int i, k;
>      int sse=0;
> @@ -260,7 +260,7 @@ static void create_cel_evals(RoqContext *enc, RoqTempdata 
> *tempData)
>  /**
>   * Get macroblocks from parts of the image
>   */
> -static void get_frame_mb(AVFrame *frame, int x, int y, uint8_t mb[], int dim)
> +static void get_frame_mb(const AVFrame *frame, int x, int y, uint8_t mb[], 
> int dim)
>  {
>      int i, j, cp;
>  
> @@ -754,8 +754,8 @@ static void reconstruct_and_encode_image(RoqContext *enc, 
> RoqTempdata *tempData,
>  /**
>   * Create a single YUV cell from a 2x2 section of the image
>   */
> -static inline void frame_block_to_cell(uint8_t *block, uint8_t **data,
> -                                       int top, int left, int *stride)
> +static inline void frame_block_to_cell(uint8_t *block, uint8_t * const *data,
> +                                       int top, int left, const int *stride)
>  {
>      int i, j, u=0, v=0;
>  
> @@ -775,7 +775,7 @@ static inline void frame_block_to_cell(uint8_t *block, 
> uint8_t **data,
>  /**
>   * Create YUV clusters for the entire image
>   */
> -static void create_clusters(AVFrame *frame, int w, int h, uint8_t 
> *yuvClusters)
> +static void create_clusters(const AVFrame *frame, int w, int h, uint8_t 
> *yuvClusters)
>  {
>      int i, j, k, l;
>  
> @@ -1004,7 +1004,7 @@ static void roq_write_video_info_chunk(RoqContext *enc)
>  static int roq_encode_frame(AVCodecContext *avctx, unsigned char *buf, int 
> buf_size, void *data)
>  {
>      RoqContext *enc = avctx->priv_data;
> -    AVFrame *frame= data;
> +    const AVFrame *frame= data;
>      uint8_t *buf_start = buf;
>  
>      enc->out_buf = buf;


ok.

-Justin

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to