comparison dxva2_h264.c @ 10988:3824ef98a6b8 libavcodec

Added a few missing consts in dxva_h264.
author fenrir
date Sun, 24 Jan 2010 16:40:58 +0000
parents 9f771d4312ed
children d48922f77738
comparison
equal deleted inserted replaced
10987:85de0c8a19b7 10988:3824ef98a6b8
180 } 180 }
181 181
182 static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, 182 static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
183 unsigned position, unsigned size) 183 unsigned position, unsigned size)
184 { 184 {
185 H264Context *h = avctx->priv_data; /* FIXME Can't use const because of get_bits_count */ 185 const H264Context *h = avctx->priv_data;
186 struct dxva_context *ctx = avctx->hwaccel_context; 186 struct dxva_context *ctx = avctx->hwaccel_context;
187 MpegEncContext *s = &h->s; 187 const MpegEncContext *s = &h->s;
188 unsigned list; 188 unsigned list;
189 189
190 memset(slice, 0, sizeof(*slice)); 190 memset(slice, 0, sizeof(*slice));
191 slice->BSNALunitDataLocation = position; 191 slice->BSNALunitDataLocation = position;
192 slice->SliceBytesInBuffer = size; 192 slice->SliceBytesInBuffer = size;
258 258
259 static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, 259 static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
260 DXVA2_DecodeBufferDesc *bs, 260 DXVA2_DecodeBufferDesc *bs,
261 DXVA2_DecodeBufferDesc *sc) 261 DXVA2_DecodeBufferDesc *sc)
262 { 262 {
263 H264Context *h = avctx->priv_data; 263 const H264Context *h = avctx->priv_data;
264 MpegEncContext *s = &h->s; 264 const MpegEncContext *s = &h->s;
265 const unsigned mb_count = s->mb_width * s->mb_height; 265 const unsigned mb_count = s->mb_width * s->mb_height;
266 struct dxva_context *ctx = avctx->hwaccel_context; 266 struct dxva_context *ctx = avctx->hwaccel_context;
267 const Picture *current_picture = h->s.current_picture_ptr; 267 const Picture *current_picture = h->s.current_picture_ptr;
268 struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; 268 struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private;
269 DXVA_Slice_H264_Short *slice = NULL; 269 DXVA_Slice_H264_Short *slice = NULL;
379 } 379 }
380 380
381 static int decode_slice(AVCodecContext *avctx, 381 static int decode_slice(AVCodecContext *avctx,
382 const uint8_t *buffer, uint32_t size) 382 const uint8_t *buffer, uint32_t size)
383 { 383 {
384 H264Context *h = avctx->priv_data; /* FIXME Can't use const because of get_bits_count */ 384 const H264Context *h = avctx->priv_data;
385 struct dxva_context *ctx = avctx->hwaccel_context; 385 struct dxva_context *ctx = avctx->hwaccel_context;
386 const Picture *current_picture = h->s.current_picture_ptr; 386 const Picture *current_picture = h->s.current_picture_ptr;
387 struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; 387 struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private;
388 unsigned position; 388 unsigned position;
389 389