Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (43)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5694)

  • Dumping and playing h264 bytestream from RTSP webcam

    18 octobre 2011, par thek

    My goal is to connect (rtsp) to camera, get h264 stream from rtp packages, save it as a bytestream to file and be able to play it (with ffplay or vlc). The only problem is that my result stream gives me errors (and a nice gray rectangle, sometimes with something moving - like only P frames are decoded) while playing.

    Here is my DESCRIBE response from rtsp server (ip replaced with ) :

       10:04:18.387 [New I/O client worker #1-1] INFO  rtsp.WebcamClientResponseHandler - Sending DESCRIBE request: DESCRIBE rtsp://<server>:<port>/channel1 RTSP/1.0
    -------status---------
    200 OK
    -------headers---------
    CSeq : 2
    Date : Wed, Jan 07 2009 19:05:09 GMT
    Content-Base : rtsp://<server>/channel1/
    Content-Type : application/sdp
    Content-Length : 433
    -------content---------
    v=0
    o=- 515949295799 1 IN IP4 <server>
    s=Session streamed by stream
    i=1
    t=0 0
    a=tool:LIVE555 Streaming Media v2009.01.26
    a=type:broadcast
    a=control:*
    a=range:npt=0-
    a=x-qt-text-nam:Session streamed by stream
    a=x-qt-text-inf:1
    m=video 0 RTP/AVP 96
    c=IN IP4 0.0.0.0
    b=AS:128
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1;profile-level-id=420028;sprop-parameter-sets=Z0IAKOkCg/I=,aM44gA==
    a=control:tracks
    </server></server></port></server>

    And server sends me RTP packages with non IDR frames and fragmented (type=28) IDR frames. First ones are written to file, fragmented are unpacked.
    The result byte stream is :

    NAL SPS NAL PPS NAL FRAME1 NAL FRAME2 ... NAL FRAMEN

    where NAL is (hex) 00 00 01
    and SPS is (decoded Z0IAKOkCg/I= from sprop-parameter-sets): 67 42 00 28 e9 02 83 f2
    and PPS is (decoded aM44gA==): 68 ce 38 80

    I found similar topic with same steps taken :
    how-to-process-raw-udp-packets-so-that-they-can-be-decoded-by-a-decoder-filter-i
    but I can't see what am I missing.

    Could anyone give me some clue what may be wrong ?

    This is a link to generated h264 file :
    a.h264

    Below I'm attaching some more information from playing my stream.


    Playing my video with ffplay -f h264 a.h264 gives me following output (and a gray rectangle) :

    ffplay version 0.8.4-4:0.8.4-0ubuntu1~jon1, Copyright (c) 2003-2011 the FFmpeg developers
     built on Sep 25 2011 09:45:09 with gcc 4.4.3
     configuration: --extra-version=&#39;4:0.8.4-0ubuntu1~jon1&#39; --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
     libavutil    51.  9. 1 / 51.  9. 1
     libavcodec   53.  7. 0 / 53.  7. 0
     libavformat  53.  4. 0 / 53.  4. 0
     libavdevice  53.  1. 1 / 53.  1. 1
     libavfilter   2. 23. 0 /  2. 23. 0
     libswscale    2.  0. 0 /  2.  0. 0
     libpostproc  52.  0. 0 / 52.  0. 0
    [h264 @ 0x184d4c0] Missing reference picture
    [h264 @ 0x184d4c0] decode_slice_header error                                                                                                                                                                                                
    [h264 @ 0x184d4c0] concealing 300 DC, 300 AC, 300 MV errors                                                                                                                                                                                
    [h264 @ 0x1822640] max_analyze_duration 5000000 reached at 5000000
    [h264 @ 0x1822640] Estimating duration from bitrate, this may be inaccurate                                                                                                                                                                
    Input #0, h264, from &#39;a.h264&#39;:                                                                                                                                                                                                              
     Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264 (Baseline), yuv420p, 320x240, 25 fps, 25 tbr, 1200k tbn, 50 tbc
    [h264 @ 0x184d4c0] Missing reference pictureq=    3KB sq=    0B f=0/0  
    [h264 @ 0x184d4c0] decode_slice_header error                                                                                                                                                                                                
    [h264 @ 0x184d4c0] concealing 300 DC, 300 AC, 300 MV errors                                                                                                                                                                                
    [h264 @ 0x184d4c0] QP 4294967283 out of rangeKB sq=    0B f=0/0   0/0  
    [h264 @ 0x184d4c0] decode_slice_header error                                                                                                                                                                                                
    [h264 @ 0x184d4c0] concealing 300 DC, 300 AC, 300 MV errors                                                                                                                                                                                
    [h264 @ 0x184d4c0] Missing reference picture
    [h264 @ 0x184d4c0] decode_slice_header error                                                                                                                                                                                                
    [h264 @ 0x184d4c0] mmco: unref short failure                                                                                                                                                                                                
    [h264 @ 0x184d4c0] concealing 300 DC, 300 AC, 300 MV errors                                                                                                                                                                                
    [h264 @ 0x184d4c0] P sub_mb_type 5 out of range at 8 0
    [h264 @ 0x184d4c0] error while decoding MB 8 0                                                                                                                                                                                              
    [h264 @ 0x184d4c0] concealing 300 DC, 300 AC, 300 MV errors                                                                                                                                                                                
    [h264 @ 0x184d4c0] QP 4294967283 out of range
    [h264 @ 0x184d4c0] decode_slice_header error                                                                                                                                                                                                
    [h264 @ 0x184d4c0] concealing 300 DC, 300 AC, 300 MV errors

    Running h264_analyse (http://h264bitstream.sourceforge.net/) on my stream gives me :

    ./h264_analyze a.h264
    !! Found NAL at offset 3 (0x0003), size 8 (0x0008)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 3
    nal_unit_type : 7 ( Sequence parameter set )
    ======= SPS =======
    profile_idc : 66
    constraint_set0_flag : 0
    constraint_set1_flag : 0
    constraint_set2_flag : 0
    constraint_set3_flag : 0
    reserved_zero_4bits : 0
    level_idc : 40
    seq_parameter_set_id : 0
    chroma_format_idc : 0
    residual_colour_transform_flag : 0
    bit_depth_luma_minus8 : 0
    bit_depth_chroma_minus8 : 0
    qpprime_y_zero_transform_bypass_flag : 0
    seq_scaling_matrix_present_flag : 0
    log2_max_frame_num_minus4 : 0
    pic_order_cnt_type : 0
     log2_max_pic_order_cnt_lsb_minus4 : 1
     delta_pic_order_always_zero_flag : 0
     offset_for_non_ref_pic : 0
     offset_for_top_to_bottom_field : 0
     num_ref_frames_in_pic_order_cnt_cycle : 0
    num_ref_frames : 1
    gaps_in_frame_num_value_allowed_flag : 0
    pic_width_in_mbs_minus1 : 19
    pic_height_in_map_units_minus1 : 14
    frame_mbs_only_flag : 1
    mb_adaptive_frame_field_flag : 0
    direct_8x8_inference_flag : 1
    frame_cropping_flag : 0
     frame_crop_left_offset : 0
     frame_crop_right_offset : 0
     frame_crop_top_offset : 0
     frame_crop_bottom_offset : 0
    vui_parameters_present_flag : 0                                                                                                                                                                                                            
    === VUI ===                                                                                                                                                                                                                                  
    aspect_ratio_info_present_flag : 0                                                                                                                                                                                                          
     aspect_ratio_idc : 0                                                                                                                                                                                                                      
    sar_width : 0                                                                                                                                                                                                                          
    sar_height : 0                                                                                                                                                                                                                          
    overscan_info_present_flag : 0                                                                                                                                                                                                              
     overscan_appropriate_flag : 0                                                                                                                                                                                                            
    video_signal_type_present_flag : 0                                                                                                                                                                                                          
     video_format : 0                                                                                                                                                                                                                          
     video_full_range_flag : 0                                                                                                                                                                                                                
     colour_description_present_flag : 0                                                                                                                                                                                                      
    colour_primaries : 0                                                                                                                                                                                                                    
     transfer_characteristics : 0                                                                                                                                                                                                              
     matrix_coefficients : 0                                                                                                                                                                                                                  
    chroma_loc_info_present_flag : 0                                                                                                                                                                                                            
     chroma_sample_loc_type_top_field : 0                                                                                                                                                                                                      
     chroma_sample_loc_type_bottom_field : 0                                                                                                                                                                                                  
    timing_info_present_flag : 0                                                                                                                                                                                                                
     num_units_in_tick : 0                                                                                                                                                                                                                    
     time_scale : 0                                                                                                                                                                                                                            
     fixed_frame_rate_flag : 0                                                                                                                                                                                                                
    nal_hrd_parameters_present_flag : 0                                                                                                                                                                                                        
    vcl_hrd_parameters_present_flag : 0                                                                                                                                                                                                        
     low_delay_hrd_flag : 0                                                                                                                                                                                                                    
    pic_struct_present_flag : 0
    bitstream_restriction_flag : 0
     motion_vectors_over_pic_boundaries_flag : 0
     max_bytes_per_pic_denom : 0
     max_bits_per_mb_denom : 0
     log2_max_mv_length_horizontal : 0
     log2_max_mv_length_vertical : 0
     num_reorder_frames : 0
     max_dec_frame_buffering : 0
    === HRD ===
    cpb_cnt_minus1 : 0
    bit_rate_scale : 0
    cpb_size_scale : 0
    initial_cpb_removal_delay_length_minus1 : 0
    cpb_removal_delay_length_minus1 : 0
    dpb_output_delay_length_minus1 : 0
    time_offset_length : 0
    !! Found NAL at offset 14 (0x000E), size 4 (0x0004)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 3
    nal_unit_type : 8 ( Picture parameter set )
    ======= PPS =======
    pic_parameter_set_id : 0
    seq_parameter_set_id : 0
    entropy_coding_mode_flag : 0
    pic_order_present_flag : 0
    num_slice_groups_minus1 : 0
    slice_group_map_type : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    weighted_pred_flag : 0
    weighted_bipred_idc : 0
    pic_init_qp_minus26 : 0
    pic_init_qs_minus26 : 0
    chroma_qp_index_offset : 0
    deblocking_filter_control_present_flag : 0
    constrained_intra_pred_flag : 0
    redundant_pic_cnt_present_flag : 0
    transform_8x8_mode_flag : 1
    pic_scaling_matrix_present_flag : 0
    second_chroma_qp_index_offset : 16
    !! Found NAL at offset 21 (0x0015), size 480 (0x01E0)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 2
    nal_unit_type : 1 ( Coded slice of a non-IDR picture )
    ======= Slice Header =======
    first_mb_in_slice : 0
    slice_type : 5 ( P slice only )
    pic_parameter_set_id : 0
    frame_num : 1
    field_pic_flag : 0
    bottom_field_flag : 0
    idr_pic_id : 0
    pic_order_cnt_lsb : 2
    delta_pic_order_cnt_bottom : 0
    redundant_pic_cnt : 0
    direct_spatial_mv_pred_flag : 0
    num_ref_idx_active_override_flag : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    cabac_init_idc : 0
    slice_qp_delta : -7
    sp_for_switch_flag : 0
    slice_qs_delta : 0
    disable_deblocking_filter_idc : 0
    slice_alpha_c0_offset_div2 : 0
    slice_beta_offset_div2 : 0
    slice_group_change_cycle : 0
    === Prediction Weight Table ===
    luma_log2_weight_denom : 0
    chroma_log2_weight_denom : 0
    luma_weight_l0_flag : 0
    chroma_weight_l0_flag : 0
    luma_weight_l1_flag : 0
    chroma_weight_l1_flag : 0
    === Ref Pic List Reordering ===
    ref_pic_list_reordering_flag_l0 : 0
    ref_pic_list_reordering_flag_l1 : 0
    === Decoded Ref Pic Marking ===
    no_output_of_prior_pics_flag : 0
    long_term_reference_flag : 0
    adaptive_ref_pic_marking_mode_flag : 0
    !! Found NAL at offset 504 (0x01F8), size 324 (0x0144)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 2
    nal_unit_type : 1 ( Coded slice of a non-IDR picture )
    ======= Slice Header =======
    first_mb_in_slice : 0
    slice_type : 5 ( P slice only )
    pic_parameter_set_id : 0
    frame_num : 2
    field_pic_flag : 0
    bottom_field_flag : 0
    idr_pic_id : 0
    pic_order_cnt_lsb : 4
    delta_pic_order_cnt_bottom : 0
    redundant_pic_cnt : 0
    direct_spatial_mv_pred_flag : 0
    num_ref_idx_active_override_flag : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    cabac_init_idc : 0
    slice_qp_delta : -7
    sp_for_switch_flag : 0
    slice_qs_delta : 0
    disable_deblocking_filter_idc : 0
    slice_alpha_c0_offset_div2 : 0
    slice_beta_offset_div2 : 0
    slice_group_change_cycle : 0
    === Prediction Weight Table ===
    luma_log2_weight_denom : 0
    chroma_log2_weight_denom : 0
    luma_weight_l0_flag : 0
    chroma_weight_l0_flag : 0
    luma_weight_l1_flag : 0
    chroma_weight_l1_flag : 0
    === Ref Pic List Reordering ===
    ref_pic_list_reordering_flag_l0 : 0
    ref_pic_list_reordering_flag_l1 : 0
    === Decoded Ref Pic Marking ===
    no_output_of_prior_pics_flag : 0
    long_term_reference_flag : 0
    adaptive_ref_pic_marking_mode_flag : 0
    !! Found NAL at offset 831 (0x033F), size 300 (0x012C)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 2
    nal_unit_type : 1 ( Coded slice of a non-IDR picture )
    ======= Slice Header =======
    first_mb_in_slice : 0
    slice_type : 5 ( P slice only )
    pic_parameter_set_id : 0
    frame_num : 3
    field_pic_flag : 0
    bottom_field_flag : 0
    idr_pic_id : 0
    pic_order_cnt_lsb : 6
    delta_pic_order_cnt_bottom : 0
    redundant_pic_cnt : 0
    direct_spatial_mv_pred_flag : 0
    num_ref_idx_active_override_flag : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    cabac_init_idc : 0
    slice_qp_delta : -7
    sp_for_switch_flag : 0
    slice_qs_delta : 0
    disable_deblocking_filter_idc : 0
    slice_alpha_c0_offset_div2 : 0
    slice_beta_offset_div2 : 0
    slice_group_change_cycle : 0
    === Prediction Weight Table ===
    luma_log2_weight_denom : 0
    chroma_log2_weight_denom : 0
    luma_weight_l0_flag : 0
    chroma_weight_l0_flag : 0
    luma_weight_l1_flag : 0
    chroma_weight_l1_flag : 0
    === Ref Pic List Reordering ===
    ref_pic_list_reordering_flag_l0 : 0
    ref_pic_list_reordering_flag_l1 : 0
    === Decoded Ref Pic Marking ===
    no_output_of_prior_pics_flag : 0
    long_term_reference_flag : 0
    adaptive_ref_pic_marking_mode_flag : 0
    !! Found NAL at offset 1134 (0x046E), size 825 (0x0339)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 2
    nal_unit_type : 1 ( Coded slice of a non-IDR picture )
    ======= Slice Header =======
    first_mb_in_slice : 0
    slice_type : 5 ( P slice only )
    pic_parameter_set_id : 0
    frame_num : 4
    field_pic_flag : 0
    bottom_field_flag : 0
    idr_pic_id : 0
    pic_order_cnt_lsb : 8
    delta_pic_order_cnt_bottom : 0
    redundant_pic_cnt : 0
    direct_spatial_mv_pred_flag : 0
    num_ref_idx_active_override_flag : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    cabac_init_idc : 0
    slice_qp_delta : -9
    sp_for_switch_flag : 0
    slice_qs_delta : 0
    disable_deblocking_filter_idc : 0
    slice_alpha_c0_offset_div2 : 0
    slice_beta_offset_div2 : 0
    slice_group_change_cycle : 0
    === Prediction Weight Table ===
    luma_log2_weight_denom : 0
    chroma_log2_weight_denom : 0
    luma_weight_l0_flag : 0
    chroma_weight_l0_flag : 0
    luma_weight_l1_flag : 0
    chroma_weight_l1_flag : 0
    === Ref Pic List Reordering ===
    ref_pic_list_reordering_flag_l0 : 0
    ref_pic_list_reordering_flag_l1 : 0
    === Decoded Ref Pic Marking ===
    no_output_of_prior_pics_flag : 0
    long_term_reference_flag : 0
    adaptive_ref_pic_marking_mode_flag : 0
    !! Found NAL at offset 1962 (0x07AA), size 754 (0x02F2)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 2
    nal_unit_type : 1 ( Coded slice of a non-IDR picture )
    ======= Slice Header =======
    first_mb_in_slice : 0
    slice_type : 5 ( P slice only )
    pic_parameter_set_id : 0
    frame_num : 5
    field_pic_flag : 0
    bottom_field_flag : 0
    idr_pic_id : 0
    pic_order_cnt_lsb : 10
    delta_pic_order_cnt_bottom : 0
    redundant_pic_cnt : 0
    direct_spatial_mv_pred_flag : 0
    num_ref_idx_active_override_flag : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    cabac_init_idc : 0
    slice_qp_delta : -9
    sp_for_switch_flag : 0
    slice_qs_delta : 0
    disable_deblocking_filter_idc : 0
    slice_alpha_c0_offset_div2 : 0
    slice_beta_offset_div2 : 0
    slice_group_change_cycle : 0
    === Prediction Weight Table ===
    luma_log2_weight_denom : 0
    chroma_log2_weight_denom : 0
    luma_weight_l0_flag : 0
    chroma_weight_l0_flag : 0
    luma_weight_l1_flag : 0
    chroma_weight_l1_flag : 0
    === Ref Pic List Reordering ===
    ref_pic_list_reordering_flag_l0 : 0
    ref_pic_list_reordering_flag_l1 : 0
    === Decoded Ref Pic Marking ===
    no_output_of_prior_pics_flag : 0
    long_term_reference_flag : 0
    adaptive_ref_pic_marking_mode_flag : 0
    !! Found NAL at offset 2719 (0x0A9F), size 824 (0x0338)
    ==================== NAL ====================
    forbidden_zero_bit : 0
    nal_ref_idc : 2
    nal_unit_type : 1 ( Coded slice of a non-IDR picture )
    ======= Slice Header =======
    first_mb_in_slice : 0
    slice_type : 5 ( P slice only )
    pic_parameter_set_id : 0
    frame_num : 6
    field_pic_flag : 0
    bottom_field_flag : 0
    idr_pic_id : 0
    pic_order_cnt_lsb : 12
    delta_pic_order_cnt_bottom : 0
    redundant_pic_cnt : 0
    direct_spatial_mv_pred_flag : 0
    num_ref_idx_active_override_flag : 0
    num_ref_idx_l0_active_minus1 : 0
    num_ref_idx_l1_active_minus1 : 0
    cabac_init_idc : 0
    slice_qp_delta : -9
    sp_for_switch_flag : 0
    slice_qs_delta : 0
    disable_deblocking_filter_idc : 0
    slice_alpha_c0_offset_div2 : 0
    slice_beta_offset_div2 : 0
    slice_group_change_cycle : 0
    === Prediction Weight Table ===
    luma_log2_weight_denom : 0
    chroma_log2_weight_denom : 0
    luma_weight_l0_flag : 0
    chroma_weight_l0_flag : 0
    luma_weight_l1_flag : 0
    chroma_weight_l1_flag : 0
    === Ref Pic List Reordering ===
    ref_pic_list_reordering_flag_l0 : 0
    ref_pic_list_reordering_flag_l1 : 0
    === Decoded Ref Pic Marking ===
    no_output_of_prior_pics_flag : 0
    long_term_reference_flag : 0
    adaptive_ref_pic_marking_mode_flag : 0
    !! Found NAL at offset 3546 (0x0DDA), size 628 (0x0274)
    ==================== NAL ====================
    [...]
  • Best tool to convert mp3 to aac (FFmpeg Vs NeroAacEnc) [closed]

    3 août 2012, par Soham Dasgupta

    My question is straight forward. I want to convert mp3 to aac. I have knowledge of two such tools which does the job - NeroAacEnc and FFMpeg. Now which one produces the best output and least size is for maestros to answer, so I summon them here to help me accomplish the same. Please also help me with some commands with which I can use.

    Just out of curiosity, is the (ALAC)Apple Lossless Audio Codec which is included with FFMpeg better than Nero Aac Encoder. If so, then how can I use it to convert mp3 to aac.

  • VP8 Codec Optimization Update

    15 juin 2010, par noreply@blogger.com (John Luther) — inside webm

    Since WebM launched in May, the team has been working hard to make the VP8 video codec faster. Our community members have contributed improvements, but there’s more work to be done in some interesting areas related to performance (more on those below).


    Encoder


    The VP8 encoder is ripe for speed optimizations. Scott LaVarnway’s efforts in writing an x86 assembly version of the quantizer will help in this goal significantly as the quantizer is called many times while the encoder makes decisions about how much detail from the image will be transmitted.

    For those of you eager to get involved, one piece of low-hanging fruit is writing a SIMD version of the ARNR temporal filtering code. Also, much of the assembly code only makes use of the SSE2 instruction set, and there surely are newer extensions that could be made use of. There are also redundant code removal and other general cleanup to be done ; (Yaowu Xu has submitted some changes for these).

    At a higher level, someone can explore some alternative motion search strategies in the encoder. Eventually the motion search can be decoupled entirely to allow motion fields to be calculated elsewhere (for example, on a graphics processor).

    Decoder


    Decoder optimizations can bring higher resolutions and smoother playback to less powerful hardware.

    Jeff Muizelaar has submitted some changes which combine the IDCT and summation with the predicted block into a single function, helping us avoid storing the intermediate result, thus reducing memory transfers and avoiding cache pollution. This changes the assembly code in a fundamental way, so we will need to sync the other platforms up or switch them to a generic C implementation and accept the performance regression. Johann Koenig is working on implementing this change for ARM processors, and we’ll merge these changes into the mainline soon.

    In addition, Tim Terriberry is attacking a different method of bounds checking on the "bool decoder." The bool decoder is performance-critical, as it is called several times for each bit in the input stream. The current code handles this check with a simple clamp in the innermost loops and a less-frequent copy into a circular buffer. This can be expensive at higher data rates. Tim’s patch removes the circular buffer, but uses a more complex clamp in the innermost loops. These inner loops have historically been troublesome on embedded platforms.

    To contribute in these efforts, I’ve started working on rewriting higher-level parts of the decoder. I believe there is an opportunity to improve performance by paying better attention to data locality and cache layout, and reducing memory bus traffic in general. Another area I plan to explore is improving utilization in the multi-threaded decoder by separating the bitstream decoding from the rest of the image reconstruction, using work units larger than a single macroblock, and not tying functionality to a specific thread. To get involved in these areas, subscribe to the codec-devel mailing list and provide feedback on the code as it’s written.

    Embedded Processors


    We want to optimize multiple platforms, not just desktops. Fritz Koenig has already started looking at the performance of VP8 on the Intel Atom platform. This platform need some attention as we wrote our current x86 assembly code with an out-of-order processor in mind. Since Atom is an in-order processor (much like the original Pentium), the instruction scheduling of all of the x86 assembly code needs to be reexamined. One option we’re looking at is scheduling the code for the Atom processor and seeing if that impacts the performance on other x86 platforms such as the Via C3 and AMD Geode. This is shaping up to be a lot of work, but doing it would provide us with an opportunity to tighten up our assembly code.

    These issues, along with wanting to make better use of the larger register file on x86_64, may reignite every assembly programmer’s (least ?) favorite debate : whether or not to use intrinsics. Yunqing Wang has been experimenting with this a bit, but initial results aren’t promising. If you have experience in dealing with a lot of assembly code across several similar-but-kinda-different platforms, these maintainability issues might be familiar to you. I hope you’ll share your thoughts and experiences on the codec-devel mailing list.

    Optimizing codecs is an iterative (some would say never-ending) process, so stay tuned for more posts on the progress we’re making, and by all means, start hacking yourself.

    It’s exciting to see that we’re starting to get substantial code contributions from developers outside of Google, and I look forward to more as WebM grows into a strong community effort.

    John Koleszar is a software engineer at Google.