qdirection->bits_sph_idx [j] [k] , qdirection->elevation index[j] [k] ) ; } } } } e e { bit pos = read inv bit buff (bitstream, &byteBuffer, bit pos, 1); nbits +=1; for(k=0;k< subframes; k++) { if (qdirection->bits sph idx[j] [k] >0) { bit pos = read GR (bitstream, &qdirection->azimuth index[j] [k], bit pos, GR ORD AZ-byteBuf fer, &nb) ; nbits += nb; qdirection->azimuth [j] [k] = deindex azimuth (qdirection->azimuth index[j] [k] , qdirection->bits_sph_idx [j] [k] , qdirection->elevation index[j] [k] ) ; } else { qdirection->azimuth [j] [k] = 0 ; qdirection->azimuth index[j] [k] = 0 ; } } } *pbit_pos = bit_pos; return nbits; } In some embodiments the indexing of the azimuth values is implemented such that instead of assigning the index in increasing order of the azimuth value, the indexes are assigned in increasing order of the distance from the frontal direction. In other words, if the quantized azimuth values are - 180, -135, -90, -45, 0, 45, 90, 135 they do not get the indexes: 0,1 ,2,3,4,5,6,7, but rather 7, 5, 3, 1, 0, 2, 4, 6. This may in some embodiments ensure that azimuth index values are lower in average and the entropy coding is more efficient. The overall encoding method, allowing transferring bits from one subband to another allows for better adaptability to the local data statistics.