comparison libschroedingerenc.c @ 11684:b4aff04c10cf libavcodec

schroenc: Use AV_RB32
author conrad
date Wed, 05 May 2010 21:37:58 +0000
parents 83d14d771e80
children d3098fb8ec05
comparison
equal deleted inserted replaced
11683:83d14d771e80 11684:b4aff04c10cf
35 #include <schroedinger/schrovideoformat.h> 35 #include <schroedinger/schrovideoformat.h>
36 36
37 #include "avcodec.h" 37 #include "avcodec.h"
38 #include "libdirac_libschro.h" 38 #include "libdirac_libschro.h"
39 #include "libschroedinger.h" 39 #include "libschroedinger.h"
40 #include "bytestream.h"
40 41
41 42
42 /** libschroedinger encoder private data */ 43 /** libschroedinger encoder private data */
43 typedef struct FfmpegSchroEncoderParams { 44 typedef struct FfmpegSchroEncoderParams {
44 /** Schroedinger video format */ 45 /** Schroedinger video format */
317 SCHRO_PARSE_CODE_IS_REFERENCE(parse_code)) 318 SCHRO_PARSE_CODE_IS_REFERENCE(parse_code))
318 p_frame_output->key_frame = 1; 319 p_frame_output->key_frame = 1;
319 320
320 /* Parse the coded frame number from the bitstream. Bytes 14 321 /* Parse the coded frame number from the bitstream. Bytes 14
321 * through 17 represesent the frame number. */ 322 * through 17 represesent the frame number. */
322 p_frame_output->frame_num = (enc_buf->data[13] << 24) + 323 p_frame_output->frame_num = AV_RB32(enc_buf->data + 13);
323 (enc_buf->data[14] << 16) +
324 (enc_buf->data[15] << 8) +
325 enc_buf->data[16];
326 324
327 ff_dirac_schro_queue_push_back(&p_schro_params->enc_frame_queue, 325 ff_dirac_schro_queue_push_back(&p_schro_params->enc_frame_queue,
328 p_frame_output); 326 p_frame_output);
329 p_schro_params->enc_buf_size = 0; 327 p_schro_params->enc_buf_size = 0;
330 p_schro_params->enc_buf = NULL; 328 p_schro_params->enc_buf = NULL;